Format and beautify HTML code. Prettify HTML with proper indentation.
Copy HTML from any source — view source, WYSIWYG editor, email template, or minified file — and paste it into the editor.
Choose your indentation style (spaces or tabs), indent size, and whether to wrap attributes on separate lines for deeply nested elements.
Click Format to beautify with proper indentation and structure, or Minify to compress for production use. Results appear instantly.
Use the one-click copy button to grab the result. The formatted HTML is ready to paste into your code editor or CMS.
HTML formatter online — beautify, indent, and organize HTML code instantly in your browser. This free HTML formatting tool applies proper indentation, handles inline and block elements correctly, and preserves content within pre and script tags. Perfect for cleaning up HTML from WYSIWYG editors, email templates, web scraping output, and minified source code. All processing runs client-side so your code stays private.