Code Formatter & Minifier

Pretty-print or minify JavaScript, TypeScript, CSS, HTML, JSON, Markdown, YAML and SQL — powered by Prettier, right in your browser.

This code formatter pretty-prints or minifies your code using Prettier, right in the browser. Paste JavaScript, TypeScript, CSS, HTML, JSON, Markdown, YAML or SQL to beautify messy code, clean up the indentation, or compact it for production. It is a quick way to format code online without installing Prettier or setting up a config file. Nothing is uploaded.

Input
Output

How it works

  1. 1

    Pick a language

    Choose the language of your snippet, then paste the code into the input pane.

  2. 2

    Format or minify

    Format applies Prettier’s opinionated style; Minify compacts the code for production.

  3. 3

    Copy the result

    Grab the cleaned-up output with one click, or download it as a file.

Instant & 100% private — nothing is uploaded

Everything runs locally in your browser. Your code, text and files are processed on your own device and are never sent to a server — so there are no upload waits, no size limits from us, and nothing is ever stored or logged.

Frequently asked questions

Which languages are supported?
JavaScript, TypeScript, JSX, CSS, SCSS, LESS, HTML, JSON, Markdown, YAML and SQL. Most are handled by Prettier; SQL uses a dedicated SQL formatter.
Is the formatting configurable?
It uses Prettier’s sensible defaults (2-space indent, standard print width). This keeps output consistent with the most common community style.
Can it minify as well as beautify?
Yes. Beautify produces readable code; Minify collapses whitespace to reduce file size. Both happen instantly on your device.