Code Formatter (Prettier)

Tidy up messy JavaScript, CSS, HTML, Markdown or YAML in one click.

Runs 100% in your browser. Your files are not uploaded to any server.

How to use Code Formatter (Prettier)

  1. Paste your code into the left box.
  2. Choose the language, indentation and quote style.
  3. Click Format, then copy or download the result.

Frequently asked questions

What is Prettier?

Prettier is an open-source (MIT) code formatter used by millions of developers. It prints code in one consistent style, so every file in a project looks the same.

Is my code uploaded anywhere?

No. Prettier runs entirely in your browser, and your code is processed on your own device.

Which languages are supported?

JavaScript and JSX, CSS, HTML, Markdown and YAML. TypeScript needs a separate parser, which is not included here.

Is Code Formatter (Prettier) free?

Yes. Code Formatter (Prettier) is free to use with no sign-up and no watermark.

Are my files uploaded to your server?

No. All processing happens locally in your browser using JavaScript and WebAssembly. Your files never leave your device, which also makes it fast and private.

Does it work on my phone?

Yes. It works in any modern browser on Windows, Mac, Linux, Android and iPhone. Very large files may be slow on older phones.

More Text & Dev tools

View all