HTML Formatter

HTML फ़ॉर्मेटर

Beautify messy HTML with clean indentation, or minify it.

Runs in your browser – nothing you enter or upload is sent to our server

How to use the HTML Formatter

  1. Paste HTML or open a file.
  2. Choose the indentation.
  3. Click Format HTML or Minify.

Supported formats: HTML, TXT

Safe formatting

The formatter re-indents tags but never changes what the page displays: content inside <pre> and <textarea> is kept byte-for-byte, and <script> / <style> blocks keep their own internal indentation. Void elements like <br> and <img> are handled correctly.

If tags are unclosed or mismatched, you get a warning – the indentation then shows where the structure breaks.

Frequently asked questions

Does minifying remove comments?

Yes, HTML comments are removed and whitespace between tags is collapsed. Content in <pre>, <script> and <style> is kept as it is.

Is my code sent anywhere?

No, it runs locally in your browser.