JavaScript formatter and minifier
Format or minify JavaScript source without running the program.
Bookmark this page
Keep this page handy for next time.
- On a computer
- Press Ctrl + D, or Command + D on a Mac.
- On a phone or tablet
- Open your browser's menu or Share menu and look for Add Bookmark, Bookmark or Add to favourites.
A bookmark saves the page link. Save any tool results separately.
How to use this tool
- Format or minify JavaScript source without running the program.
- Adjust the labelled settings, then run the tool. Copy the result or download it as a file.
Things to know
- Processing is local. Supplied code and network requests are never executed. Input and text settings are limited to 5 MiB combined; text settings alone are limited to 1 MiB.
- Accepts JavaScript syntax. Minification does not execute the program.
- Source: 2 MiB, 100,000 lexical tokens, 96 nesting levels and at most 96 template interpolations. Output must fit 25 MiB. Formatting/minification never executes supplied JavaScript.
You might also need
More in web developmentCSS formatter and minifier
Format or minify CSS without executing it.
HTML formatter
Format HTML source while preserving whitespace-sensitive content.
cURL and Fetch converter
Turn a supported cURL request into a readable Fetch snippet without sending it.
SQL formatter
Format SQL using the selected database dialect.
Regex tester
Find matches, inspect capture groups and test replacements using JavaScript regular expressions.
Redirect rule generator
Generate permanent redirect rules from one source and destination pair per line.
Chmod calculator
Convert Unix permission modes into readable permissions and a ready-to-copy command.
CIDR range combiner
Combine overlapping or adjacent address ranges into the smallest equivalent CIDR list.
Content Security Policy builder
Build a policy from explicit directives and check common unsafe settings.