1. Home
  2. Developer tools
  3. HTTP Headers to JSON

HTTP Headers to JSON

Copy headers from the browser, curl -v or a log and turn them into a JSON object. The tool recognises a request line or status line, splits cookies, reads Set-Cookie attributes and warns about oddities.

Free, no sign-up. Runs in your browser: nothing is uploaded.

How to use HTTP Headers to JSON

  1. Paste the raw headers.
  2. Choose lower-casing and how to treat repeated headers.
  3. Copy the JSON and check the summary.

Features

  • Detects request, response or plain header lists
  • Method, path, query and HTTP version extracted
  • Cookie header parsed into name and value pairs
  • Set-Cookie attributes parsed and never merged
  • Repeated headers joined or kept as an array
  • Removes curl’s > and < markers

Supported formats

Input

  • Raw headers
  • curl -v output

You get

  • JSON

Private by design

Everything you enter is processed by your browser on this device. Nothing is sent to openWorkstand or anyone else, so the HTTP Headers to JSON is safe for private and work data. After you have used it once while online, it also works without an internet connection. How local processing works

Good to know

  • Only HTTP/1.x style text is read; binary HTTP/2 frames are not.
  • Header values are not validated against each header’s own syntax.

Guide

Parsing raw HTTP headers into JSON

When something goes wrong between a browser, a proxy and a server, the headers tell the story. They show up in developer tools, in curl output, in logs and in bug reports as blocks of text, one header to a line. Converting them to JSON makes them searchable, easy to compare and ready to paste into a test or a script.

What the page recognises

Paste a block of text and the page looks at its first line. A line such as POST /api/v2/orders?id=42 HTTP/1.1 is a request line, and the page extracts the method, the path, the query string as an object and the protocol version. A line like HTTP/1.1 404 Not Found is a status line, and the status code and reason are shown. If neither pattern matches, the whole text is treated as a plain list of headers. Lines that begin with > or < are cleaned, which is how curl -v marks outgoing and incoming headers.

Header names and repeated headers

Header names are case-insensitive under RFC 9110, so Content-Type and content-type are the same field, and lower-casing them gives JSON keys that are easy to look up. HTTP/2 even requires lower case. When a header appears several times, the standard says the values can be combined into one comma-separated list, and the default option does that. Choose “Keep as an array” if you want each occurrence separately, which preserves the structure when a value can itself contain commas.

Cookies

A Cookie header holds name and value pairs separated by semicolons, and the page splits it into an object so you can see each cookie. Set-Cookie works differently: each header sets one cookie, with attributes such as Path, Max-Age, Secure and HttpOnly. The page parses them into a name, a value and an attribute object, and does not merge them. Be careful with real cookies and authorisation headers; they can log someone in. This page keeps your text in memory only and never stores or sends it.

Using the page

Paste into the left box. The JSON appears on the right and a summary panel above lists the method, path, query, version or status, the number of headers and any cookies. Warnings appear for lines that are not valid headers, for example a line without a colon, so you can see what was skipped. Options persist in your browser, but the pasted text does not.

A worked example

The Sample button loads a POST request to /api/v2/orders with query id=42 and expand=items. The summary shows the method POST, the path, the query as {“id”:“42”,“expand”:“items”}, the version HTTP/1.1, nine distinct headers and two cookies, session and theme. The two X-Forwarded-For lines are joined into one value, 203.0.113.7, 198.51.100.4, because the default is to join repeated headers. The output keys are lower-case, such as content-type and accept-language.

Limits

The parser reads text in HTTP/1.x style. It cannot read binary HTTP/2 or HTTP/3 frames, so copy headers from developer tools in their text form. It does not validate values against each header’s own grammar, check that required headers are present, or follow redirects. Obsolete line folding is joined, but unusual whitespace is kept as it is. Large dumps work, but the page treats the text as one message, so paste a single request or response at a time.

Checked against the current version of the HTTP Headers to JSON on .

Troubleshooting

The download did not start

Look for your browser’s download bar or icon. Some browsers ask once before a site may download files; allow it and click the button again.

Frequently asked questions

Why does the page not join several Set-Cookie headers into one comma-separated line?

Because the comma is allowed inside a cookie attribute, for example in the weekday-and-date format of the Expires attribute. Joining would make the line impossible to split back correctly, so each Set-Cookie header stays a separate entry.

Do spaces and the order of headers matter?

Spaces around the colon are ignored. Order matters only for repeated headers, where the sequence of values can change the meaning, and the page keeps them in the order they appeared.

Are header names case-sensitive?

No. HTTP header names are case-insensitive, so Content-Type and content-type are the same field. HTTP/2 requires lower case.

Why are Set-Cookie headers kept separate?

A cookie’s expiry date contains a comma, so joining several Set-Cookie headers with commas would make them impossible to split correctly.

Keep working with the result

After you download, choose “Save to Workstand” to keep the result in a folder on your computer, attach it to a project and create a follow-up task. It is saved by your browser, not uploaded.