The formatter uses Prettier's HTML parser to normalize indentation, tag wrapping, attributes, and embedded style or script blocks. Parser errors help expose malformed markup before you paste it back into a template.
Use it for copied server-rendered HTML, email templates, CMS snippets, or component output. A stable layout makes mismatched nesting and accidental attributes easier to spot during review.
Common questions and answers about this topic.
It auto-formats your HTML code with proper indentation and tag alignment, making your markup easier to read and debug.
Yes, select 2 or 4 spaces, or tabs to align with your HTML project conventions.
Yes, embedded scripts and styles within your HTML are formatted as well, ensuring consistent indentation throughout the entire document.
No, HTML formatting happens entirely in your browser. Your markup is processed locally with JavaScript and never uploaded to any server.