Loading…

How to use CSP Header Generator

Tick the sources you need to allow — scripts, styles, images, fonts, connections — and the tool builds a Content-Security-Policy header value with the matching directives.

Frequently asked questions

Where do I actually apply this header?

Set it as an HTTP response header (Content-Security-Policy) from your server or reverse proxy config — pasting it into HTML alone will not enforce it.

Can I use this file directly on my live site?

Yes, as a starting point — double-check paths, URLs, and directives against your actual domain before deploying.

Does this tool call any external API to generate the file?

No. Everything is built client-side in your browser from the values you enter.

More Dev Config Generators

CODEOWNERS Generator
Generate a GitHub CODEOWNERS file from path patterns and owners with automatic @ prefixing.
FUNDING.yml Generator
Generate a GitHub Sponsors FUNDING.yml with GitHub, Patreon, Ko-fi, Open Collective, and custom links.
Dependabot Config Generator
Generate dependabot.yml v2 for npm, pip, Docker, and GitHub Actions with update schedules.
Commitlint Config Generator
Generate commitlint.config.js with conventional commit rules and a custom allowed type list.
SECURITY.md Generator
Generate a SECURITY.md policy with supported versions, contact email, and disclosure guidelines.
CONTRIBUTING.md Generator
Generate a CONTRIBUTING.md guide with setup, branch, commit, and pull request instructions.
Pull Request Template Generator
Generate a GitHub pull request template with summary, change type checklist, and review checklist.
Issue Template Generator
Generate GitHub bug report or feature request issue templates in Markdown format.
Makefile Generator
Generate a tab-indented Makefile from target and command pairs with an automatic .PHONY line.
Jest Config Generator
Generate jest.config.js with test environment, ts-jest preset, and coverage collection options.
Babel Config Generator
Generate babel.config.json with preset-env, preset-react, and preset-typescript selections.
Vite Config Generator
Generate vite.config.js for React, Vue, or vanilla projects with a custom dev server port.

← View all Dev Config GeneratorsBrowse all 1,100+ tools →