ToolHarbor

HTTP Header Formatter

Normalize HTTP headers to Title-Case, convert between raw headers and JSON format.

Features

  • Normalize header names to standard Title-Case format
  • Convert raw headers to JSON object
  • Convert JSON object back to raw headers
  • Skips HTTP status lines automatically
  • Works with headers copied from DevTools or curl
  • Works entirely offline — your headers never leave your browser

How to Use

  1. 1Choose a mode: Normalize, To JSON, or From JSON
  2. 2Paste your headers into the input field
  3. 3Click "Format" to process the headers
  4. 4Copy the formatted result from the output panel

Examples

Normalizing headers

Input

content-type: application/json
authorization: Bearer token123
cache-control: no-cache

Output

Content-Type: application/json
Authorization: Bearer token123
Cache-Control: no-cache
Converting to JSON

Input

Content-Type: application/json
X-Request-Id: abc123

Output

{
  "Content-Type": "application/json",
  "X-Request-Id": "abc123"
}

What Are HTTP Headers?

HTTP headers are key-value pairs sent between a client and server as part of every HTTP request and response. They carry metadata about the communication: content type, authentication credentials, caching directives, cookies, and much more. Understanding and working with headers is a fundamental part of web development and API integration.

Headers are case-insensitive by specification (RFC 7230), but they are conventionally written in Title-Case (e.g., Content-Type, Authorization, Cache-Control). When copying headers from different sources — browser DevTools, curl output, server logs — they may use inconsistent casing. This tool normalizes them to the standard format for clean, consistent documentation.

Converting headers to JSON is useful when you need to use them in JavaScript fetch() calls, Postman collections, API testing tools, or configuration files. The JSON format is also easier to programmatically modify, merge, and version-control. Converting from JSON back to raw headers is the reverse operation for when you need the original text format.

The tool automatically skips HTTP status lines (like "HTTP/1.1 200 OK") that often appear when copying from browser DevTools or curl verbose output. It also handles multiple headers with the same name and preserves the original values exactly as they were — only the header names are normalized.

Everything runs in your browser. Your headers — which may contain authorization tokens, cookies, or internal API endpoints — are never sent to any server.

Frequently Asked Questions

Related Tools