Apps / Text & Developer Tools / JS Minifier & Beautifier

ƒ() JS Minifier & Beautifier

Re-indent JavaScript with a brace-based formatter, or strip whitespace and comments — safely, with no variable renaming or dead-code removal.

Minify here is deliberately "safe whitespace-only minification" — not a full minifier like Terser. It never renames variables, removes dead code, or changes behavior; it only strips comments and collapses whitespace, and it leaves line breaks right after return/break/continue/throw/yield alone so automatic semicolon insertion can't silently change what your code does. Both modes hand-roll a string/template-literal/comment/regex-aware scanner so a // inside a string is never mistaken for a comment.

1. Paste JavaScript

2. Result