Neatly Done

JavaScript Formatter

Format JavaScript online with Prettier. Choose indent, semicolons and quotes. Syntax errors show the line and column, and code stays in your browser.

  • Free
  • No sign-up
  • Works on phone and computer

How to format JavaScript

  1. Paste your JavaScript.
  2. Set the indent, semicolons and quotes.
  3. Copy the result or download it.

About this tool

Clean up messy or minified JavaScript with Prettier, the formatter many teams already use. Choose two or four spaces or tabs, add or drop semicolons, and pick quote style. If the code has a syntax error, you see the line and column, so you can fix it quickly. Nothing is uploaded.

Common questions

Does it run my code?

No. It only reads and reprints it. Nothing is run.

Does it support modern syntax and JSX?

Yes. Modern JavaScript including modules, classes, async functions and JSX is supported.

Can it undo minification?

It can lay minified code out again, but short variable names stay short, because the original names are gone.

Is it free to use?

Yes. There's no sign-up, and you can use it as often as you like.

Is my text uploaded anywhere?

No. This tool runs inside your browser, so what you enter stays on your device.

Do I need to install anything?

No. It works in your browser on a computer or a phone.