Advertisement

HTTP Header Formatter

Format raw HTTP headers for free. Paste headers from DevTools or curl, then convert them to JSON, fetch code, curl flags or Python dicts. Runs in your browser.

Raw headers

Paste headers copied from DevTools or a request log.

Formatted output

Waiting for headers.

Advertisement

How header formatting works

Paste raw headers as copied from browser DevTools, curl -v output or a server log. The tool splits each line at the first colon, handles folded continuation lines, and rebuilds the set in your chosen code format.

Duplicate header names are kept as separate entries in table view, and merged naturally in JSON-style outputs where the last value wins.

Which output to pick

JSON object is best for config files and Postman imports. The fetch snippet drops straight into JavaScript, curl flags let you replay the exact request in a terminal, and the Python dict suits the requests library.

Table view is for humans: a clean two-column read of every header, handy when auditing security headers like Content-Security-Policy or Strict-Transport-Security.

HTTP Header Formatter FAQs

How do I copy headers from Chrome DevTools?
Open the Network tab, click a request, find Response or Request Headers, right-click and choose Copy as cURL or copy the raw block, then paste it here.
What about the request line like GET / HTTP/1.1?
Lines without a colon are skipped, so you can paste a full raw request including the request line and blank line; only real headers are parsed.
Does it handle multi-line folded headers?
Yes. Lines starting with whitespace are treated as continuations of the previous header, following the classic HTTP folding rule.
Can I convert headers back to raw text?
The table view plus copy gives you clean pairs, and JSON output can be converted back by most HTTP clients. A dedicated reverse mode is not included.
Are my headers sent to a server?
No. Parsing happens entirely in your browser, so authorization tokens in your headers stay private.
Advertisement