What are HTTP headers?
HTTP headers are name and value pairs sent with every web request and response, carrying information beyond the content itself: what formats are accepted, how long to cache, who is logged in, which sites may read the data, and how the browser should protect the page.
This reference explains about fifty of the most useful headers in plain words and marks whether each is sent by the client, the server or both. Search by name or topic, filter by direction, and copy a header's exact name.
How to use the HTTP headers reference
1.Search
A header name, or a topic like cache, cors or cookie.
2.Filter
Request, response, or both.
3.Copy
Copy the exact header name.
Example: caching a logo for a year
Headers for a versioned image file:
- Cache-Control
- public, max-age=31536000, immutable
- ETag
- "a1b2c3" for cheap revalidation
- Content-Type
- image/svg+xml
Browsers keep the file for a year and never re-download it.
Headers that matter most
Caching is controlled by Cache-Control, with ETag and Last-Modified enabling cheap 304 responses. Cookies are set with Set-Cookie, where HttpOnly, Secure and SameSite protect them. CORS headers starting Access-Control- decide which other websites may read a response.
Security headers such as Content-Security-Policy, Strict-Transport-Security, X-Content-Type-Options and Referrer-Policy defend against cross-site scripting, downgrade attacks and leaks. Header names aren't case-sensitive, so cache-control and Cache-Control are the same header. HTTP/2 and HTTP/3 send them in lowercase, which is why developer tools often show them that way. A few headers, such as Connection and Transfer-Encoding, only apply to HTTP/1.1.
Frequently asked questions
Why is it spelled Referer?
A typo in the original 1996 specification that stuck.
Can JavaScript read all response headers?
Only safe ones, plus any the server lists in Access-Control-Expose-Headers.
Are X- headers standard?
No. X- marks custom or de facto headers; new ones no longer use the prefix.
How do I see a site's headers?
Open the browser's developer tools, Network tab, and select a request.
Related tools
HTTP status codes
Every HTTP status code with its name and plain-English meaning.
MIME type lookup
Find the MIME type for a file extension, or the extension for a MIME type.
API tester
Send HTTP requests from your browser and inspect status, timing, headers and body.
API request code generator
Build an HTTP request and get cURL, fetch, Axios, Python, HTTPie or PowerShell code.
Query string builder and parser
Parse a URL's query parameters, or build an encoded query string from key = value lines.
User agent parser
Turn user-agent strings into browser, engine, OS, device and bot names.
More Developer tools
JSON & data
CSV tools
Network & system
Web & API
Git & releases
Encoding & security
- Base64 encode & decode
- URL encode & decode
- JWT decoder
- Hash generator
- HTML entity encoder
- Text to binary
- Morse code translator
- Caesar cipher & ROT13
- Random string generator
- Secret key generator
- 2FA code generator (TOTP)
- Encrypt & decrypt text
- Encrypt & decrypt files
- SSH key generator
- Base32 encoder and decoder
- Unicode escape converter
- Nano ID generator
- JWT generator
Text & code
- Regex tester
- Text diff checker
- Cron expression explainer
- Lorem ipsum generator
- Markdown previewer
- Slug generator
- Strip HTML tags
- Unicode character inspector
- URL parser
- Markdown TOC generator
- cURL converter
- Whitespace visualizer
- Markdown link extractor
- Regex escape
- Regex match extractor
- Split text by regex
- HTML, CSS and JS playground
- Mock data generator
- Keyboard event tester
- ASCII table