Skip to content
Tesserae

Keyboard shortcuts

Focus search
/
This help dialog
?
Run the current tool
Ctrl/⌘ +Enter
Copy the output (when an output is focused)
Ctrl/⌘ +C

Shortcuts are ignored while you are typing in an input, a textarea or a select.

Developer Utilities Beta

Code Beautifier

Paste code and get it tidied by Prettier, the formatter used by millions of projects. Pick a language, or let the tool detect it, then adjust the line width, indentation, quotes and semicolons. Only the parsers for the language you choose are downloaded, and everything runs on your device.

On-device No network Offline-ready

🔒 100% Client-Side & Private — processed locally in your browser. Files never leave your device.

Try:

Options

Auto-detect reads the input and picks a parser, or choose one yourself.

Prettier wraps lines longer than this where it can.

Number of spaces per indent level.

Where Prettier may add a comma after the last item. JavaScript, TypeScript and JSON only.

Your result will appear here

Type or paste your input above, adjust the options, then press Run. Tip: press Ctrl+Enter to run, and ? for every shortcut.

How it works

One formatter, eleven languages

Paste a snippet and choose a language — JavaScript, TypeScript, CSS, SCSS, Less, HTML, Vue single-file components, JSON, Markdown or YAML — or leave it on auto-detect so the parser is sniffed from the content. The output is the same Prettier style editors and CI pipelines apply, not a bespoke tidy-up of the input.

When a minified snippet needs reading

The common trigger is code that arrived compressed or mangled: a one-line bundle excerpt, a stylesheet copied out of an email, or a JSON blob lifted from a log. Here it becomes readable text you can inspect and diff before committing it anywhere.

The options that actually change the text

Line width decides where Prettier wraps and indent width picks spaces per level. The semicolon toggle, the single-quote toggle and the trailing-comma choice apply to JavaScript and TypeScript only, while JSON also honours trailing commas. Markdown and YAML are reflowed by their own rules and ignore the code-style switches.

The first run downloads one parser

Prettier and each language bundle load on demand, so the first format in a language waits briefly while just that parser and printer arrive; later runs reuse the cache. Source that is invalid for the chosen parser surfaces the Prettier error line instead of a silent guess.

Your code never leaves the tab

Formatting happens on this device, with the formatter served from this same origin, so nothing you paste is uploaded or stored.

Questions

Does my code leave the browser?

No. Prettier runs entirely in this tab, and the formatter files are downloaded from this same site the first time you use them.

Why did the first run take a moment?

The formatter is only downloaded when you first use it, and only the parsers for the language you picked. Later runs reuse what is already loaded.

What does Auto-detect do?

It reads the input and picks the most likely language — for example JSON for a JSON object, or TypeScript when it sees type annotations. If it cannot tell, it asks you to choose a language.

The output is wrapped differently from what I expected.

Prettier is opinionated. Line width, indent width, quotes and semicolons are the knobs it exposes; nearly everything else is fixed.

See category