01What is Security Headers Analyzer?
Security headers are cheap to add and easy to get wrong. This analyzer reads the response headers you paste, from curl -sI or the DevTools network panel, and grades each one as pass, warning, fail or note. Every finding that is not a pass comes with a suggested value, mostly taken from the OWASP HTTP Headers Cheat Sheet. Strict-Transport-Security fails if it is missing or has no numeric max-age, which RFC 6797 requires. A max-age of 0 is flagged because it clears the policy. Values under one year get a warning, and so does preload without includeSubDomains or a one year max-age, since the preload list needs both. Content-Security-Policy fails when it is absent and warns when only the Report-Only version is sent. The tool looks at script-src, or default-src when that is missing. It warns on 'unsafe-inline' without a nonce or hash, on 'unsafe-eval', and on sources like * or https:. It also notes a missing base-uri and an object-src that is not 'none'. Framing passes with CSP frame-ancestors or X-Frame-Options DENY or SAMEORIGIN, and warns on the obsolete ALLOW-FROM. X-Content-Type-Options must be nosniff. Referrer-Policy uses the last recognised value in a list and warns on unsafe-url and no-referrer-when-downgrade. Permissions-Policy is checked for presence, with a warning if only the old Feature-Policy is set. COOP, COEP and CORP are shown as notes when missing, because they can break embeds and need testing. X-XSS-Protection other than 0, and Server or X-Powered-By headers that reveal software, get warnings. Here is a worked example. Paste a response with Server: nginx/1.18.0, X-Powered-By: Express, HSTS max-age=86400, X-Frame-Options ALLOW-FROM and Referrer-Policy unsafe-url. The summary reads 0 pass, 2 fail, 7 warnings and 3 notes. CSP and X-Content-Type-Options fail because they are missing. HSTS gets a warning with a suggested max-age of 63072000, which is two years. The nginx version string is flagged as useful to attackers. If a response repeats Strict-Transport-Security, only the first header is used, as RFC 6797 tells browsers to do. If it sends several CSP headers, the tool notes that the browser enforces all of them. The tool only reads the text you paste. It does not fetch your site, follow redirects or test that the policy works in a browser. It also does not check cookies or CORS. It runs entirely in your browser.
Web developers, DevOps engineers and security reviewers checking how a site is configured. The tool runs entirely in your browser, so your data never leaves your device.
02How to use Security Headers Analyzer
- Run curl -sI https://your-site or copy the response headers from DevTools
- Paste them into the input box; the status line is ignored
- Read the report from top to bottom, starting with fails
- Apply the suggested fix values in your server, framework or CDN config
- Paste the new headers to confirm the result
03Worked examples
- Input:
HTTP/1.1 200 OK Server: nginx/1.18.0 X-Powered-By: Express Strict-Transport-Security: max-age=86400 X-Frame-Options: ALLOW-FROM https://a.com X-XSS-Protection: 1; mode=block Referrer-Policy: unsafe-url - Result:
0 pass, 2 fail, 7 warnings, 3 notes [Warning] Strict-Transport-Security: max-age is 86400 seconds (under 1 year). OWASP recommends 63072000 (2 years). [Fail] Content-Security-Policy: Missing. CSP is the main defence-in-depth control against XSS and content injection. [Fail] X-Content-Type-Options: Missing. Browsers may MIME-sniff responses and run content as a different type. [Warning] Frame protection: X-Frame-Options ALLOW-FROM is obsolete. Modern browsers ignore it, so the page can be framed. [Warning] Server: nginx/1.18.0 reveals software and version details useful to attackers. - Output shortened; the full report also covers Referrer-Policy, Permissions-Policy, COOP, COEP, CORP, X-XSS-Protection and X-Powered-By.
- Input:
strict-transport-security: max-age=63072000; includeSubDomains; preload content-security-policy: default-src 'self'; script-src 'self' 'nonce-abc' 'unsafe-inline'; object-src 'none'; base-uri 'self'; frame-ancestors 'none' x-content-type-options: nosniff referrer-policy: no-referrer, strict-origin-when-cross-origin permissions-policy: camera=() cross-origin-opener-policy: same-origin cross-origin-embedder-policy: require-corp cross-origin-resource-policy: same-site - Result:
9 pass, 0 fail, 0 warnings, 0 notes [Pass] Referrer-Policy: Effective policy: strict-origin-when-cross-origin (the last recognised value wins). - 'unsafe-inline' is not flagged here because a nonce is present.
- Input:
Content-Security-Policy: script-src * 'unsafe-inline' 'unsafe-eval' Strict-Transport-Security: max-age=0 Strict-Transport-Security: max-age=31536000; preload - Result:
[Warning] Strict-Transport-Security: max-age=0 tells the browser to forget the HSTS policy for this host. [Warning] Content-Security-Policy: Scripts allow 'unsafe-inline', which lets injected inline scripts run. [Warning] Content-Security-Policy: Scripts allow 'unsafe-eval' (eval, new Function). [Warning] Content-Security-Policy: Script sources include *, which allows scripts from almost anywhere. - Only the first Strict-Transport-Security header is used, as RFC 6797 tells browsers to do.
- Input:
HTTP/2 200 content-type: text/html; charset=utf-8 content-security-policy-report-only: default-src 'self'; report-uri /csp-report x-frame-options: DENY x-content-type-options: nosniff referrer-policy: no-referrer - Result:
3 pass, 1 fail, 2 warnings, 3 notes [Fail] Strict-Transport-Security: Missing. Browsers will not force HTTPS for later visits, so a first plain-HTTP request can be intercepted. [Warning] Content-Security-Policy: Only Content-Security-Policy-Report-Only is set. It reports violations but blocks nothing. [Warning] Permissions-Policy: Missing. - A report-only CSP is treated as a warning because it blocks nothing, and missing HSTS fails. Output shortened; the three cross-origin notes are left out.
- Input:
Content-Security-Policy: script-src * 'unsafe-inline' 'unsafe-eval' Strict-Transport-Security: max-age=31536000; preload X-Content-Type-Options: nosniff X-Frame-Options: SAMEORIGIN - Result:
2 pass, 0 fail, 6 warnings, 5 notes [Warning] Strict-Transport-Security: preload is set, but the hstspreload.org list requires includeSubDomains and max-age of at least 31536000 (1 year). [Warning] Content-Security-Policy: Scripts allow 'unsafe-inline', which lets injected inline scripts run. [Warning] Content-Security-Policy: Scripts allow 'unsafe-eval' (eval, new Function). [Warning] Content-Security-Policy: Script sources include *, which allows scripts from almost anywhere. - Each risky script source in the CSP gets its own warning, and preload without includeSubDomains is flagged. Output shortened to the HSTS and CSP warnings.
04Common use cases
- Checking a site's headers before a security review or penetration test
- Confirming that an nginx or CDN change actually added HSTS and CSP
- Finding Server and X-Powered-By headers that leak version numbers
- Explaining to a teammate why a CSP with 'unsafe-inline' is weak
- Comparing staging and production headers by pasting each in turn
05Tips
- Browsers ignore HSTS on plain HTTP, so copy headers from the HTTPS response
- Test a new CSP as Content-Security-Policy-Report-Only first, then switch to the enforcing header
- Check HTML pages and API responses separately, since servers often send different headers for each
- COEP require-corp can block third-party images and scripts, so roll it out with care
06Related concepts
HSTS, Content Security Policy, clickjacking, MIME sniffing, cross-origin isolation, Referrer-Policy.
Frequently Asked Questions
What is Security Headers Analyzer?
Security Headers Analyzer is a free, browser-based developer tool on AIDToolStack. Paste HTTP response headers and get a pass, warn or fail report on HSTS, CSP, X-Content-Type-Options, Referrer-Policy and COOP/COEP/CORP, with fixes. It requires no installation or sign-up and works entirely in your browser.
Is Security Headers Analyzer free to use?
Yes. No sign-up, no fees and no usage cap.
Does Security Headers Analyzer store my data?
No. It runs in your browser; nothing is uploaded.