Sec-Fetch Request Inspector
Analyze the Sec-Fetch-Site, Sec-Fetch-Mode, Sec-Fetch-Dest, and Sec-Fetch-User request headers. Validates defined values, flags suspicious or impossible combinations, and explains how fetch metadata helps detect cross-site request forgery.
🔒 100% Client-Side & Private — processed locally in your browser. Files never leave your device.
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
Four headers that describe intent
Sec-Fetch-Site says how the request relates to the page that made it — cross-site, same-site, same-origin or none. Sec-Fetch-Mode distinguishes a navigation from a CORS, no-cors, same-origin or WebSocket request. Sec-Fetch-Dest names what the response is for, such as document, script, style, image or iframe. Sec-Fetch-User is ?1 when a navigation was triggered by a real user action.
Why that helps against CSRF
A cross-site request forgery works because the browser attaches the victim’s cookies to a request another site caused. Fetch metadata lets the server ask "did the user actually mean to trigger this?", the exact question CSRF exploits cannot answer. Rejecting a cross-site navigation that carries state-changing parameters, or requiring Sec-Fetch-User on top-level navigations, closes off whole classes of attack.
What the inspector reports
Paste the header lines and each one becomes a row with its value and a plain-English assessment. Values outside the defined set are flagged — a sec-fetch-user that is not ?0 or ?1, a mode or destination the specification does not list — and a cross-site top-level navigation is called out so you can check it against the traffic you expect. Duplicates and malformed lines are reported too.
Why these headers are trustworthy
A script cannot set them: they are on the forbidden header list, so page JavaScript has no way to spoil the signal, and the values are attached by the browser itself. That makes them a useful defense-in-depth layer — but they are not a replacement for authentication and authorization. If no Sec-Fetch headers are present at all, the request likely came from a non-browser client.
Analyzed locally
The parse and the assessment happen in this tab with no request and no lookup table fetched from a server. Header values copied out of a proxy log can be pasted in safely, and the tool works offline.
Questions
What are Sec-Fetch headers?
These request headers describe the request context (site relationship, mode, destination, and user activation) that the browser attaches to a request.
How does fetch metadata help security?
Because these headers are set by the browser and describe intent, servers can use them as a defense-in-depth signal against cross-site request forgery.
Can an attacker forge them?
They cannot be set by scripts due to their forbidden-header status, which is what makes them a trustworthy signal.
Related tools
See category- HTTP Security Headers Analyzer
- CORS Headers Builder & Analyzer
- HTTP Status Code Reference
- :nth-child An+B Evaluator
HTTP Security Headers Analyzer
Review pasted HTTP response headers for common browser security protections.
CORS Headers Builder & Analyzer
Build a full CORS policy or analyze pasted Access-Control-* response headers.
HTTP Status Code Reference
Look up HTTP status codes — what they mean and when APIs return 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.