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
Uma referência dos cabeçalhos HTTP comuns de requisição e de resposta, mais um parser que transforma um bloco bruto de cabeçalhos colado em pares chave/valor estruturados.
How it works
Cabeçalhos HTTP são orientados a linha: um nome, dois-pontos e um valor, terminados por CRLF, com uma linha em branco encerrando o bloco. Os nomes não distinguem maiúsculas, e é por isso que o HTTP/2 e o HTTP/3 os colocam todos em minúsculas na rede. O parser aqui divide cada linha no primeiro dois-pontos, para que valores contendo dois-pontos (uma URL em Location, um horário em Retry-After) sobrevivam intactos, e a referência ao lado marca cada cabeçalho como de requisição, de resposta ou de ambos. Tudo roda localmente — esta ferramenta lê os cabeçalhos que você cola, ela não os busca em uma URL.
When to use it
- Colar um bloco copiado da aba Network do DevTools ou da saída de `curl -i` para lê-lo como uma lista estruturada
- Conferir quais diretivas de Cache-Control estão de fato sendo enviadas antes de culpar o CDN por uma resposta desatualizada
- Consultar quais cabeçalhos de segurança uma resposta deveria carregar (Strict-Transport-Security, X-Content-Type-Options, X-Frame-Options) e o que cada valor faz
- Confirmar se um cabeçalho que você esperava — Vary, ETag, Access-Control-Allow-Origin — está presente
Watch out for
- Esta ferramenta não busca uma URL. Ela explica e interpreta cabeçalhos que você fornece; para capturar cabeçalhos reais, use `curl -I`, a aba Network do DevTools ou o cliente REST.
- Nomes de cabeçalho repetidos são legais e significativos. Uma resposta pode trazer várias linhas Set-Cookie; uma visão plana de chave/valor guarda só a última de um nome repetido, então confira o bloco bruto quando cookies sumirem.
- O erro de grafia em "Referer" está na especificação original e é permanente. Referrer-Policy, acrescentado muito depois, é escrito corretamente — usar a grafia errada em qualquer um dos dois não faz nada, em silêncio.
- O X-XSS-Protection está morto. Navegadores modernos o ignoram ou o removeram, e um valor diferente de zero era ele próprio explorável; um Content-Security-Policy é o substituto.
Frequently Asked Questions
O que é o cabeçalho Cache-Control?
O Cache-Control orienta navegadores e CDNs sobre o comportamento de cache. Valores principais: no-cache (revalidar antes de usar o cache), no-store (nunca cachear), max-age=3600 (cachear por 1 hora), public (cacheável por CDN), private (só no navegador), immutable (nunca revalidar, para recursos versionados).
Quais cabeçalhos são necessários para CORS?
Para requisições simples: Access-Control-Allow-Origin: * (ou uma origem específica). Para requisições com preflight (POST/PUT/cabeçalhos personalizados): também Access-Control-Allow-Methods, Access-Control-Allow-Headers e, opcionalmente, Access-Control-Max-Age. Requisições com credenciais precisam de Access-Control-Allow-Credentials: true.
O que é o cabeçalho Strict-Transport-Security?
O HSTS (HTTP Strict Transport Security) diz aos navegadores para se conectarem apenas por HTTPS durante um período definido: Strict-Transport-Security: max-age=31536000; includeSubDomains. Depois de uma visita por HTTPS, os navegadores recusam HTTP puro por um ano. Use com cuidado — o HTTPS precisa funcionar antes de ativá-lo.
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.