Article · Wikipedia archive · Last revised Jul 20, 2026

Comparison of HTML parsers

HTML parsers are software for automated Hypertext Markup Language (HTML) parsing. They have two main purposes:HTML traversal: offer an interface for programmers to easily access and modify the "HTML string code". Canonical example: DOM parsers. HTML clean: to fix invalid HTML and to improve the layout and indent style of the resulting markup. Canonical example: HTML Tidy.

Last revised
Jul 20, 2026
Read time
≈ 1 min
Length
209 w
Citations
7
Source

HTML parsers are software for automated Hypertext Markup Language (HTML) parsing. They have two main purposes:

  • HTML traversal: offer an interface for programmers to easily access and modify the "HTML string code". Canonical example: DOM parsers.
  • HTML clean: to fix invalid HTML and to improve the layout and indent style of the resulting markup. Canonical example: HTML Tidy.
Parser License Implementation language(s) Latest date* HTML parsing1 HTML5-compliant parsing Clean HTML** Update HTML***
HTML Tidy W3C license ANSI C 2021-07-172 Yes3 Yes Yes3 Yes
HtmlUnit Apache License 2.0 Java 2023-10-314 Yes ? No No
Beautiful Soup MIT License Python 2023-04-075 Yes Yes ? No
jsoup MIT License Java 2026-04-206 Yes Yes Yes Yes
Parser License Implementation language(s) Latest date* HTML Parsing HTML5-compliant Parsing Clean HTML** Update HTML***
* Latest release (of significant changes) date.
** sanitize (generating standard-compatible web-page, reduce spam, etc.) and clean (strip out surplus presentational tags, remove XSS code, etc.) HTML code.
*** Updates HTML4.X to XHTML or to HTML5, converting deprecated tags (ex. CENTER) to valid ones (ex. DIV with style="text-align:center;").
References

References