Formatters tool
✦ Browser-firstJavaScript Beautifier
Format or minify JavaScript.
Light minify: removes comments and whitespace but does not rename variables.
About this tool
Re-indent JavaScript for readability, or do a light minify that strips comments and extra whitespace. Strings, template literals, regular expressions and comments are handled safely.
How to use the JavaScript Beautifier
- Paste JavaScript.
- Choose Beautify or Minify.
- Copy the formatted code.
Common uses
- Reading minified bundles
- Tidying snippets for review
- Light size reduction
JavaScript Beautifier questions
Is minify the same as a full build tool?
No. It is a light minify that strips comments and whitespace and does not rename variables.
Does it change behavior?
It should not, but always test minified code.
Is my code sent anywhere?
No, it runs in your browser.