Code Minifier
Minify or format JavaScript, TypeScript, CSS, HTML and JSON.
About Code Minifier
The Code Minifier shrinks JavaScript, TypeScript, CSS, HTML, and JSON down to their smallest form, or reformats already-minified code back into something readable. It shows exactly how many bytes you saved so you can confirm the change is worth shipping.
How to use it
- Choose the source language from the dropdown.
- Paste your code into the left editor.
- Switch between Minify and Format using the tabs.
- Check the size comparison bar for the percentage and byte savings.
- Copy or download the processed output.
Common use cases
- Shrinking a script or stylesheet before shipping it to production
- Pretty-printing someone else's minified vendor code so you can actually read it
- Preparing a compact code snippet to paste somewhere with a size limit
FAQ
Does minifying change how the code behaves?
No. Minification only removes whitespace, comments, and (for JS) shortens identifiers where safe; it produces functionally equivalent, smaller output.
Which languages are supported?
JavaScript, TypeScript, CSS, HTML, and JSON, selectable from the language dropdown.
Can I use this as a code beautifier instead of a minifier?
Yes — switch to the Format tab to turn minified or compact code back into indented, readable code; Minify does the reverse.