JavaScript Formatter — Beautify JS Code

Indent and reformat minified or messy JavaScript for readability.

Paste JavaScript to reformat it with consistent indentation and spacing, making minified or poorly formatted code readable again.

Your files and text are processed locally in your browser — nothing is uploaded to a server.

JavaScript Formatter tool

How to Use JavaScript Formatter

  1. Paste your JavaScript.
  2. Click Format.
  3. Copy the reformatted code.

Features

  • Consistent indentation
  • Handles modern JavaScript syntax
  • Adjustable indent size
  • Runs entirely in your browser

Frequently Asked Questions

Can this un-minify obfuscated code?

It can reformat spacing and indentation, but it can't recover original variable names that were removed during minification.