Quickly compress your website code with our free minifier tool. Reduce file size, speed up page loading, and optimize performance without changing functionality
A minifier makes HTML, CSS and JavaScript files smaller by removing what browsers don't need: comments, line breaks, indentation and other extra whitespace. JavaScript is compressed with Terser, which also shortens local variable names. Paste code, and the tool detects the language, minifies it in your browser and shows how much smaller it is.
<style> and <script> blocks are minified too.Savings depend on how the code was written: heavily commented, indented files shrink the most. Servers usually compress files with gzip or Brotli as well, and compression already removes much of the repeated whitespace, so the transfer-size gain after compression is smaller than the raw saving shown here. For JavaScript, Terser's renaming and dead-code removal give gains that compression can't.
Minification is one of many page-speed fixes. Large images, render-blocking scripts and unused CSS usually matter more for Core Web Vitals.
Function.name) can behave differently after minification.No. Minification rewrites the code itself to be shorter. Compression (gzip or Brotli) is applied by the web server to whatever file it sends. They work together: minify the file, then let the server compress it.
Indirectly. Smaller files load faster, and page experience is one of many ranking signals. The effect of minification alone is usually small compared with images and render-blocking resources.
No. Minification runs in your browser; the code isn't sent to PagesTest.
Use the JSON formatter and click Minify. It also validates the JSON at the same time.