JavaScript Formatter & Minifier
Format or minify JavaScript — handy for inspecting bundles or formatting snippets.
About JavaScript Formatter & Minifier
JavaScript Formatter & Minifier reformats JS source. Beautify mode applies consistent indentation, line breaks, and spacing so a minified bundle or a cramped snippet becomes readable. Minify mode collapses the code into a compact form for inline use or a quick size comparison.
Paste your code and pick a direction. Beautify expands a dense one-liner into properly indented blocks with each statement on its own line — useful when you want to inspect what a third-party bundle is actually doing. Minify strips the indentation and comments back out.
The tool reformats code as text and never runs it, so pasting a snippet here is safe even if you do not trust its source. It is not a full compiler: minify removes whitespace and comments but does not rename variables or tree-shake dead code the way a production bundler such as esbuild, Terser, or SWC does — so do not treat the output as build-grade optimization. Modern syntax (arrow functions, classes, async/await, template literals) is supported.
Everything happens locally in your browser. Proprietary or unreleased code is never uploaded or logged.