HTTP Header to JSON and Basic Auth Tool

Convert Request/Response header strings into JSON with duplicate keys merged into arrays, and generate Basic Authorization credentials with UTF-8 encoding.

Input headers

Result

About This Tool

The network debugging toolkit contains two frequent utilities: converting request and response header strings into JSON, and generating a Basic Authorization header. The first removes the manual cleanup after copying headers from DevTools or a proxy; the second fixes garbled output when credentials contain non-ASCII characters.

Header conversion skips the HTTP status or request line and splits on the first colon. Duplicate keys, especially Set-Cookie, are merged into arrays so later values no longer overwrite earlier ones. Basic Auth encodes credentials as UTF-8 before base64 and decodes the result back for verification.

Key Features

Duplicate key merging

Repeated fields become arrays, so multiple Set-Cookie lines survive.

Noise lines skipped

HTTP/1.1 status lines and GET request lines are ignored.

UTF-8 safe encoding

Credentials are UTF-8 encoded before base64, so Chinese characters work.

Decode verification

The generated header is decoded back immediately for confirmation.

When to Use It

Document APIs

Turn captured headers into JSON for API docs or test cases.

Generate auth headers

Produce Basic Authorization quickly for Postman or curl.

Analyse Cookie lines

Split multiple Set-Cookie lines into an array and check each attribute.

How to Use It

  1. 1Choose Headers to JSON or Basic Auth.
  2. 2Paste header text or fill in the credentials.
  3. 3Run the conversion.
  4. 4Copy the JSON result or authorization header.

Frequently Asked Questions

Does the key casing change?

No, keys keep their original casing so you can compare with captured traffic character by character.

Is Basic Auth secure?

Basic Auth is only base64 encoding, not encryption. It must be used over HTTPS, otherwise credentials can be decoded directly.

Other Tools

CodeSwordsman

100+ technical tools with browser-local processing — your data never leaves your device. Official Microsoft Store desktop apps: free, ad-free, offline.

Completely Free

© 2026 CodeSwordsman All Rights Reserved

Service Terms | Privacy Policy | Help | Version Updates | About Us

This website uses cookies to ensure you get the best experience on our website. Privacy Policy.