HTTP status codes and CSP builder
Look up what an HTTP status code means, and build a Content-Security-Policy header directive by directive.
Runs in your browser. Nothing you enter is uploaded.
| 200 | OK | The request worked. |
|---|---|---|
| 201 | Created | The request worked and created something new. |
| 204 | No Content | The request worked and there is nothing to send back. |
| 206 | Partial Content | Part of the file, for a range request. |
| 301 | Moved Permanently | The page moved for good; search engines follow it. |
| 302 | Found | A temporary redirect; the method may change to GET. |
| 303 | See Other | Go to another URL with GET, often after a form post. |
| 304 | Not Modified | The cached copy is still good. |
| 307 | Temporary Redirect | A temporary redirect that keeps the method. |
| 308 | Permanent Redirect | A permanent redirect that keeps the method. |
| 400 | Bad Request | The server cannot read the request. |
| 401 | Unauthorized | You need to sign in first. |
| 403 | Forbidden | You are signed in but not allowed. |
| 404 | Not Found | Nothing exists at this URL. |
| 405 | Method Not Allowed | This URL does not accept that method. |
| 408 | Request Timeout | The client took too long to send the request. |
| 409 | Conflict | The request clashes with the current state, such as an edit conflict. |
| 410 | Gone | It was here and was removed on purpose. |
| 413 | Content Too Large | The request body is too big. |
| 415 | Unsupported Media Type | The server does not accept this content type. |
| 422 | Unprocessable Content | The request is well formed but the data is invalid. |
| 429 | Too Many Requests | Rate limited; wait before trying again. |
| 500 | Internal Server Error | Something broke on the server. |
| 501 | Not Implemented | The server does not support this feature. |
| 502 | Bad Gateway | A server in between got a bad answer from the next one. |
| 503 | Service Unavailable | The server is down or overloaded for now. |
| 504 | Gateway Timeout | A server in between waited too long for the next one. |
No status code matches.
Content-Security-Policy
About this tool
This page lists 27 common HTTP status codes with their reason phrases and a short explanation, searchable by code or name. Below it, a builder writes a Content-Security-Policy header from 11 directives, leaves out the empty ones and can add upgrade-insecure-requests.
- What is the difference between 301 and 308?
- Both are permanent redirects. 308 requires the client to keep the request method, while with 301 a POST may be repeated as a GET.
- Where do I put the generated CSP?
- Send it as a response header from your server or hosting config. The defaults start strict, with default-src 'self' and object-src 'none', so add the sources your page actually loads.