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.
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
- 1Choose Headers to JSON or Basic Auth.
- 2Paste header text or fill in the credentials.
- 3Run the conversion.
- 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.
