Cache Headers Builder & Analyzer
One tool for every cache-related HTTP header. Pick a family, then build a validated header value from its directives or paste an existing value to inspect it for invalid, duplicate, and conflicting directives. Everything runs locally.
🔒 100% Client-Side & Private — processed locally in your browser. Files never leave your device.
Options
Your result will appear here
Type or paste your input above, adjust the options, then press Run. Tip: press Ctrl+Enter to run, and ? for every shortcut.
How it works
Seven cache fields behind one pair of controls
Pick a header family: Cache-Control, CDN-Cache-Control, Surrogate-Control, Expires, Age, Cache-Status or Vary. Analyze mode parses the pasted value into a table of directive names, values and assessments, one row per directive. Build mode composes a value from the option fields and prints ready-to-paste HTTP. "public, max-age=31536000, immutable" returns three unflagged rows.
When pasting a live header beats re-reading the RFCs
Reach for it when a response misbehaves: a CDN serves last week HTML, an API is refetched on every click, a shared cache stores what you expected to be private. Copy the header from the network panel, pick the family, paste. You see the directives actually sent, not what the configuration file intended.
What the build fields do, and what a zero means
Cache-Control build emits visibility first, then no-store, no-cache, max-age, s-maxage, must-revalidate, immutable and stale-while-revalidate; a zero lifetime omits the directive rather than writing max-age=0, and fractional lifetimes are refused. Elsewhere CDN-Cache-Control and Surrogate-Control read raw directive text and reject invalid, duplicated or empty-valued tokens, Expires demands IMF-fixdate, Age takes a second count, Cache-Status joins name, result, ttl and forwarding reason, and Vary lowercases field names while refusing a wildcard beside names.
What the local checks can and cannot prove
The analyzer flags no-store beside a freshness lifetime, private with public, immutable without max-age, repeated directives, and obsolete or past Expires dates, and refuses input over 100 KB. It cannot say whether the content is safe to cache or whether a CDN honours the field.
Your production headers stay in this tab
Parsing and composing both run in the page, so the pasted values and the generated line never reach a server, which matters when the header came from an internal host.
Questions
Why is this one tool instead of seven?
Cache-Control, CDN-Cache-Control, Surrogate-Control, Expires, Age, Cache-Status, and Vary are all cache-related response fields. The older single-header tools now redirect to this one; their URLs still work.
Does no-cache mean do not store?
No. no-cache allows storage but requires validation before reuse. Use no-store when a response must not be stored.
Can this know whether a response is safe to cache?
No. It can flag suspicious combinations such as public caching with contradictory directives, but cache safety depends on content, authorization, and deployment context.
Does a CDN have to honor these fields?
Only if the CDN supports the field and its documented precedence rules. Treat provider-specific fields as advisory unless the provider documents otherwise.
Related tools
See category- Conditional Request Headers Builder & Analyzer
- HTTP Header Analyzer
- :nth-child An+B Evaluator
- .editorconfig Generator
Conditional Request Headers Builder & Analyzer
Build and analyze ETag, Last-Modified and the If-* request conditions.
HTTP Header Analyzer
Paste any HTTP headers and auto-detect, parse and check every one of them.
:nth-child An+B Evaluator
Parse CSS An+B (:nth-child, :nth-of-type) microsyntax, validate it, and list which child indices it matches.
.editorconfig Generator
Generate an .editorconfig with your indentation, line-ending and charset settings.