HTTP headers parser
Turn a raw block of HTTP headers into JSON, explain the well-known ones and audit security headers.
Input
Result
Fill in the input and press Run.
Your input is processed in memory and then discarded. It is not stored or logged. Even so, don't paste live passwords or keys into any online tool.
Use it from code or an agent
curl -s https://setget.net/v1/tools/http-headers-parse \
-H 'Content-Type: application/json' \
-d '{"input":{"text":"HTTP/1.1 200 OK\nContent-Type: text/html; charset=UTF-8\nCache-Control: max-age=600"}}'
import json, urllib.request
body = {'input': {'text': 'HTTP/1.1 200 OK\nContent-Type: text/html; charset=UTF-8\nCache-Control: max-age=600'}}
request = urllib.request.Request("https://setget.net/v1/tools/http-headers-parse", json.dumps(body).encode(),
{"Content-Type": "application/json"})
print(json.load(urllib.request.urlopen(request))["result"])
const response = await fetch("https://setget.net/v1/tools/http-headers-parse", {
method: "POST",
headers: {"Content-Type": "application/json"},
body: JSON.stringify({"input":{"text":"HTTP/1.1 200 OK\nContent-Type: text/html; charset=UTF-8\nCache-Control: max-age=600"}}),
});
console.log((await response.json()).result);
Tool: run_tool
Arguments:
{
"slug": "http-headers-parse",
"input": {
"text": "HTTP/1.1 200 OK\nContent-Type: text/html; charset=UTF-8\nCache-Control: max-age=600"
}
}
{
"input": {
"text": "HTTP/1.1 200 OK\nContent-Type: text/html; charset=UTF-8\nCache-Control: max-age=600"
}
}
Endpoint: POST /v1/tools/http-headers-parse. Over MCP: run_tool with slug: "http-headers-parse".
Machine-readable: input schema, Markdown. Connect an agent.
Inputs
| Name | Type | Required | What it does |
|---|---|---|---|
text |
string | yes | The raw headers, as copied from curl -i or the browser developer tools. |
audit |
boolean | no | List common security headers that are missing. Default: false. |
Examples
Input
{
"text": "HTTP/1.1 200 OK\nContent-Type: text/html; charset=UTF-8\nCache-Control: max-age=600"
}Result
{
"start_line": {
"type": "response",
"version": "1.1",
"status": 200,
"reason": "OK"
},
"count": 2,
"headers": {
"content-type": "text/html; charset=UTF-8",
"cache-control": "max-age=600"
},
"explained": {
"content-type": {
"meaning": "The format of the body, and for text its character set.",
"media_type": "text/html",
"charset": "utf-8",
"boundary": null
},
"cache-control": {
"meaning": "How browsers and shared caches may store and reuse the response.",
"directives": [
{
"name": "max-age",
"value": 600,
"meaning": "The response is fresh for 10 minutes. Caches may reuse it without asking the server during that time."
}
],
"summary": "Browsers may reuse it for 10 minutes without contacting the server; shared caches such as CDNs may reuse it for 10 minutes.",
"warnings": []
}
},
"skipped": [],
"audit": null
}Security header audit
Input
{
"text": "x-frame-options: DENY\nx-content-type-options: nosniff\nreferrer-policy: no-referrer",
"audit": true
}Result
{
"start_line": null,
"count": 3,
"headers": {
"x-frame-options": "DENY",
"x-content-type-options": "nosniff",
"referrer-policy": "no-referrer"
},
"explained": {
"x-frame-options": {
"meaning": "Whether other sites may show this page inside a frame."
},
"x-content-type-options": {
"meaning": "With \"nosniff\", browsers do not guess a different content type."
},
"referrer-policy": {
"meaning": "How much of the page address is sent to other sites in the Referer header."
}
},
"skipped": [],
"audit": {
"present": [
"X-Content-Type-Options",
"X-Frame-Options",
"Referrer-Policy"
],
"missing": [
{
"header": "Strict-Transport-Security",
"why": "Tells browsers to use HTTPS only. Without it a visit can be downgraded to plain HTTP."
},
{
"header": "Content-Security-Policy",
"why": "Limits where scripts and other resources may load from, which contains injected code."
},
{
"header": "Permissions-Policy",
"why": "Switches off browser features the page does not need, such as camera or location."
}
]
}
}Questions
- What happens to a header that appears twice?
- Its values are returned as a list, in the order they appeared.
- Does the audit prove a site is secure?
- No. It only reports which widely recommended headers are absent from the text you pasted.
- Is the body read?
- No. Parsing stops at the first blank line after the headers.
Related tools
- Cache-Control explainerExplain a Cache-Control header directive by directive and how browsers and CDNs will treat the response.
cache-control-explain - Cookie parserParse Cookie and Set-Cookie headers into JSON, with warnings about missing security attributes.
cookie-parse - HTTP status code lookupLook up an HTTP status code or search by words: meaning, typical cause and whether to retry.
http-status - curl command converterParse a curl command into method, URL, headers, body and options, with equivalent Python and JavaScript code.
curl-to-json - .gitignore testerCheck which paths a .gitignore file ignores and which line decided each one, using real Git matching rules.
gitignore-test - Card number (Luhn) and IBAN validatorCheck a card number with the Luhn checksum and name its network, or check an IBAN by length and mod-97.
luhn-iban-validate