01What is HTTP Header Parser?
HTTP Header Parser turns a block of raw headers into a clean name and value table and a JSON object you can paste into code, tests or a bug report. Paste what you copied from curl -i, your browser's DevTools, a proxy or a server log. The parser follows the message rules in RFC 9110 and RFC 9112 rather than just splitting on the first colon. A status line such as HTTP/1.1 200 OK or a request line such as GET /api HTTP/1.1 at the top is recognised and kept out of the JSON. A line that starts with a space or tab is treated as an obsolete folded continuation of the previous header. HTTP/2 pseudo-headers like :status or :path from DevTools are accepted. Lines with no colon, a space before the colon or characters that are not allowed in a field name are shown in red and skipped, so you can see what was ignored. When building the JSON, names are matched case-insensitively and repeated fields are joined with a comma and space, which RFC 9110 says is equivalent to sending them separately, so two Vary lines become one. Set-Cookie is the exception: cookies cannot be comma-joined, so repeated Set-Cookie lines become an array. The tool does not explain individual headers, audit security headers or break Cache-Control and CSP into directives; it only parses. Everything happens in your browser, which matters because pasted headers often contain cookies and Authorization tokens. Here is a quick example. Paste three lines: HTTP/2 200, then Set-Cookie: a=1, then set-cookie: b=2. The first line is greyed out as a status line. The JSON comes back with a single Set-Cookie key holding the list ["a=1", "b=2"], using the spelling it saw first. Now paste Bad Header: x. That line turns red, because a space inside a field name breaks the token rule in RFC 9110, and it never reaches the JSON. One honest limit: a status or request line is only recognised when it is the first non-empty line, so a second response pasted below the first shows its status line as invalid. Also, the parser does not check header values at all, so a broken date or a malformed cookie passes straight through.
Backend and API developers who copy headers out of curl or DevTools and need them as clean JSON for a test, a mock or a bug report. The tool runs entirely in your browser, so your data never leaves your device.
02How to use HTTP Header Parser
- Paste raw headers, one Name: value per line; a leading status or request line is fine
- Read the parsed table; start lines are greyed and invalid lines are shown in red
- Check the JSON output, where repeated names are merged and Set-Cookie stays a list
- Click Copy JSON
03Worked examples
- Input:
HTTP/2 200 content-type: text/html Set-Cookie: a=1 set-cookie: b=2 - Result:
{ "content-type": "text/html", "Set-Cookie": ["a=1", "b=2"] } - The status line is recognised and left out of the JSON, and repeated Set-Cookie headers stay a list under the first spelling seen.
- Input:
Accept: text/html accept: application/json - Result:
{ "Accept": "text/html, application/json" } - Other repeated headers are matched case-insensitively and joined with a comma and space.
- Input:
X-Long: part one part two Bad Header: x nocolon - Result:
{ "X-Long": "part one part two" } - An indented line continues the previous value (obsolete line folding); a name with a space and a line with no colon are marked invalid and left out.
- Input:
:status: 200 :path: / Server: nginx - Result:
{ ":status": "200", ":path": "/", "Server": "nginx" } - HTTP/2 pseudo-headers copied from DevTools keep their leading colon.
04Common use cases
- Turning curl -i output into a JSON object for a test fixture or mock response
- Spotting duplicated headers (two Cache-Control or Vary lines) that a proxy or framework added
- Comparing request headers from DevTools between a working and a failing call
- Checking a hand-written header block for lines a server would reject
- Building the headers object for a fetch or axios call from a request you captured in the browser
- Finding why a proxy rejects a request by spotting a header name with a stray space before the colon
05Tips
- Cache-Control: no-cache does not mean do not cache. It means revalidate before reuse, and no-store is what prevents storage
- Header names are case-insensitive, and HTTP/2 and HTTP/3 send them in lower case, so do not compare names with a case-sensitive string match
- A Server header such as Apache/2.4.41 (Ubuntu) advertises your exact version; consider trimming it in production
- Scrub cookies and Authorization values before sharing parsed headers in a public issue
06Related concepts
RFC 9110, RFC 9112, Set-Cookie, HTTP/2 pseudo-headers.
Frequently Asked Questions
What is HTTP Header Parser?
HTTP Header Parser is a free, browser-based developer tool on AIDToolStack. Parse and analyze HTTP request and response headers. It requires no installation or sign-up and works entirely in your browser.
Is HTTP Header Parser free to use?
Yes. No sign-up, no fees and no usage cap.
Does HTTP Header Parser store my data?
No. It runs in your browser; nothing is uploaded.
Cheat sheet
- curl Cheat Sheet: Requests, Headers, JSON, Auth and Timing
- .htaccess Cheat Sheet: Redirects, RewriteRule, Headers and Access
- HTTP Caching Cheat Sheet: Cache-Control, ETag and CDN Rules
- HTTP Status Codes Cheat Sheet: What Each Code Means and When to Send It
- MIME Types Cheat Sheet: Content-Type, Sniffing and Magic Bytes
- Security Headers Cheat Sheet: CSP, HSTS, Frame and Cross-Origin Policies