Kharabeesh
On-device ع

HTML Formatter & Minifier

Beautify HTML with clear indentation or minify it for production: removes comments and extra whitespace, keeps pre and textarea intact, and safely compacts inline CSS and JS. Fully local.

Free, no sign-up Saved on your device only Works offline after first open

The tool

Loading the tool…

How to use

  1. Paste HTML or open an .html file.
  2. Choose Format or Minify, the indentation and options.
  3. The result appears below with the size before and after.
  4. Copy it or download it as a file.

Privacy & how it works

Saves your data in this browser only (back it up or delete it from “My data”).

  • Engine: beautifier (open-source libraries bundled with the site).
  • Works offline after you open it once.

Frequently asked questions

Does minifying change how the page looks?

Repeated whitespace becomes one space, and spaces are removed only between block tags (like div and p). Spaces around inline tags (like b and a) are kept so words do not stick together. pre and textarea content is untouched.

What happens to inline scripts and styles?

When minifying, CSS is minified and JavaScript is compacted by removing comments and spaces while keeping line breaks the code may rely on. Variable names are not changed. JSON and template scripts stay as they are.

Which library does the formatting?

The open-source js-beautify library, served from this site with no outside requests.

Related tools