About HTML Formatter
A code beautifier rewrites source code with consistent indentation and line breaks without changing what it does. This tool loads the open source js-beautify library (version 1.14.9) for HTML, CSS, and JavaScript. HTML formatting also re-indents embedded style and script blocks. It changes whitespace only: it does not rename variables, fix syntax errors, or undo obfuscation, so names shortened by a minifier stay short.
Also known as: HTML Beautifier.
How to use HTML Formatter
- Type or paste into the "Code" box, or press "Use example" to try it with sample data.
- Set "Language" and "Indentation" if the defaults do not fit.
- The result appears below and updates as you type.
- Copy the result with the copy button, or download it as a file where that is offered.
Questions about HTML Formatter
Can it restore the original variable names of minified JavaScript?
No. Minifiers replace names with short ones and that information is gone. Beautifying restores line breaks and indentation so the structure is readable, but identifiers stay as they are in the minified file.
Runs in your browser. Page last updated .