Minify JavaScript with Terser, the parser based engine production sites rely on. Compress runs by default, and the mangle option stays off with its warning in view.
Your files are processed in your browser, on your own device. Nothing is uploaded to a server.
A JS Minifier shrinks JavaScript by removing whitespace and comments and rewriting what a parser can prove is safe to shorten. ToolPeko runs Terser in your browser, the same engine class that production build tools use, free and with no upload. Press the button and the minified code comes back.
Terser parses your code into a tree before it touches anything, which is the only safe way to minify JavaScript. Nothing runs while you type. Paste the code, set the two options, press the button, and the engine reads, compresses and prints the result in one pass.
Syntax errors surface as errors. If the code does not parse, the tool reports the parser message instead of handing back something half-processed that would fail later in a stranger place.
Small sites without a build pipeline are the main case. A hand-rolled script for a static site, a snippet living in a WordPress child theme, or a landing page script edited by hand has no bundler watching over it. Paste it here, minify it, and ship the compact file while your original stays readable.
Inlined code is the second case. A script that sits inside the HTML of a page adds its full weight to the critical download, and a script stored in a CMS field often has a size limit breathing down its neck. The CSS Minifier and the HTML Minifier finish the rest of that page the same way.
The stakes are higher than they look. Pattern-and-replace minifiers corrupt real JavaScript: a regex literal misread as division, a template string cut in half, a missing semicolon joining two lines into one statement. Parsing first is what keeps minified code behaving like the code you wrote, and that is the whole reason this tool is built on Terser. To read a minified file instead, the JS Beautifier spreads it back out.
Mangle renames local variables only. It never renames object properties, and it cannot know about names your code builds as strings. Code that uses eval, reads its own function names, or depends on parameter names can break with mangle switched on. The warning sits beside the option for that reason. Switch it on when the extra saving matters, then test the result like you would test any release.
Minified code is smaller, not secret. Anyone can open a minified file, and a beautifier makes it readable again in seconds. Minification is not obfuscation, it is not encryption, and it protects nothing. An API key or a private algorithm placed in client-side code is exposed no matter how small the file gets, so keep secrets on a server where they belong.
No source map is generated here. Keep your original file as the source you debug and edit, and treat the minified output as a build product. If the shipped code throws an error in production, the readable original is what you will want open on your screen.
Terser runs inside your browser tab. Your code is never sent to a ToolPeko server, never stored and never read by anyone here. That covers the code you would least want on a stranger’s server: admin helpers, internal dashboard logic and features that have not launched yet. There is no account, no sign-up and no job counter. Paste a snippet or a full application file and the terms stay the same.
It is the real thing. The engine is Terser, which parses your code into a tree and only then rewrites it. Whitespace strippers that work by pattern replacement corrupt JavaScript that contains regex literals or template strings.
Mangle renames local variables and function names to shorter ones for extra savings. It stays off by default because code that depends on its own names, through eval or name lookups, can break when those names change.
The compress pass only applies changes the parser can prove safe. Mangle is the exception that earns its warning label, so test after switching it on, the way you would test any release.
Yes. Minified code is compact, not hidden, and a beautifier restores readable formatting in seconds. Never ship secrets, keys or private logic in client-side code on the strength of minification.
No source map is generated. Keep your original file as the source you edit and debug, and treat the minified output as the build product you ship.
Minifying runs on the button press, on purpose. A large file is parsed and processed once, when you ask, instead of being re-parsed on every keystroke.
Same rules as this one: free, in your browser, with nothing uploaded.
Paste messy JSON, get it neat and valid.
Check JSON and find the exact line that breaks it.
Squeeze JSON down to one tight line.
Open JSON as a tree you can fold and explore.
JSON rows turned into a CSV a spreadsheet can open.
A CSV file turned into clean JSON objects.
JSON rewritten as YAML for config files.
YAML config turned into JSON you can use in code.