Skip to content

Security Headers Checker

Grade your site’s HTTP response headers against eight security checks.

Paste your headers — nothing is fetched or uploaded.

Which HTTP security headers should a website set?

Strict-Transport-Security forces HTTPS on every future visit. Content-Security-Policy restricts where scripts may load from and is the strongest defence against cross-site scripting, provided it avoids unsafe-inline. Add X-Content-Type-Options: nosniff, a framing control, Referrer-Policy and Permissions-Policy, and remove version numbers from Server headers.

Understanding your result

Two headers carry most of the value. Strict-Transport-Security forces every future visit onto HTTPS, closing the window where a first plain-HTTP request can be intercepted. A Content-Security-Policy restricts where scripts may load from, which is the strongest practical defence against cross-site scripting — but only if it does not allow unsafe-inline, which re-opens the door it was meant to close. Deploy CSP in report-only mode first and read the violation reports, because a strict policy applied blind will break your own analytics and widgets. The rest are cheap hardening: nosniff stops a browser guessing that an uploaded file is a script, framing controls prevent clickjacking, and removing version numbers from Server and X-Powered-By stops advertising exactly which exploits to try.

Formula and method

Each check carries a weight reflecting its real impact — CSP 25, HSTS 20, framing and content-type 10 each, and so on. A pass earns full weight, a warning half, a fail nothing. The total is expressed as a percentage and mapped to a letter grade.

Assumptions and limitations

This grades headers only. It cannot tell you whether your application validates input, patches its dependencies, or handles authentication safely — a site can score an A here and still be trivially exploitable. It also checks a single response, so headers that vary by route or by content type are not covered, and it cannot verify that a Content-Security-Policy is actually appropriate for the scripts your page loads.

Worked example

A site with HSTS, nosniff, X-Frame-Options and a Referrer-Policy but no Content-Security-Policy and a version-disclosing Server header scores in the C range — solid basics, but missing the header that matters most.

How to use this tool

  1. Run “curl -I https://yoursite.com”, or copy the response headers from your browser’s Network tab.
  2. Paste them into the box.
  3. Work through anything marked with a cross first, then the warnings.
  4. Re-check after deploying to confirm the change landed.

Common mistakes to avoid

  • Shipping a Content-Security-Policy containing unsafe-inline and assuming you are protected.
  • Setting HSTS with a very short max-age, which provides little protection.
  • Enabling HSTS with includeSubDomains before every subdomain supports HTTPS.
  • Treating a good header grade as evidence the application itself is secure.

About the Security Headers Checker

The Security Headers Checker grades a set of HTTP response headers against eight checks covering transport security, content policy, framing, referrer leakage, permissions and version disclosure. Each check returns a pass, warning or fail with specific advice, and the whole set is scored into a letter grade.

Who should use this tool

Developers and site owners hardening a site, and anyone preparing for a security review.

Benefits

  • Weighted scoring, so missing CSP costs more than missing a minor header.
  • Recognises that CSP frame-ancestors supersedes X-Frame-Options.
  • Flags a CSP weakened by unsafe-inline rather than passing it blindly.
  • Works on pasted headers, so staging and authenticated pages can be checked.

Practical use cases

  • Auditing a site before launch.
  • Checking headers on a staging environment that is not publicly reachable.
  • Preparing evidence for a security questionnaire.
  • Confirming a header change actually took effect.

Explore all Security and Privacy tools

Frequently asked questions

How do I get my response headers?

Run “curl -I https://yoursite.com” in a terminal, or open your browser’s developer tools, reload the page and copy the response headers for the main document from the Network tab.

Which header should I add first?

Strict-Transport-Security, because it is a single line with immediate benefit and almost no risk once your site is fully on HTTPS. Content-Security-Policy is more valuable but needs careful rollout.

Is X-Frame-Options still needed with CSP?

CSP frame-ancestors supersedes it in modern browsers, and this checker treats it as satisfied. Keeping both costs nothing and helps very old clients.

Why is unsafe-inline a problem?

It permits inline scripts, which is exactly the mechanism most cross-site scripting attacks use. A policy allowing it provides far less protection than its presence suggests — use nonces or hashes instead.

Does a good grade mean my site is secure?

No. Headers are one layer of hardening. Patching, input validation, authentication and access control matter more, and none of them are visible in a header check.

Share this tool

Free to use — copy the link, share it anywhere, or add the tool to your own website.

Embed this tool on your site (free)

Copy this code and paste it into any web page — it stays free and always up to date: