CSP Formatter
Beautify and parse messy CSP headers for easier reading.
CSP Formatter
Paste a messy Content Security Policy string to format it into a clean, readable structure.
Parsed output will appear here
Why format your CSP?
Content Security Policy (CSP) strings can quickly become very long and difficult to read, especially on complex sites with many third-party integrations (analytics, ads, fonts, widgets).
Because a CSP is sent as a single HTTP header, it is usually minified into one long continuous string separated by semicolons. When debugging XSS issues or auditing a policy, formatting the string into multiple lines (one directive per block) makes it significantly easier for developers to comprehend.
Related Guides
Deepen your understanding with our expert articles.
