Loading Techie Utils…

JavaScript Formatter & Beautifier

Re-indent JavaScript and TypeScript source. Free, and runs entirely in your browser — nothing you enter is uploaded, stored or sent to a server.

About JavaScript Formatter

Re-indents JavaScript and TypeScript by block depth so a minified bundle, a snippet pasted from a stack overflow answer, or a compressed inline script becomes readable enough to follow.

It is a formatter for reading, not a build step. When you want opinionated project-wide formatting — quote style, semicolons, line width — Prettier in the repository is the right tool; this is for the code you have in front of you right now.

Where it helps

  • Makes minified or single-line source followable in seconds.
  • Understands JavaScript and TypeScript alike.
  • The editor highlights syntax while you work.
  • Nothing is uploaded, so proprietary source stays local.

Limits

  • Indentation only — it does not rewrite quotes, semicolons or line width the way Prettier does.
  • Minified code stays minified in the ways that matter: mangled names are not recoverable.
  • It does not parse and re-print, so unusual syntax may indent imperfectly.
  • No linting: unused variables and likely bugs are not reported.

Frequently asked questions

Can it recover the original variable names in a bundle?

No. Minifiers discard names permanently. A source map is the only way back, and you need the map file.

Should I use this instead of Prettier?

No. Use Prettier for your codebase; use this for a snippet you have pasted and want to read.

Does it support JSX and TypeScript generics?

They are handled as source text, so the result is readable, though a dedicated parser will lay some constructs out better.

Can it check my syntax?

The editor flags obvious problems, but this is a formatter and not a linter or a type checker.

Related tools

More Web Development tools