Code formatter
Format or minify CSS, HTML, JavaScript, SQL, XML and JSON.
Input
Language
Mode
Indent
Output
What it does
The code formatter tidies CSS, HTML, JavaScript, SQL, XML and JSON with clean indentation, or minifies them to save space. Pick 2 spaces, 4 spaces or tabs, and upper-case SQL keywords if you like. If the code can’t be read, it tells you. It runs in your browser.
How to use it
- 1Paste the code.
- 2Check the language, then pick Format or Minify.
- 3Copy the result.
Questions
Which languages does it know?
CSS, HTML, JavaScript, SQL, XML and JSON. It guesses the language, and you can change it.
Does formatting change what the code does?
No. Formatting only changes spaces and line breaks.
Is my code uploaded?
No. It is formatted on your device.
AD320 × 100