How it works
Compresses code by removing unnecessary spaces, line breaks, and comments to reduce its size. A lighter file downloads and processes faster, which is key for web performance.
It supports several content types —JavaScript, TypeScript, HTML, SVG, CSS, JSON, and XML, plus a generic mode— and applies the appropriate minifier to each to compress without breaking the syntax.
All processing runs in your browser: the code is not uploaded to any server. Minification preserves the code's behavior but leaves it meant for production, not for editing by hand.
Examples
function sum(a, b) {
// suma dos números
return a + b;
}function sum(n,u){return n+u}Comments and spaces are removed, and local names are shortened to reduce the size.Use cases
- Reduce the size of JS or CSS files to speed up the site's load.
- Compress SVG or HTML before embedding them in a page.
- Pack a configuration JSON into a single line for transport.
- Prepare lightweight snippets to copy into emails or templates.
Frequently asked questions
What types of code can I minify?
JavaScript, TypeScript, HTML, SVG, CSS, JSON, and XML, plus a generic mode for text. The tool chooses the appropriate minifier based on the type you select.
Does minification change the code's result?
No. Minified code behaves the same as the original; it only loses the readable formatting. For JavaScript it may shorten local variable names, but without altering the logic.
Can I re-format the minified code?
You can reindent it with the formatters in this section to restore readability, but the shortened names and removed comments are not restored.
Is my code uploaded to a server?
No. All minification happens in your browser; the code never leaves your computer.