Generate Missing HTML Tags

Find unclosed tags and fix them.

Runs in your browser. Nothing is uploaded — your input is processed on this device and discarded when you close the tab.

Generate Missing HTML Tags

How to use this tool

  1. Enter your values in the fields above.
  2. Press Generate to see the result.
  3. Use Load sample to try the worked example, Copy result to copy it, or Clear to start again.

Worked example

The sample “<div><p>Hello” is missing two closing tags: </p> and </div>. The corrected version is “<div><p>Hello</p></div>”.

What this tool does not do / Limits

This fixes nesting by tag order only. It does not validate attributes, check your markup against a standard, or repair badly broken structures.

Frequently asked questions

Which tags need no closing tag?

Void tags such as br, img, hr and input never take a closing tag and are skipped.

What if a closing tag appears with no opener?

It is reported as stray and left out of the corrected version.

Related tools