Beautify and minify HTML, CSS, JavaScript, SQL and XML
Paste hard-to-read code to get it neatly indented, or minify it to make files smaller for production.
About Code formatter
Choose the language and paste code. “Format” indents and breaks lines for readability; “Minify” strips spaces, line breaks and comments so files load faster, showing the size before and after.
This formatter favours speed and handles everyday code; for large projects use a tool such as Prettier in your development setup.
FAQ
Will minifying break my code?
Not if the original is valid, but test before deploying.
More tools here
JSON formatter Base64 encode / decode Image ↔ Base64 URL encode / decode HTML entities Hash generator UUID generator JWT decoder Regex tester Cron generator Unix timestamp converter Markdown preview Text ↔ binary Color converter Contrast checker CSS gradient JSON to CSV CSV to JSON YAML ↔ JSON JSON to TypeScript AES encryption TOTP generator Password strength checker CSS box shadow CSS border radius Tailwind colors Color palette generator Aspect ratio calculator Chmod calculator