JavaScript Beautifier

Format and beautify minified or unformatted JavaScript code with proper indentation. Supports 2-space, 4-space, and tab indentation.

Loading tool...

About This Tool

The JavaScript Beautifier takes minified or compressed JavaScript and reformats it into clean, readable code with consistent indentation and line breaks. Paste your JS on the left, pick your preferred indent style, and hit Beautify. The formatter handles braces, semicolons, strings (including template literals), line comments, block comments, and whitespace normalization. The result is properly indented code that's much easier to read and debug than a minified bundle. This tool is perfect for inspecting third-party scripts, debugging production bundles, or quickly cleaning up auto-generated code before reviewing it.