JavaScript Formatter & Minifier
Beautify minified or messy JavaScript with configurable indentation. Minify JS to reduce file size for production. No data leaves your device.
Unminifying JavaScript
Minified JavaScript is intentionally unreadable — variable names shortened to single letters, all whitespace removed, multiple statements on one line. This tool reverses the process, adding line breaks and indentation to make the code human-readable again. Useful for debugging third-party scripts, understanding how a library works, or reviewing code you did not write.
Minifying for Production
Minified JavaScript loads faster. A typical unminified library might be 80KB; minified it drops to 30KB; minified and gzipped, under 12KB. For scripts loaded on every page, this difference translates directly into faster page loads especially on mobile.
Indent Size and Style
The most common standard is 2 spaces (used by Google, Airbnb and most modern style guides). 4 spaces is the traditional Python and Java convention. Tabs are preferred by developers who use tab-width settings in their editors to personalise the visual indent without affecting the file. The formatter accepts all three.