# EmilStenstrom/justhtml

A pure Python HTML5 parser that just works. No C extensions to compile. No system dependencies to install. No complex API to learn.

Repository: https://github.com/EmilStenstrom/justhtml
Canonical: https://ross.abutalabs.com/products/justhtml
Homepage: https://emilstenstrom.github.io/justhtml/
Language: Python
License: NOASSERTION
License Family: other
Topics: html5, parser, python, html, sanitization, security
Last push: 2026-08-16T14:57:55+00:00

## Health v2 (maintenance only)
Score: 83/100 (v2, computed 2026-09-03T02:39:23.370411+00:00)
- activity 98, release rhythm 86, longevity 44
- inputs: {"age_days": 620, "days_push": 17, "days_rel": 17, "gap_med": 1.0, "n_releases_24m": 87}
- flags: no_license
- formula: round(0.45*activity + 0.35*rhythm + 0.20*longevity); archived -> min(score, 10)

## Adoption (not part of the score)
Stars 1151, forks 44 (observed 2026-08-28T04:03:46.691569+00:00)

## What it is
JustHTML is a pure Python HTML5 parser with browser-style error recovery, safe-by-default sanitization, CSS selector querying, and serialization to HTML, text, or Markdown. It has zero runtime dependencies and no C extensions, making it easy to deploy anywhere Python runs.

## Use cases
- sanitize untrusted user-supplied HTML
- parse malformed HTML like a browser
- extract text or markdown from HTML
- query HTML with CSS selectors in Python
- replace Bleach or html5lib in a Python project
- scrape messy real-world web pages
- convert HTML to markdown

## When to choose
- you need correct HTML5 parsing of untrusted or malformed HTML in Python
- you want sanitization built in rather than a separate library
- you need zero-dependency deployment, including PyPy or Pyodide
- you're migrating from Bleach or html5lib

## When to avoid
- you need maximum throughput parsing of terabytes of trusted HTML - use a C/Rust-backed parser like lxml
- you need a non-Python language

## Facets
- artifact type: library
- maturity: active
- function: parser, security, web-scraping, serialization
- domain: parsers, web-development, security, developer-tools
- platform: python, cross-platform, cli
- tags: html5-parsing, html-sanitization, css-selectors, pure-python, markdown-conversion, bleach-replacement, dom-manipulation

## Member repositories
- EmilStenstrom/justhtml (main) score 83

## Provenance
- Observed fields: from GitHub, fetched 2026-08-28T04:03:46.691569+00:00.
- Health v2: computed from the inputs above; adoption is never an input.
- Inferred fields (summary, facets, guidance): AI-extracted, prompt v1, taxonomy v1, on 2026-08-30T06:33:35.020701+00:00, confidence not recorded.
  - readme: https://github.com/EmilStenstrom/justhtml (fetched 2026-08-28T04:03:46.691569+00:00, sha c2223cae1b8f)
  - homepage: https://emilstenstrom.github.io/justhtml/ (fetched 2026-08-29T12:38:22.399931+00:00, sha d2f2bdf4f33e)
  - registry_pypi: https://pypi.org/pypi/justhtml/json (fetched 2026-08-29T12:38:22.408788+00:00, sha 50605f3d4ece)
- Data as of 2026-08-30T08:39:29.467469+00:00.
