Works on this device
HTTP Header Builder & Validator
Write the header fields of a request or response as rows and get a clean header block and curl options, or paste headers and see what is wrong. Read an Accept or Cache-Control value part by part, and make Content-Disposition and ETag fields. Nothing is sent: the tool only works with the text in this page.
Enter your values
Check these values
Your values are worked out in this browser. They are not sent to a server.
Your result will show here
Fill in the values, then choose the button below them.
Your result
How it was worked out
How to use this tool
- Choose what you want: build a block from rows, check a block you paste, read one value, or make a Content-Disposition or ETag field.
- Type or paste the fields. Say whether they belong to a request or a response, so that the tool can warn about fields that usually belong to the other one.
- Choose the button. The table lists every check with its result and the rule behind it.
- Copy the header block, the curl options or the field, or download them as a text file.
The rules it checks
- Names are tokens: letters, digits and ! # $ % & ' * + - . ^ _ ` | ~ only, with no spaces (RFC 9110, section 5.6.2). Names are not case-sensitive.
- Values may not hold line breaks or control characters, and should be plain ASCII (RFC 9110, section 5.5).
- No white space before the colon, and no obsolete line folding (a line that starts with a space or tab): HTTP/1.1 servers refuse both (RFC 9112, sections 5.1 and 5.2).
- Repeats: a field whose value is a list (Accept, Cache-Control, Vary) may repeat; fields such as Content-Type, Content-Length, Host and Authorization may appear only once. Set-Cookie may repeat; a client sends one Cookie field.
- Values of named fields: Content-Type (type/subtype; parameters), Content-Length (digits), Cache-Control (directives of RFC 9111, RFC 5861 and RFC 8246), Authorization (Basic of RFC 7617, Bearer of RFC 6750, other schemes), Accept with weights q from 0 to 1, Retry-After and dates (HTTP dates), ETag and Content-Disposition.
- Content-Disposition: filename in ASCII, and filename* with the UTF-8 name percent-encoded (RFC 6266 and RFC 8187).
- ETag: a quoted string, W/ before it for a weak tag; If-None-Match matches when the text in quotes is the same (weak comparison, RFC 9110, section 8.8.3.2).
Worked example
The Accept value text/html, application/json;q=0.9, */*;q=0.1 lists text/html first (weight 1), then application/json (0.9), then anything else (0.1).
The Cache-Control value public, max-age=31536000, immutable lets any cache keep the response for 31,536,000 seconds (365 days) and tells browsers not to check it on reload.
For the file name Résumé 2026.pdf the tool writes attachment; filename="R_sum_ 2026.pdf"; filename*=UTF-8''R%C3%A9sum%C3%A9%202026.pdf. Browsers that read filename* show the real name; older ones use the ASCII stand-in.
Limits you should know
- The tool checks the form of the fields. It does not send a request, so it cannot tell how a real server or browser answers. To see the headers of a live site, a tool with a network connection is needed.
- Only some fields have a check of their value syntax; for the others the name and the characters are checked.
- The values of Authorization, Proxy-Authorization, Cookie and Set-Cookie are never shown in the table of checks, but the header block you build holds what you typed.
- For security headers use the CSP Builder & Validator, the HSTS Policy Generator, the Permissions Policy Generator and the Secure Cookie Builder. For a Basic Authorization field, use the Basic Auth Header Generator.