JavaScript Formatter
Format or minify JavaScript and TypeScript.
Thanks.Tell us why
Runs on your device. Nothing to upload.
What each option does
- Format
- Minify
- Nothing runs
Questions
Does minified code behave the same?
Yes. Terser only makes changes that keep the behavior: removing dead code, shortening local variable names and simplifying expressions. Global names and property names are never renamed.
Can I un-minify code?
Format re-indents minified code so it’s readable again, but the original names and comments can’t be recovered: they were removed. A source map from the original build is the only way back to them.
What does “Shorten names” do?
It renames local variables and function parameters to single letters, which saves the most space. Turn it off if you need readable names in error messages from the minified code.
Can it minify TypeScript?
No: Terser reads JavaScript. Compile TypeScript to JavaScript first, then minify. Formatting works for both.
Is it free? Do I need an account?
It is free to use and there is nothing to sign up for. There are no watermarks and no daily limits.
Missing something, or not working as it should? Tell us