JavaScript Formatter
Beautify minified or messy JavaScript with configurable indentation and brace style, plus a syntax check that parses the code without running it.
Open toolMinify JavaScript with terser: compress, shorten local names and keep licence comments, with exact syntax errors and size savings.
Uses terser, the minifier behind most modern build tools, loaded only when you open this page. Compress removes dead code and simplifies expressions; Shorten names renames local variables and function parameters (global names and object properties are left alone, so your public API keeps working). Licence comments marked /*! or @license are kept by default.
Tick ES module for code with import or export, which also lets top-level names be shortened. Syntax errors are reported with the exact line and column. The page shows the original, minified and gzipped sizes so you can see the real saving. The code is parsed and rewritten, never run. Everything runs in your browser. Your data is never uploaded, logged or stored.
Your code or text
JavaScript (ES2024), ES modules, Classic scripts
Processed in this browser
In-browser. Nothing is uploaded.
Your result
Ready to download or copy
Paste your JavaScript.
Choose compression, name shortening and module mode.
Fix any syntax error, then copy or download the minified file.
Zero-upload architecture
Free, with no sign-up or watermark · Your files stay on your device
Launch the app and add your file. There is nothing to install and no account to create.
Choose compression, name shortening and module mode.
Fix any syntax error, then copy or download the minified file.
Beautify minified or messy JavaScript with configurable indentation and brace style, plus a syntax check that parses the code without running it.
Open toolMinify CSS for production with csso: remove whitespace and comments, shorten colours and values, and merge rules, with before/after and gzip sizes.
Open toolShrink HTML safely: remove comments and collapse whitespace while leaving pre, textarea, script and style contents untouched.
Open toolRemove whitespace from JSON to make it as compact as possible, and see how much space you save.
Open tool