Content Security Policy builder
Build a policy from explicit directives and check common unsafe settings.
Bookmark this page
Keep this page handy for next time.
- On a computer
- Press Ctrl + D, or Command + D on a Mac.
- On a phone or tablet
- Open your browser's menu or Share menu and look for Add Bookmark, Bookmark or Add to favourites.
A bookmark saves the page link. Save any tool results separately.
How to use this tool
- Build a policy from explicit directives and check common unsafe settings.
- Adjust the labelled settings, then run the tool. Copy the result or download it as a file.
Things to know
- Processing is local. Supplied code and network requests are never executed. Input and text settings are limited to 5 MiB combined; text settings alone are limited to 1 MiB.
- A policy needs testing with the actual application. This checks supplied text only.
- Policy: 64 KiB and 1,024 directive separators. This text inspection does not evaluate or install the policy.
You might also need
More in web developmentHTML formatter
Format HTML source while preserving whitespace-sensitive content.
Web app manifest generator
Create an installable web application manifest from explicit settings.
Cron builder and explainer
Preview the next occurrences of a five-field cron expression.
Gitignore builder
Combine locally bundled ignore rules for a project.
Meta-tag builder and preview
Generate escaped page and social metadata from your title and description.
Responsive image markup builder
Generate picture and srcset markup from an image naming pattern.
Robots.txt builder and tester
Test whether a supplied robots.txt permits a crawler to visit a URL.
Sitemap builder and validator
Create a sitemap from URL lines or inspect a pasted XML sitemap.
URL parser and builder
Inspect a URL and edit its path, query parameters or fragment.