Emojar – free online tools

HTML Formatter

Format messy or minified HTML into clean, consistently indented markup using Prettier — including embedded CSS and JavaScript.

This tool runs entirely in your browser.

Loading tool…

How to use the HTML Formatter

  1. 1Paste your HTML.
  2. 2Choose indentation.
  3. 3Click “Format HTML” and copy the result.

What is the HTML Formatter?

The formatter uses Prettier, the most widely used code formatter, loaded on demand in your browser.

Frequently asked questions

Will formatting change how my page looks?

Prettier is careful with whitespace-sensitive inline elements, so rendering should not change.

Is the HTML Formatter free and private?

Yes. The HTML Formatter is free, needs no account, and runs entirely in your browser. What you type is never sent to a server or stored.