JS Beautifier

Beautify and format minified or obfuscated JavaScript. Customize indent style and quote style.

Input data is processed in your browser
Data is never sent to a server

Tool

0 chars

or drag & drop a file

What is JS Beautifier?

This tool formats minified or obfuscated JavaScript code into a readable layout.

It runs entirely in the browser, so there’s nothing to install and you can start right away. Configure the indentation style (spaces/tabs) and quote style, then download the formatted code. It’s the counterpart to the JS Minifier tool.

How to Use

  1. Paste your minified JavaScript into the input field and click "Beautify". Click "Sample" to see an example.
  2. Use "Indent" to choose the number of spaces (2, 4, or 8) or a tab.
  3. Enable "Convert to single quotes" to convert double-quoted strings to single quotes.
  4. Disable "Keep semicolons" to remove trailing semicolons.
  5. The line count before and after, along with the increase, is shown in a banner. Click "Download" to save the result as `.beautified.js`.

FAQ

How is this different from Prettier or ESLint?

Prettier and ESLint are full, AST-based formatters. This tool is a lightweight formatter that runs in the browser with no installation required. It's handy when you just want to quickly make minified code readable.

Does it support TypeScript or JSX?

TypeScript-specific type annotations and JSX syntax are not supported. The tool targets plain JavaScript (ES2015+).

Is my data sent to a server?

No. All processing happens entirely in your browser.