HTTP Headers Inspector
AcceptrequestMedia types the client can handle (e.g., text/html, application/json).
Access-Control-Allow-CredentialsresponseSet to "true" to let the browser expose a cross-origin response to JavaScript when the request carried cookies or HTTP auth.
Access-Control-Allow-HeadersresponseRequest headers the server permits on the real cross-origin request; answers a preflight OPTIONS.
Access-Control-Allow-MethodsresponseHTTP methods the server permits cross-origin (e.g., GET, POST, PUT); answers a preflight OPTIONS.
Access-Control-Allow-OriginresponseOrigin allowed to read the response: a specific origin or *. Cannot be * when credentials are included.
Access-Control-Max-AgeresponseHow many seconds the browser may cache a CORS preflight result before asking again.
Accept-EncodingrequestCompression algorithms the client accepts (gzip, deflate, br).
Accept-LanguagerequestPreferred languages for the response (e.g., en-US,en;q=0.9).
AuthorizationrequestCredentials for authenticating the client (Bearer token, Basic auth, etc.).
Cache-ControlbothCaching directives (e.g., no-cache, max-age=3600, public, private).
ConnectionbothControls whether the network connection stays open (keep-alive or close).
Content-EncodingbothEncoding applied to the body (gzip, deflate, identity).
Content-LengthbothSize of the request or response body in bytes.
Content-Security-PolicyresponseRestricts where scripts, styles, images, and frames may load from — the primary defence against XSS (e.g., default-src 'self').
Content-TypebothMedia type and encoding of the request/response body (e.g., application/json; charset=utf-8).
CookierequestHTTP cookies previously set by the server, sent back with requests.
ETagresponseUnique identifier for a version of a resource, used for caching.
HostrequestDomain name and port of the server being requested. Required in HTTP/1.1.
If-Modified-SincerequestReturns the resource only if modified after the given date (conditional GET).
If-None-MatchrequestReturns the resource only if the ETag does not match (conditional GET).
Last-ModifiedresponseDate and time the resource was last changed.
LocationresponseURL to redirect the client to (used with 3xx responses).
OriginrequestOrigin of the cross-site request, used in CORS preflight requests.
RefererrequestURL of the page making the request (note: misspelling is intentional in the HTTP spec).
Retry-AfterresponseHow long to wait before making another request (used with 429 or 503).
ServerresponseInformation about the server software handling the request.
Set-CookieresponseSets a cookie in the client; may include attributes like HttpOnly, Secure, SameSite.
Strict-Transport-SecurityresponseForces HTTPS by telling browsers not to use HTTP for a given duration (HSTS).
Transfer-EncodingbothEncoding for the message body (chunked, compress, deflate, gzip, identity).
User-AgentrequestString identifying the client browser, OS, and version.
VaryresponseTells caches which request headers affect the response (e.g., Vary: Accept-Encoding).
WWW-AuthenticateresponseAuthentication method the server requires (used with 401 responses).
X-Content-Type-OptionsresponsePrevents MIME-type sniffing; value "nosniff" instructs browser to use declared content type.
X-Frame-OptionsresponseControls embedding in iframes: DENY, SAMEORIGIN, or ALLOW-FROM uri.
X-Forwarded-ForrequestOriginal IP address of the client when passing through proxies or load balancers.
X-Requested-WithrequestIndicates an AJAX request; typically set to "XMLHttpRequest" by JS libraries.
X-XSS-ProtectionresponseLegacy XSS filter directive (deprecated in modern browsers, but still sent for legacy support).
Understand HTTP Headers Inspector
Una referencia de las cabeceras HTTP habituales de petición y de respuesta, más un analizador que convierte un bloque de cabeceras en bruto que usted pegue en pares clave/valor estructurados.
How it works
Las cabeceras HTTP están orientadas a líneas: un nombre, dos puntos y un valor, terminados por CRLF, con una línea en blanco que cierra el bloque. Los nombres no distinguen mayúsculas, y por eso HTTP/2 y HTTP/3 los pasan todos a minúsculas en la red. El analizador de aquí divide cada línea por los primeros dos puntos, de modo que los valores que contienen dos puntos (una URL en Location, una hora en Retry-After) sobreviven intactos, y la referencia que lo acompaña etiqueta cada cabecera como de petición, de respuesta o de ambas. Todo se ejecuta localmente: esta herramienta lee las cabeceras que usted pega, no las obtiene de una URL.
When to use it
- Pegar un bloque copiado de la pestaña Network de DevTools o de la salida de `curl -i` para leerlo como una lista estructurada
- Comprobar qué directivas de Cache-Control se están enviando realmente antes de culpar a la CDN de una respuesta obsoleta
- Consultar qué cabeceras de seguridad debería llevar una respuesta (Strict-Transport-Security, X-Content-Type-Options, X-Frame-Options) y qué hace cada valor
- Confirmar si una cabecera que esperaba — Vary, ETag, Access-Control-Allow-Origin — está presente siquiera
Watch out for
- Esta herramienta no consulta ninguna URL. Explica y analiza las cabeceras que usted aporta; para capturar cabeceras reales, use `curl -I`, la pestaña Network de DevTools o el cliente REST.
- Los nombres de cabecera repetidos son legales y significativos. Una respuesta puede llevar varias líneas Set-Cookie; una vista plana de clave/valor conserva solo la última de un nombre repetido, así que revise el bloque en bruto cuando desaparezcan cookies.
- La falta de ortografía de "Referer" está en la especificación original y es permanente. Referrer-Policy, añadida mucho después, se escribe correctamente: usar la grafía equivocada en cualquiera de las dos no hace nada, en silencio.
- X-XSS-Protection está muerta. Los navegadores modernos la ignoran o la han eliminado, y un valor distinto de cero era en sí mismo explotable; su sustituto es una Content-Security-Policy.
Frequently Asked Questions
¿Qué es la cabecera Cache-Control?
Cache-Control indica a los navegadores y a las CDN cómo comportarse con la caché. Valores clave: no-cache (revalidar antes de usar la caché), no-store (no cachear nunca), max-age=3600 (cachear 1 hora), public (cacheable en CDN), private (solo navegador), immutable (no revalidar nunca, para recursos versionados).
¿Qué cabeceras hacen falta para CORS?
Para peticiones simples: Access-Control-Allow-Origin: * (o un origen concreto). Para peticiones con preflight (POST/PUT o cabeceras personalizadas): además Access-Control-Allow-Methods, Access-Control-Allow-Headers y, opcionalmente, Access-Control-Max-Age. Las peticiones con credenciales necesitan Access-Control-Allow-Credentials: true.
¿Qué es la cabecera Strict-Transport-Security?
HSTS (HTTP Strict Transport Security) indica a los navegadores que se conecten solo por HTTPS durante un tiempo determinado: Strict-Transport-Security: max-age=31536000; includeSubDomains. Tras una sola visita por HTTPS, los navegadores rechazan el HTTP simple durante un año. Úsela con cuidado: HTTPS debe funcionar antes de activarla.
How to Use HTTP Headers Inspector
- Paste or type your input in the input area above.
- The tool processes your input automatically or click Run.
- Copy or download the result using the action buttons.
- Use Ctrl+Enter to run quickly from the keyboard.