ToolHub

HTTP Headers Parser

Parse raw HTTP headers

HTTP headers parser8 headers

Request / status line

GET /api/users HTTP/1.1

Parsed headers

NameValue
Hostexample.com
User-AgentMozilla/5.0
Acceptapplication/json
Accept-Encodinggzip, deflate, br
AuthorizationBearer eyJhbGciOiJIUzI1NiJ9
Cache-Controlno-cache
Set-Cookiesession=abc123; Path=/; HttpOnly
Set-Cookietheme=dark; Path=/

Each line is split at the first colon into a name and a trimmed value. A leading request or status line is detected and shown separately, and duplicate header names like Set-Cookie are kept. Everything runs in your browser.

Overview

Parse raw HTTP headers into a clean table

HTTP headers are simple name and value pairs sent with every request and response. Each one sits on its own line in the formName: value, and the very first line is often a request line like GET /path HTTP/1.1 or a status line like HTTP/1.1 200 OK. Reading a long block of them by eye is slow and error prone.

ToolHub HTTP Headers Parser takes a pasted block of raw headers and lays it out as a tidy table of names and values. It detects a leading request or status line, trims stray whitespace, keeps duplicate headers, and gives every value its own copy button. Everything happens in your browser.

Step-by-step

How to parse HTTP headers

  1. 1

    Paste your raw headers

    Drop a block of headers, one per line, into the input. The table updates as you edit.
  2. 2

    Read the table

    Each line is split at the first colon into a name and a trimmed value. A request or status line is shown separately above the table.
  3. 3

    Copy any value

    Use the copy button on a row to grab a single header value, such as an Authorization token or a Set-Cookie string.

Background

How the parser reads each line

A header line is split at the first colon. Everything before it is the name, everything after it is the value, and surrounding spaces are trimmed. Splitting on the first colon only matters because many values, such as timestamps and URLs, contain their own colons.

Detecting the request or status line

The first non-empty line is treated as a start line when it has no colon, or when it matches a request line shape like GET /path HTTP/1.1 or a status line like HTTP/1.1 200 OK. It is shown on its own so it does not clutter the name and value table.

Why duplicate headers are kept

Some headers legitimately appear more than once. A response can set several cookies with repeated Set-Cookie lines, and some proxies append to Via or Forwarded. The parser preserves every occurrence in order instead of collapsing them into one.

Use cases

When to use an HTTP headers parser

Debugging API responses

Paste headers from your network tab to read content type, caching, and CORS values at a glance.

Inspecting curl output

Drop the headers printed by curl -i or curl -v into a clean table instead of scanning the terminal.

Reviewing security headers

Check for Strict-Transport-Security, Content-Security-Policy, and X-Frame-Options in a response.

Reading cookies

Separate multiple Set-Cookie lines so you can read each cookie and its attributes individually.

Comparing two requests

Parse a working and a failing request side by side to spot the header that differs.

Documenting an integration

Copy individual header values cleanly into a runbook or API reference.

Tips and best practices

  • Paste the headers exactly as captured. Extra blank lines are ignored automatically.
  • Header names are case insensitive in HTTP, so Content-Type and content-type mean the same thing.
  • The value is split at the first colon only, so URLs and timestamps in values stay intact.
  • Keep an eye on duplicate Set-Cookie lines, since each one sets a separate cookie.
  • Redact tokens before sharing parsed output. An Authorization header is a live credential.

Common questions

What format should I paste?

One header per line in Name: value form. An optional request line or status line as the first line is detected and shown separately.

Why is a line missing from the table?

Lines with no colon are not treated as name and value pairs. The first such line becomes the request or status line, and any blank lines are skipped.

Does it handle multiple headers with the same name?

Yes. Duplicate names like Set-Cookie are each shown as their own row in the order they appeared, so nothing is merged or lost.

Are my headers uploaded anywhere?

No. Parsing is pure text processing that runs in your browser. The headers you paste are never sent over the network.

100% private

Privacy and security

Parsing happens entirely in your browser with plain string operations. Headers may contain tokens and cookies, and none of that data is ever uploaded or stored.

Related tools

Frequently asked questions

What input does it accept?

Paste raw headers, one per line as Name: value. An optional request or status line on the first line is detected automatically.

Does it handle duplicate headers?

Yes. Repeated headers like Set-Cookie are all listed.

Is anything uploaded?

No. Parsing happens entirely in your browser.