parse5 HTML Parser and Serializer
JSON →parse5 is a spec-compliant HTML parsing and serialization library for JavaScript, faithfully implementing the HTML5 specification (WHATWG). It offers robust parsing capabilities, creating a syntax tree that can then be manipulated or serialized back into HTML. The current stable version is 8.0.1, with releases occurring periodically to address dependencies, bug fixes, and minor enhancements. Major version bumps (like v7.0.0 and v8.0.0) typically introduce significant internal refactors or breaking changes. Key differentiators include its strict adherence to the HTML5 parsing algorithm, extensive TypeScript type definitions, and its use as the underlying HTML parser in popular projects such as Cheerio, rehype, and Lit. It provides both a pull-stream based parser and a non-streaming API for parsing strings, along with customizable tree adapters.
Traffic · last 30 days ↑0% vs prev 7d
top countries 🇺🇸 United States · 🇫🇷 France · 🇨🇦 Canada · 🇩🇪 Germany