Loading...
Loading...
We use cookies to enhance your experience, analyze site usage, and serve personalized content. By clicking "Accept All," you consent to our use of cookies. See our Cookie Policy and Privacy Policy for details.
Minify, beautify, and validate JavaScript code with customizable options
Minifies and beautifies JavaScript code with variable name shortening to reduce size, while allowing preserve names to protect specific identifiers. Removes console.log, debugger statements, and comments, with ES5/ES6+ compatibility modes. Shows a size comparison between original and minified output with percentage savings.
Shipping large JavaScript files hurts page performance, and production builds need aggressive minification. This tool provides fine-grained control over what gets stripped and what gets preserved, with a visual size comparison to quantify savings.
Frontend developers optimizing JavaScript bundles, build pipeline maintainers, and anyone shipping JavaScript to production who needs to reduce file size.
Paste JavaScript code into the input area or upload a .js file
Select Mode: Minify (compress) or Beautify (format)
Toggle options: variable shortening, preserve names list, remove console, remove debugger, remove comments
Choose compatibility: ES5 (e.g. var instead of let/const, avoid arrow functions) or ES6+ (modern JS)
Click Process to generate the output; review the size comparison showing original KB, minified KB, and % savings
Copy the result or download as a .min.js file
Input: 'function add(a, b) { console.log("adding"); return a + b; }' with shorten and remove console. Output: 'function x(a,b){return a+b}'Input: Minified JS from CDN with beautify mode. Output: Formatted and indented JavaScript with proper line breaks.Format, validate, and minify JSON data with syntax highlighting
Format and beautify SQL queries with syntax validation
Format, validate, and minify HTML code online free
Format, beautify, and minify CSS code online free
Dive deeper with our comprehensive guides and tutorials.