Toolative
Back to tools

HTTP Headers Reference

Complete reference for HTTP request and response headers — click any header name to copy it.

47 of 47
StandardAuth

Credentials to authenticate the client with the server.

ExampleAuthorization: Bearer eyJhbGciOiJIUzI1NiIsInR5cCI6IkpXVCJ9...
Use case

Include in every request requiring authentication — APIs, protected routes.

StandardAuth

Credentials to authenticate the client with a proxy server.

ExampleProxy-Authorization: Basic dXNlcjpwYXNz
Use case

Use when routing through a proxy that requires authentication.

StandardCaching

Directives for caching mechanisms in the request.

ExampleCache-Control: no-cache
Use case

Use no-cache to revalidate, no-store to prevent caching entirely.

DeprecatedCaching

Legacy HTTP/1.0 caching directive — superseded by Cache-Control.

ExamplePragma: no-cache
Use case

Only for backward compatibility with HTTP/1.0 proxies. Prefer Cache-Control.

StandardConditional

Makes the request conditional — server returns 304 if not modified since the given date.

ExampleIf-Modified-Since: Wed, 21 Oct 2024 07:28:00 GMT
Use case

Use for conditional GETs to save bandwidth when content may not have changed.

StandardConditional

Server only performs the action if the resource has not changed since the given date.

ExampleIf-Unmodified-Since: Sat, 29 Oct 2024 19:43:31 GMT
Use case

Use with PUT/PATCH to prevent lost updates (optimistic concurrency).

StandardConditional

Conditional on ETag — returns 304 Not Modified if unchanged.

ExampleIf-None-Match: "bfc13a64729c4290ef5b2c2730249c88"
Use case

Use for efficient cache validation — pair with the ETag response header.

StandardConditional

Server performs the action only if the ETag matches the current resource.

ExampleIf-Match: "bfc13a64729c4290ef5b2c2730249c88"
Use case

Use with PUT to prevent overwriting concurrent modifications.

StandardConditional

Sends a range request conditionally — only if resource is unchanged since last fetch.

ExampleIf-Range: Wed, 21 Oct 2024 07:28:00 GMT
Use case

Use when resuming a download to verify the resource hasn't changed.

StandardConnection

Controls whether the network connection stays open after the current transaction.

ExampleConnection: keep-alive
Use case

HTTP/1.1 defaults to keep-alive. Use Connection: close to terminate after response.

StandardConnection

Parameters for persistent connections — timeout and max requests.

ExampleKeep-Alive: timeout=5, max=1000
Use case

Use with Connection: keep-alive to tune persistent connection behavior.

StandardConnection

Asks the server to switch to a different protocol.

ExampleUpgrade: websocket
Use case

Use when initiating a WebSocket connection upgrade from HTTP.

StandardConnection

Transfer encodings the client is willing to accept in the response.

ExampleTE: trailers, deflate;q=0.5
Use case

Use to indicate support for chunked transfer coding with trailers.

StandardConnection

Transfer encoding applied to the request body.

ExampleTransfer-Encoding: chunked
Use case

Use chunked for streaming request bodies of unknown length.

StandardContent

Informs the server about content types the client can process.

ExampleAccept: text/html, application/json;q=0.9, */*;q=0.8
Use case

Set in API clients to declare expected response format (e.g. application/json).

StandardContent

Compression algorithms the client supports.

ExampleAccept-Encoding: gzip, deflate, br, zstd
Use case

Sent automatically by browsers. Set in API clients to enable response compression.

StandardContent

Natural languages the client prefers.

ExampleAccept-Language: en-US,en;q=0.9,fr;q=0.5
Use case

Used for i18n — server selects best matching content language.

DeprecatedContent

Character encodings the client understands. Obsolete — UTF-8 is universal.

ExampleAccept-Charset: utf-8, iso-8859-1;q=0.5
Use case

Rarely needed today since UTF-8 is the universal default.

StandardContent

Media type and character encoding of the request body.

ExampleContent-Type: application/json; charset=utf-8
Use case

Required for POST/PUT/PATCH requests. Always specify charset.

StandardContent

Size of the request body in bytes.

ExampleContent-Length: 348
Use case

Required when not using chunked transfer encoding with a request body.

StandardContent

Compression applied to the request body.

ExampleContent-Encoding: gzip
Use case

Use when sending a compressed request body to the server.

StandardContent

Natural language of the request body content.

ExampleContent-Language: en-US
Use case

Use when sending localized content and the server needs to process it by language.

StandardCORS

Indicates the origin (scheme, host, port) of the request.

ExampleOrigin: https://example.com
Use case

Sent automatically by browsers for cross-origin requests. Used in CORS validation.

StandardCORS

Used in CORS preflight to tell the server which HTTP method will be used.

ExampleAccess-Control-Request-Method: POST
Use case

Sent automatically before non-simple CORS requests as part of the preflight.

StandardCORS

Used in CORS preflight to tell the server which headers the actual request will include.

ExampleAccess-Control-Request-Headers: Content-Type, Authorization
Use case

Sent automatically before CORS requests that include custom headers.

StandardCookie

Sends previously stored cookies to the server.

ExampleCookie: session=abc123; theme=dark; csrf=xy
Use case

Sent automatically by browsers. Used for session management and preferences.

SecuritySecurity

Relationship between request origin and the resource's origin.

ExampleSec-Fetch-Site: cross-site
Use case

Used by servers to distinguish navigation requests from resource fetches.

SecuritySecurity

Fetch mode of the request — navigate, cors, no-cors, same-origin, etc.

ExampleSec-Fetch-Mode: cors
Use case

Enables server-side security policies based on request fetch mode.

SecuritySecurity

Whether the navigation request was triggered by user activation.

ExampleSec-Fetch-User: ?1
Use case

Use to distinguish user-initiated navigations from programmatic ones.

SecuritySecurity

Destination of the request — document, image, script, worker, audio, etc.

ExampleSec-Fetch-Dest: document
Use case

Use to identify what resource type is being requested for CSP policies.

DeprecatedSecurity

Do Not Track — user's preference to not be tracked. Not widely honored.

ExampleDNT: 1
Use case

Respect this preference if received, even though it is non-binding.

StandardRange

Requests only a specific part (byte range) of a resource.

ExampleRange: bytes=0-1023
Use case

Use for resumable downloads, video streaming, or large file partial fetches.

StandardOther

Domain name and optional port of the server. Required in HTTP/1.1.

ExampleHost: developer.mozilla.org:443
Use case

Required in all HTTP/1.1 requests. Enables virtual hosting on servers.

StandardOther

Identifies the application, OS, vendor, and version of the requesting client.

ExampleUser-Agent: Mozilla/5.0 (Macintosh; Intel Mac OS X 10_15_7)…
Use case

Sent automatically by browsers. Avoid relying on it for feature detection.

StandardOther

URL of the previous page that linked to the current request. Intentionally misspelled.

ExampleReferer: https://developer.mozilla.org/en-US/
Use case

Used for analytics and referral tracking. Control with Referrer-Policy.

StandardOther

Controls how much referrer information is included in the Referer header.

ExampleReferrer-Policy: strict-origin-when-cross-origin
Use case

Set as a meta tag or response header to control privacy of referrer data.

StandardOther

Email address of the user controlling the requesting user agent.

ExampleFrom: webmaster@example.org
Use case

Used by bots/crawlers to identify the operator for contact purposes.

StandardOther

Proxy or intermediaries through which the request was forwarded.

ExampleVia: 1.1 vegur
Use case

Added by proxies. Used for debugging multi-hop request routing.

StandardOther

Original client IP address when the request passes through a proxy or load balancer.

ExampleX-Forwarded-For: 203.0.113.195, 70.41.3.18
Use case

Used by load balancers to preserve client IP. Validate carefully — spoofable.

StandardOther

Original Host header when a proxy changes it.

ExampleX-Forwarded-Host: en.wikipedia.org
Use case

Use to preserve the original host when behind a reverse proxy.

StandardOther

Protocol (http/https) originally used by the client.

ExampleX-Forwarded-Proto: https
Use case

Use to detect HTTPS when your app is behind a TLS-terminating proxy.

StandardOther

Standardized header replacing X-Forwarded-* for proxy information.

ExampleForwarded: for=192.0.2.60;proto=https;by=203.0.113.43
Use case

Prefer over X-Forwarded-* headers in new proxy implementations.

StandardOther

Indicates expectations the server must meet to process the request.

ExampleExpect: 100-continue
Use case

Use with large request bodies to check server acceptance before sending.

StandardOther

Limits the number of times the request can be forwarded by proxies.

ExampleMax-Forwards: 10
Use case

Used with TRACE and OPTIONS methods to limit proxy hops.

StandardOther

Indicates the user's preference to reduce data usage.

ExampleSave-Data: on
Use case

Serve lower-quality images and skip non-essential resources when set.

StandardOther

Client Hint providing browser brand and significant version information.

ExampleSec-CH-UA: "Chromium";v="119", "Google Chrome";v="119"
Use case

Use for analytics. Request via Accept-CH response header.

StandardOther

Approximate amount of device RAM in GiB (Client Hint).

ExampleDevice-Memory: 4
Use case

Serve lighter pages and assets on low-memory devices.