Developer

JavaScript Beautifier / Minifier

Format or minify JavaScript code.

JavaScript / JSON input
Preview

This free JavaScript beautifier and minifier reformats code two ways. Beautify runs your code through the Prettier engine to add consistent indentation, line breaks, quote style and spacing — turning minified or messy code into readable, standards-compliant JavaScript. Minify strips comments and unnecessary whitespace to shrink file size while preserving strings, template literals and regular expressions. The live preview is syntax-highlighted with line numbers so you can read the result at a glance. Choose 2-space, 4-space or tab indentation, single or double quotes, and toggle semicolons. Paste text, upload a file, or drag one in, then copy or download the result.

Related tools