HTTP Headers to JSON Converter
Parse raw HTTP request or response headers into JSON while preserving repeated values such as Set-Cookie as arrays.
Start with your input
Edit the example or replace it with your own text.
How to use HTTP Headers to JSON Converter
- Paste one HTTP header block, optionally including an HTTP/1.x request or response start line.
- Parse the block; names are normalized to lowercase and repeated fields remain arrays.
- Inspect the JSON and remove sensitive header values before sharing.
Preserve repeated header fields
Headers can repeat, and combining them with commas is not always valid. Set-Cookie is a familiar example. This parser stores every value in an array, even when a name appears only once. It splits each line at the first colon, so colons inside values remain intact. Header names are validated as HTTP tokens.
Input boundaries and unsupported forms
The tool handles one textual HTTP/1.x-style block. It stops at the empty line before a message body, rejects obsolete folded continuation lines, and does not decode binary HTTP/2 frames or mixed curl verbose transcripts. It records an optional start line separately and checks field syntax, not the semantic rules of every header. Authorization and Cookie contents remain sensitive in the generated JSON.
Example input
HTTP/1.1 200 OK Content-Type: application/json Set-Cookie: session=abc; HttpOnly Set-Cookie: theme=dark
Why are single header values arrays too?
A consistent array shape preserves repetition without changing JSON types when a second occurrence appears.
Is input uploaded?
Processing takes place in your browser. This tool does not send your input or selected files to a conversion API.