Skip to content
QuickTool logoQuickTool

HTTP Header Parser

Parse raw HTTP headers into a list

Start

[
  {
    "name": "content-type",
    "value": "application/json"
  },
  {
    "name": "cache-control",
    "value": "no-cache"
  }
]

Description

The HTTP Header Parser converts raw header blocks into a structured list that’s easy to scan, copy, and reuse. Paste headers from cURL, Postman, browser devtools, or server logs and the tool will normalize names and combine duplicates if you want. This is useful for debugging caching, cookies, authentication, and content negotiation.

You can choose to lowercase names for consistency and merge duplicates into a comma‑separated value as allowed by the HTTP specification. Everything runs locally in your browser—safe for everyday debugging snippets.

Key features

  • Fast parsing of Header: Value lines, tolerant to spacing
  • Options to lowercase names and merge duplicates
  • Copy output JSON or just header names
  • Empty and error states that guide you to valid input

Common use cases

  • Debugging cache behavior with Cache-Control and ETag
  • Inspecting cookies and Set-Cookie attributes
  • Checking content types, encodings, and languages

Privacy & security: everything runs in your browser; do not paste sensitive tokens you wouldn’t keep on your own device.

How to Use

  1. Paste raw headers into the left input panel.
  2. Toggle “Lowercase names” and “Merge duplicates” as needed.
  3. Review the JSON list on the right for correctness.
  4. Click “Copy Output” to copy the parsed headers.
  5. Use “Copy Names” to copy only header names for allowlists.
  6. Use “Sample” to load example headers and verify behavior.

Tips

  • Trim noise like leading status lines; the parser expects Header: Value per line.
  • Some headers are not mergeable (Set-Cookie); disable merging if accuracy matters.
  • Lowercasing helps when comparing across systems with different casing styles.

Troubleshooting

  • Output is empty → Ensure each line contains a colon separating name and value.
  • Values collapsed unexpectedly → Turn off “Merge duplicates” to keep lines separate.
  • Names look inconsistent → Enable “Lowercase names” for consistency.

Example

Example 1: Simple parse

Input:

Content-Type: application/json
Cache-Control: no-cache

Output:

[
  { "name": "content-type", "value": "application/json" },
  { "name": "cache-control", "value": "no-cache" }
]

Lowercasing is enabled, so names are normalized for comparisons.

Example 2: Merge duplicates

Input:

Accept: text/html
Accept: application/json

Output (merge on):

[
  { "name": "accept", "value": "text/html, application/json" }
]

Duplicate names are collapsed into a single comma‑separated value.

FAQ

Is this local and safe?

Yes. The parser runs entirely in your browser; no data leaves your device.

Why is my output empty?

Lines without a colon are ignored. Ensure each line is Name: Value.

Should I merge duplicates?

It depends. Many headers can be merged, but Set-Cookie should usually remain separate.

Can I copy only header names?

Yes. Use “Copy Names” to copy a newline‑separated list for whitelists or documentation.

Will it handle large blocks?

Yes. Parsing is lightweight; rendering very large outputs may take a moment.

Does casing matter?

HTTP/1.1 treats names as case‑insensitive. Lowercasing helps when diffing across systems.