Minifying JavaScript removes comments, indentation and line breaks without changing what the code does, so files get smaller and pages load faster. Beautifying does the opposite: it re-indents code squashed onto one line so you can read a third-party script or debug it. This tool puts both on one page, together with a simple obfuscator. Paste your code and it shows the original size, output size and compression ratio instantly.
To be upfront, the tool uses lightweight regular expressions rather than parsing your code into a syntax tree as Terser or esbuild do. Minifying removes /* */ and // comments, collapses whitespace and strips spaces around operators. That is handy for small scripts, bookmarklets and embed snippets, but a few cases can break: a string containing “//”, such as a URL like "https://...", is mistaken for a comment; code that relies on automatic semicolon insertion may fail once line breaks are merged; regex literals and template strings can also be affected. Keep the original file and test the output before deploying.
Obfuscation encodes your code as Base64 and wraps it in eval; JSON input is wrapped in JSON.parse instead. That stops people reading the source at a glance, but it only hides it rather than protecting it: anyone can decode it in seconds, the file grows by about a third, and code that uses eval may be blocked by a site’s Content Security Policy. Never put API keys or passwords in front-end code and expect obfuscation to protect them.
For production projects, minify automatically in your build with Vite, esbuild or Terser, which safely shorten variable names and remove dead code. This tool is best for quick one-off snippets, checking how small code can get, or unpacking someone else’s minified code to read it. Everything runs in your browser and your code is never uploaded.