Format and beautify JavaScript code
JavaScript Formatter adds line breaks and indentation around braces, brackets, semicolons, and commas entirely in your browser, and its Minify button does the reverse. Both are string- and regex-aware: they never insert line breaks into or alter the contents of quoted strings, template literals, or /regex/ literals, so a comma or semicolon inside a string stays part of that string's value instead of corrupting it.
Is JavaScript Formatter free to use?
Yes, it's completely free with no signup required.
Does it support minified code?
Yes — Format expands minified code by breaking lines at braces, brackets, semicolons, and commas, while leaving string and regex contents untouched.
Can I customize indentation size or style?
No, formatting always uses 2-space indentation — there's no configuration for tab size, quote style, or line length.
Is my code uploaded to a server?
No, both formatting and minifying happen entirely in your browser.