Html Normalizer is a VS Code extension that helps you clean up and fix your HTML files with just one click.
If your HTML has missing closing tags, broken structure, or is just a fragment, this tool will automatically correct it for you—just like a web browser would.
- One-click HTML cleanup: Instantly fixes unclosed tags and messy nesting.
- Works with fragments: Even if your HTML is just a snippet, it keeps the structure partial and doesn’t force extra tags.
- Browser-like results: Uses the same logic as browsers, so your HTML will behave as expected.
- Keeps DOCTYPE: The <!DOCTYPE html>declaration stays untouched.
- Open your HTML file in VS Code.
- Press Ctrl+Shift+P(orCmd+Shift+Pon Mac) to open the Command Palette.
- Type HtmlNormalizerand run the command.
- Your HTML will be instantly normalized and cleaned up.
- Anyone who edits HTML in VS Code and wants to avoid manual tag fixing.
- Web designers, students, and developers who want browser-compatible HTML.
- Provide localized display name, description, and command title via NLS resources for English and Japanese.
- Align the English and Japanese README changelog wording for version 0.9.8.
- Preserve original newline blocks after <html>, before<body>, and after</body>without compressing internal script/style content.
- Remove aggressive internal newline compression to avoid altering JavaScript / CSS semantics.
- Add tests for script/style newline preservation, <html>-after newline retention, and flexible whitespace assertions.
- Default to fragment serialization for partial HTML: preserves input order, keeps scripts/comments, and avoids adding <html>/<head>/<body>wrappers.
- Harden full vs. fragment detection using parser source locations and by ignoring <htmlinside comments/scripts/styles; case-insensitive HTML tag handling.
- Replace fragile regex-based reinsertion with DOM-based serialization; preserve original DOCTYPE.
- Add tests (VS Code tests + fast unit tests) covering comments, script strings, tables (<tbody>insertion), nested anchors, and more.
- Add error handling with Output Channel messages.
- Update docs and packaging ignores (exclude tests, artifacts).
- Fixed version badge error
- The Readme is now available in both English and Japanese.
- Fixed an issue where the format of !DOCTYPEand<html>tags was altered.
- Fixed an issue where elements outside the <html>tag, like!DOCTYPE, were being removed.
- Changed category to "Formatters".
- Fixed a broken link to the marketplace.
- Initial release.