Free Security Headers Analyzer

Check website security headers and get improvement suggestions. Free, fast, and works entirely in your browser with no sign-up required.

Updated

Share:
Home/Security Tools/Security Headers Analyzer

Security Headers Analyzer

Analyze HTTP security headers with detailed recommendations, grading, and server configuration examples for Nginx, Apache, Express.js, and Next.js.

Security Headers Analyzer

Demo mode: simulated analysis. Production use requires a backend API.

Enter a URL to analyze its security headers

Frequently Asked Questions

What is the Security Headers Analyzer?

The Security Headers Analyzer is a free online tool that check website security headers and get improvement suggestions. It runs entirely in your browser with no installation or sign-up needed.

Is the Security Headers Analyzer free?

Yes, it is completely free with no registration required.

What headers does it check?

The Security Headers Analyzer checks for Content-Security-Policy, X-Frame-Options, HSTS, X-Content-Type-Options, Referrer-Policy, and other important security headers.

Is my data safe with this tool?

Absolutely. The Security Headers Analyzer processes everything client-side in your browser. No data is uploaded to or stored on any server. Your content remains private on your device at all times.

Does the Security Headers Analyzer work on mobile devices?

Yes, the Security Headers Analyzer is fully responsive and works on smartphones and tablets. You can use it on any device with a modern web browser -- no app download required.

Do I need to create an account to use this tool?

No account or registration is needed. Simply open the Security Headers Analyzer in your browser and start using it immediately. There are no sign-up walls or usage restrictions.

How do I use the Security Headers Analyzer?

Simply enter your input in the provided field, adjust any settings to your preference, and the tool will process it instantly. You can then copy the result to your clipboard or download it.

Which browsers are supported?

The Security Headers Analyzer works in all modern browsers including Chrome, Firefox, Safari, Edge, and Opera. For the best experience, use the latest version of your preferred browser.

What is the difference between Content-Security-Policy and X-Frame-Options?

Both headers limit how a page can be used, but they defend against different attacks. Content-Security-Policy (CSP) controls where a page is allowed to load resources from — scripts, styles, images, fonts, and frames — which makes it the strongest defense against cross-site scripting (XSS) and data injection. X-Frame-Options is narrower: it only controls whether your page can be embedded inside an iframe, which stops clickjacking, where an attacker overlays your site to trick users into clicking. CSP can actually replace X-Frame-Options using its frame-ancestors directive (set to 'none' to block all framing), so modern setups often rely on CSP for both. This analyzer tracks both headers, explains each one's purpose, and maps the specific attacks they prevent on its Reference tab so you can see exactly which protection you are missing.

Why does the analyzer run in demo mode instead of reading my site's real headers?

Browsers enforce a cross-origin security restriction that blocks JavaScript on one site from reading another site's raw HTTP response headers. Because this tool runs entirely in your browser with no backend, it cannot fetch and parse the live headers of an external URL — that would require a server-side request to bypass the cross-origin rule. So the analyzer produces a simulated, illustrative assessment rather than a true live scan. The score, grade, and Present/Warning/Missing statuses are examples, not your real configuration. The genuinely accurate value lies elsewhere: the header reference, the attack-to-header mapping, and the copy-paste server configurations are all correct regardless of the demo scan. Use the demo to learn the landscape, then trust the Reference and Server Configs tabs to harden your actual site.

How is the website security score and letter grade calculated?

The grade is weighted by severity rather than counting every header equally, so the headers that matter most carry the most weight. Critical headers like HSTS, CSP, and X-Content-Type-Options are worth 20 points each, high-severity headers 15, medium 10, and low 5. A header that is fully present earns its full weight, a partially configured one earns half, and a missing one earns nothing; the total is then normalized to a 0–100 percentage. Roughly, 95 and above earns an A+, 90+ an A, 75+ a B, 60+ a C, and anything under 50 lands at D or F, with several plus and minus grades in between. The summary also surfaces how many critical headers are missing, so a single absent HSTS or CSP entry is impossible to overlook. Run a scan to see the weighting in action.

What is the recommended HSTS value and why does it use max-age=31536000?

The recommended Strict-Transport-Security value is max-age=31536000; includeSubDomains; preload. HSTS forces browsers to connect over HTTPS only, blocking protocol-downgrade and man-in-the-middle attacks that exploit an initial insecure request. The max-age is in seconds, and 31536000 equals exactly one year — a long window so the browser keeps enforcing HTTPS between visits. includeSubDomains extends that protection to every subdomain, and preload signals that you want the domain baked into browsers' built-in HSTS preload list, so HTTPS is enforced even on a user's very first visit. This analyzer marks HSTS as a critical header and provides this exact value, ready to copy. Grab it from the tool's Server Configs tab, which generates matching Nginx, Apache, Express, and Next.js snippets you can paste straight into your config.

How do I add missing security headers to Nginx, Apache, or Next.js?

Once you know which headers are absent, the fix is a configuration change, not code. This tool's Server Configs tab generates ready-to-paste header snippets for four common stacks: Nginx using add_header directives, Apache using mod_headers, Express.js via the Helmet middleware, and Next.js using the headers() function in next.config.js. Each block uses the recommended values for every tracked header — for example nosniff for X-Content-Type-Options and a starter Content-Security-Policy — so you do not have to assemble them by hand. Copy the block for your platform, drop it into your server or app config, and reload or redeploy for the headers to take effect. After deploying, verify with your browser's network panel or a server-side header checker, since this analyzer's own scan runs in demo mode. Open the Server Configs tab to copy the snippet that matches your stack.

About the Security Headers Analyzer

The Security Headers Analyzer is a free tool for learning, configuring, and grading the HTTP response headers that protect a website from common browser-based attacks. Enter a URL on the Analyzer tab and the tool walks through the thirteen headers it tracks, assigns each a status of Present, Warning, or Missing, and rolls everything up into a 0–100 score and a letter grade from A+ down to F. It is built for developers, site owners, and security-minded teams who want a clear picture of which protective headers a page should send and exactly how to add the ones that are absent.

A note on accuracy: the analyzer currently runs in demo mode and produces a simulated header assessment, because a browser cannot read another site's raw response headers directly — that needs a server-side fetch to get around the browser's cross-origin restrictions. The score and statuses you see are illustrative. Where the tool delivers real, ready-to-use value is in its header reference, its attack-prevention mapping, and its copy-paste server configurations, all of which are accurate regardless of the demo scan.

The headers it covers and why each one matters

The analyzer tracks thirteen response headers and labels each by severity so you know what to fix first:

  • Strict-Transport-Security (HSTS) — critical. Forces browsers to use HTTPS, blocking downgrade and man-in-the-middle attacks. A strong value is max-age=31536000; includeSubDomains; preload.
  • Content-Security-Policy (CSP) — critical. Restricts where scripts, styles, and other resources may load from, the strongest defense against cross-site scripting (XSS) and data injection.
  • X-Content-Type-Options — critical. Set to nosniff to stop browsers guessing (and mis-executing) a file's MIME type.
  • X-Frame-Options and frame-ancestors — prevent clickjacking by controlling whether your page can be embedded in a frame.
  • Referrer-Policy, Permissions-Policy, Cross-Origin-Opener / Resource / Embedder-Policy, Cache-Control, and a few legacy entries such as the now-deprecated X-XSS-Protection, which the tool flags so you can retire it in favor of CSP.

How the security score is calculated

The grade is weighted by severity rather than treating every header equally. Critical headers are worth 20 points each, high-severity headers 15, medium 10, and low 5. A header that is fully present earns its full weight, a partially configured one earns half, and a missing one earns nothing; the total is normalized to a percentage. Roughly, 95+ earns an A+, 90+ an A, 75+ a B, 60+ a C, and anything under 50 lands at D or F. The summary also surfaces how many critical headers are missing, so a single absent HSTS or CSP entry is impossible to overlook.

Turning the report into a real fix

This is where the tool earns its keep. The Server Configs tab generates copy-paste header snippets for four common stacks — Nginx (add_header), Apache (mod_headers), Express.js (via the Helmet middleware), and Next.js (the headers() function in next.config.js) — using the recommended values for every header. Copy a block, drop it into your config, and reload. The Reference tab pairs each header with a plain-language purpose and maps specific attacks to the headers that stop them: XSS to CSP, clickjacking to X-Frame-Options, MIME sniffing to X-Content-Type-Options, and Spectre-class side-channel leaks to the trio of Cross-Origin policies. You can also export a JSON report of any scan for your own records.

Everything runs in your browser with no sign-up, no installation, and no account. Use the analyzer to understand the landscape, then lean on the configs and reference to harden a real site.