Source code
HTML Format
Paste code and choose an operation

HTML / CSS / JS / SQL Formatter

Paste minified or badly indented code, choose the language and format it into a readable structure with one click. It works the other way too: collapse code onto a single line to shrink payloads or squeeze it into a config value.

Formatting happens in the browser and your source is never uploaded, so it is safe for internal code snippets.

Features

How to use

  1. Paste the code you want to process on the left.
  2. Choose the language on the right: HTML, CSS, JavaScript, SQL or XML.
  3. Pick an indentation style and click Format or Minify.
  4. Review the output in the result panel and click Copy.

FAQ

Does formatting change how my code behaves?

For HTML, CSS, XML and SQL, formatting only adjusts whitespace and leaves semantics untouched. JavaScript deserves more care because of automatic semicolon insertion: joining two lines or moving a line break can change statement boundaries in a few rare constructs, so give the result a quick read afterwards.

Can minified code be restored?

Whitespace-only minification can be undone by formatting again, but optimisations such as variable renaming and dead code elimination are irreversible. This tool only removes whitespace and never renames identifiers.

Which SQL dialects does the formatter support?

It applies generic keyword casing and indentation, which handles the common syntax of MySQL, PostgreSQL and SQL Server. Dialect-specific constructs, such as certain stored procedure bodies, may not lay out perfectly.

Is my code uploaded?

No. All formatting is done locally in the browser and your code is never sent to a server.

Feedback

This site is front-end only — no backend, no accounts — so feedback goes to GitHub Issues, Discussions, or email.

Paste it into the issue or email to help track it down — it never includes anything you typed

Also: Browse existing issues · Email feedback (no GitHub account needed): 278975598@qq.com