Skip to content
Utilizy

Code Formatter

Tidy up JS, TS, CSS, HTML and JSON

Runs in your browser

Input

Options

Result

Result

Nothing formatted yet

Paste code and press format — the result appears here.

Follows Prettier’s default rules. Your code is never uploaded.

Minified code, code pasted out of a chat window, code from a colleague who indents differently — all of it becomes readable after one pass through a formatter. This runs Prettier locally in the page.

How to use

  1. 1 Paste your code.
  2. 2 Choose the language.
  3. 3 Adjust indentation, line width and quote style if you need to.
  4. 4 Press format and copy the result.

Frequently asked questions

Why does it refuse to format my code?

Formatting requires parsing, and parsing requires valid syntax. A missing brace or an unclosed string stops it — the error message points at the position, which is often faster than hunting by eye.

Can it format minified code?

Yes, and the structure comes back perfectly. What does not come back is the names: minifiers rename variables to single letters, and no formatter can recover the originals.

Is my code sent anywhere?

No. Prettier is loaded into the page and runs in your browser, so proprietary code stays on your machine.

Works well with