Code Minifier & Beautifier
What this tool does
Paste HTML, CSS, or JavaScript and choose an operation. Minify strips whitespace and comments to produce a smaller file for production. Beautify adds indentation and line breaks so compressed or machine-generated code becomes readable again. Switch the language chip in the toolbar to match your code, and use the Indent chips to control formatting style. All processing runs in your browser β nothing is sent to a server.
How to use
- Select a language: HTML, CSS, or JavaScript.
- Paste your code or click Sample to load an example.
- Choose Minify to compress or Beautify to format.
- The result appears instantly with size stats. Click Copy to export.
Frequently Asked Questions
What is code minification?
Minification removes unnecessary characters from code β whitespace, comments, and newlines β without changing how it works. Smaller files load faster and use less bandwidth.
What is code beautification?
Beautification adds consistent indentation and line breaks to compressed or unformatted code, making it readable for debugging and maintenance.
Which languages does this tool support?
HTML, CSS, and JavaScript. Switch between them using the language chips in the toolbar. The minifier and beautifier algorithms are tuned for each language.
How accurate is the HTML minifier?
The minifier collapses inter-tag whitespace, removes HTML comments (preserving conditional comments like <!--[if IE]>), and trims leading and trailing space. It does not inline external CSS or JavaScript.
Is my code sent to a server?
No. All processing happens in your browser with JavaScript. Your code never leaves your device.