HTML Broken Tag Fixer
Serialize the tree that an HTML parser builds from malformed source. Compare the exact changed range, review parser diagnostics and save the resulting HTML.
Check How the HTML Parser Repairs Broken Tags
Serializes the repaired HTML parser tree. Review changes to nesting, implied elements, entities and formatting before using the output.
Analyzing HTML locally…
HTML Broken Tag Fixer: how to use it
- Paste HTML or open a local file. Choose Complete document or Fragment and the fragment’s parent context.
- Select Repair HTML. Inspect parser diagnostics, the serialized source and the Before and After change.
- Review recovered nesting and any dropped content. Download the repaired text, or download a JSON diff to apply the shown replacement.
Limits and notes
Accepts up to 250,000 UTF-16 code units of saved HTML. Serialization can normalize quotes and entities, expand optional tags and rearrange markup. The parser cannot infer your intended nesting. The resulting HTML may retain executable markup and is displayed as text.
How your privacy works →HTML Broken Tag Fixer: common questions
Why did the tool add closing li tags?
The serializer writes list item end tags even when the HTML syntax permits omitting them. A source change alone does not prove the input was invalid.
What context should I use for a single table row?
Choose Fragment with a tbody context for tr markup. Match the surrounding parent element to the place where you will put the fragment.
How do I apply the exported diff?
In the original input, replace the text between startOffset and endOffset with after. Offsets start at zero and count UTF-16 code units, and endOffset is exclusive.