Code Beautifier & Minifier
Beautify or minify HTML, CSS, JavaScript, and SQL — clean up messy code in one click.
How it works
Beautify messy, minified, or inconsistently indented HTML, CSS, JavaScript, and SQL into readable code, or go the other direction and minify verbose source for production. Switch languages with the tab bar.
- Pick a language (HTML, CSS, JavaScript, or SQL) from the tab bar.
- Paste your code into the input panel, replacing the sample.
- Click Beautify to reformat with consistent indentation, or Minify to strip whitespace and comments.
- Copy the formatted output with the copy button.
Common use cases
- Cleaning up minified vendor code or a copy-pasted snippet before reading it.
- Reformatting a colleague's inconsistently indented pull request for easier review.
- Shrinking a CSS or JS snippet before embedding it inline (e.g. in an email template or CMS field).
- Tidying a raw SQL query pulled from logs or a query builder into something readable.
FAQ
- Will minifying break my code?
- Minification only removes whitespace, comments, and (for JS) shortens where safe — it doesn't change logic. As with any minifier, test the output before shipping it, especially for JavaScript with unusual syntax.
- Does the SQL formatter know my database dialect?
- It applies general SQL formatting conventions rather than dialect-specific parsing, so it works across MySQL, PostgreSQL, SQL Server, and similar dialects for standard statements.
- What's the input size limit?
- There's no hard cap, but very large files (tens of thousands of lines) may be slow to format.