About HTTP Header Parser
A block of response headers tells you a lot, if you remember what fifty different names mean. Is this response cached? For how long? Can a script read that cookie? Paste the block from your browser's network panel or curl -i and each header gets a plain description, with values such as max-age=86400 translated to 1 day.
It also reviews what it sees. Cookies without Secure, HttpOnly or SameSite get marked, X-Powered-By is called out for revealing your stack, and a response missing the main security headers gets a list of them with the reason each one matters. That makes it a quick first pass before a release, or when reading a bug report.
How it works
The text is read as an HTTP message. The HTTP/1.1 200 or GET /path first line sets whether it is a response or a request, and if there is none, the header names themselves give it away. The < and > markers from curl -v are removed, HTTP/2 pseudo-headers such as :status are understood, and a blank line ends the headers, with anything after it noted as ignored body.
Each name is looked up in a table of about 55 common headers, which also decides what to check. Set-Cookie values get split into attributes, durations are worked out from Cache-Control, Strict-Transport-Security, Age and Retry-After, and a text/* content type with no charset is noted. Lines with no colon or an invalid name are listed as problems with their line numbers. Nothing is fetched, since the page only reads what you paste.
How to use HTTP Header Parser
- Paste into the Raw HTTP headers box, one header per line. Upload and Try an example work too.
- Read the Worth checking note at the top, which lists problems and missing security headers.
- Go through the table: Header, Value and What it does. Flags on a row point out weak settings.
- Press Copy, or Download to save the report as
http-headers.md.
A response with a few weak spots
HTTP/1.1 200 OK
Cache-Control: public, max-age=86400
Set-Cookie: session=abc123; Path=/; HttpOnly
Strict-Transport-Security: max-age=31536000
X-Powered-By: Express
Access-Control-Allow-Origin: *HTTP/1.1 200 OK
| Header | Value | Note |
| --- | --- | --- |
| Cache-Control | public, max-age=86400 | Rules for who may store this response and for how long. Here: 1 day. |
| Set-Cookie | session=abc123; Path=/; HttpOnly | Stores a cookie in the browser. Each cookie gets its own header. no Secure: can travel over plain HTTP no SameSite: browsers default to Lax |
| Strict-Transport-Security | max-age=31536000 | Tells browsers to use only HTTPS for this site (HSTS). Here: 365 days. |
| X-Powered-By | Express | Framework name. It reveals your stack and does nothing useful, so remove it. |
| Access-Control-Allow-Origin | * | Which origins may read this response from a browser script. * means any site may read this response. |
Security headers not present:
- Content-Security-Policy: it is the main defense against injected scripts
- X-Content-Type-Options: nosniff stops a file being run as another type
- Referrer-Policy: browsers otherwise apply their own defaultThis is the downloadable report. See the session cookie: HttpOnly is set, but with no Secure, so it can travel over plain HTTP.
When it helps
- Working out why a page stays stale, by reading its
Cache-Control,AgeandETag - Reviewing a response before a release for missing security headers
- Checking the cookie flags on a session cookie
- Reading the CORS headers when a cross-origin request fails in the browser
Tips for a better result
- Remove
AuthorizationandCookievalues before sharing the parsed result. The page marks those headers as sensitive for that reason. - Take the missing headers as a prompt to think, not as a score. An API that returns only JSON has less need for a Content-Security-Policy than an HTML page does.
- To collect the headers,
curl -I https://example.comprints them for a HEAD request, though some servers answer HEAD differently from GET.
Good to know
- It reads pasted text only. It does not connect to a site, so it reports exactly what you give it and nothing about the live server.
- Values are explained, not audited in depth. A
Content-Security-Policyis described in general, and its individual directives are not checked. - The check for missing headers covers four:
Strict-Transport-Security,Content-Security-Policy,X-Content-Type-OptionsandReferrer-Policy, and it only applies to responses. - Less common or vendor headers get no description, though they are still listed.
Questions people ask
Why is a security header flagged as missing on my API?
The check applies to any response and cannot tell what the content is for. Decide for yourself: some, such as Content-Security-Policy, matter far more on HTML pages than on JSON endpoints.
What is the difference between no-cache and no-store?
no-store means the response must never be written to a cache. no-cache allows storing it, but it has to be revalidated with the server before each use.
Do repeated headers cause a problem?
Set-Cookie is meant to repeat, once per cookie. Most others should appear only once, so a repeat gets flagged, since it often means two layers such as an app and a proxy both set it.
Can I paste HTTP/2 headers from dev tools?
Yes. Lowercase names and pseudo-headers such as :status are read normally. Browser panels show HTTP/2 headers as text, so there is no binary format to deal with.
What to use next
- cURL Formatter: to read the request that produced these headers
- URL Parser: to break down a Location or Link value
- JWT Decoder: if an Authorization header carries a token
Last reviewed . Read our editorial policy.