Text & Docs
JavaScript Formatter & Minifier
Format and minify JavaScript locally with indentation options, ES Module mode, optional local name mangling, syntax diagnostics, copy and download. No execution or uploads.
About this tool
Beautify JavaScript for readability or minify it with a syntax parser. Choose indentation, script mode and optional local name mangling. Code is neither uploaded nor executed.
Best use cases
- Read minified scripts and tidy code snippets for documentation or code reviews.
- Minify scripts while preserving strings, regular expressions and template content.
How to use it
- Paste JavaScript and select indentation and minification mode.
- Select Format or Minify. On failure, review the syntax diagnostic; original input is preserved.
- Copy the result or download a .js file. Each run allows 200,000 characters and can be cancelled.
FAQ
Does formatting execute the code?
No. A local Worker parses the text without an execution or upload service.
Does minification rename variables?
Renaming is off by default. Enable it to shorten eligible local names while keeping function names, class names and object property names. ES Module mode permits top-level optimization and is intended for module code. License comments are retained.
Are TypeScript and JSX supported?
This release targets JavaScript and does not guarantee TypeScript or JSX processing. Successful parsing does not establish runtime correctness.