DevNet KitTHE EVERYDAY TOOLBENCH
Network & Security · Local-first

CSP Header Builder / Analyzer Online

Build or audit a Content-Security-Policy header.

Open CSP Header Builder / Analyzer

Free · No sign-up · Browser-based processing

What CSP Header Builder / Analyzer does

Build or audit a Content-Security-Policy header. The utility is designed for quick, focused work without requiring an account or installing another application.

Common uses

  • Troubleshoot network and security configurations
  • Check values before production changes
  • Generate repeatable outputs for documentation

How to use CSP Header Builder / Analyzer

  1. Enter or paste the value you want to process in CSP Header Builder / Analyzer.
  2. Run the tool and review the generated result for the expected format.
  3. Copy or download the result and verify it in the system where it will be used.

Privacy: Runs locally in your browser. Input is not uploaded to the DevNet Kit server.

CSP Header Builder / Analyzer example

Try the tool with this representative input:

default-src 'self'; script-src 'self' https://cdn.example.com; object-src 'none'; base-uri 'self'

CSP Header Builder / Analyzer FAQ

What can I use CSP Header Builder / Analyzer for?

Build or audit a Content-Security-Policy header. It is intended for focused network & security work and produces a result you can review before using elsewhere.

How does CSP Header Builder / Analyzer handle my input?

CSP Header Builder / Analyzer processes the input in your browser and does not upload it to the DevNet Kit server.

What should I verify after using CSP Header Builder / Analyzer?

Check the CSP Header Builder / Analyzer result against the requirements of the destination system, especially syntax, limits and environment-specific behavior.

Inspect duplicate-directive handling before reusing normalized policy text

The example repeats script-src. This normalizer stores directives by name and keeps the last value, so the earlier 'unsafe-inline' value is removed before its limited audit runs. The first output block is therefore not a lossless copy, and it is not a guarantee of equivalent browser enforcement. Review duplicate directives before reusing the result.

The audit checks a few directive-presence conditions and script-source tokens. It does not validate complete CSP grammar, nonce/hash use, fallback interactions or actual browser enforcement. Suggested additions are separate text; they do not update the policy automatically or install a response header. A short issue list does not establish that an application is protected.

Worked example

Input and settings:

default-src 'self'; script-src 'unsafe-inline'; script-src 'self'; object-src 'none'; base-uri 'self'

Expected result or interpretation:

default-src 'self'; script-src 'self'; object-src 'none'; base-uri 'self';

Audit
! Missing frame-ancestors

Suggested additions
frame-ancestors 'self';

Questions about this workflow

What happens to repeated script-src directives in this normalizer?

It keeps the last value by name. The earlier script-src value is removed before the audit, so the example loses its earlier unsafe-inline token. This is not lossless normalization or proof of equivalent browser enforcement.

Do suggested additions install a complete, verified CSP?

No. The limited audit does not validate all grammar, nonce/hash sources, directive fallbacks or browser behavior. Suggestions remain separate text, without updating the policy or installing headers. Review the application context before a separate deployment.

Continue this workflow