How to use the HTML formatter
Paste anything from a snippet to a whole page. The output updates as you type.
- Paste your HTML into the Input box, or press Paste. Fragments without
<html>or<body>work fine, and Try it loads a short example. - Set Mode to Beautify for indented markup, or to Minify to shrink it.
- Choose the Indent: 2 spaces, 4 spaces or Tab. It only affects Beautify.
- Read the status line. It says "Beautified", or for Minify it shows the before and after length and the percentage saved.
- Press Copy or Download .txt. Use as input moves the result back into the input box.
Beautify uses the js-beautify library inside your browser, the same code that sits behind many editor plugins. Nothing is uploaded, so pages with embedded keys, customer data or unreleased content stay private.