# jhy/jsoup

jsoup: the Java HTML parser, built for HTML editing, cleaning, scraping, and XSS safety.

Repository: https://github.com/jhy/jsoup
Canonical: https://ross.abutalabs.com/products/jsoup
Homepage: https://jsoup.org
Language: Java
License: MIT
License Family: permissive
Topics: jsoup, html, java, dom, css, java-html-parser, css-selectors, xml, xpath, parser, web-scraping
Last push: 2026-08-26T23:23:42+00:00

## Health v2 (maintenance only)
Score: 95/100 (v2, computed 2026-09-03T02:20:16.233290+00:00)
- activity 99, release rhythm 87, longevity 100
- inputs: {"age_days": 6102, "days_push": 7, "days_rel": 8, "gap_med": 62, "n_releases_24m": 10}
- flags: none
- formula: round(0.45*activity + 0.35*rhythm + 0.20*longevity); archived -> min(score, 10)

## Adoption (not part of the score)
Stars 11387, forks 2294 (observed 2026-08-28T04:10:46.902703+00:00)

## What it is
jsoup is a Java library for parsing, manipulating, and cleaning real-world HTML and XML, implementing the WHATWG HTML5 specification to produce the same DOM as modern browsers. It provides URL fetching, CSS selector and XPath-based data extraction, DOM manipulation, and safelist-based HTML sanitization to prevent XSS attacks.

## Use cases
- scrape and extract data from web pages in Java
- parse messy real-world HTML into a DOM tree
- sanitize user-submitted HTML to prevent XSS
- extract elements using CSS selectors or XPath
- fetch and parse a URL's HTML content
- clean and tidy up HTML output
- manipulate HTML elements and attributes programmatically

## When to choose
- you need a robust, spec-compliant HTML parser on the JVM
- you are building a web scraper or crawler in Java or Kotlin
- you need to sanitize untrusted HTML against XSS in a Java application
- you want browser-like parsing of invalid tag-soup HTML
- you are working on Android and need HTML parsing

## When to avoid
- you need a full headless browser with JavaScript execution
- you are parsing JSON or other non-HTML data formats
- you need a general-purpose XML validator or XSLT processor
- your project is not on the JVM

## Facets
- artifact type: library
- maturity: stable
- function: parser, web-scraping, security, http-client
- domain: web-development, parsers, crawlers, security
- platform: jvm
- tags: html-parser, css-selectors, xss-sanitization, dom-manipulation, html5, xml, android

## Member repositories
- jhy/jsoup (main) score 95

## Provenance
- Observed fields: from GitHub, fetched 2026-08-28T04:10:46.902703+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-29T17:15:38.273864+00:00, confidence not recorded.
  - readme: https://github.com/jhy/jsoup (fetched 2026-08-28T04:10:46.902703+00:00, sha 7fd2bfe38762)
  - homepage: https://jsoup.org (fetched 2026-08-29T08:14:27.264839+00:00, sha 51426ea1a2f9)
  - site_page: https://jsoup.org/apidocs (fetched 2026-08-29T08:14:27.268032+00:00, sha c5a7fa8db664)
  - site_page: https://jsoup.org/apidocs/org/jsoup/nodes/Element (fetched 2026-08-29T08:14:27.271456+00:00, sha faa8750f0f11)
  - site_page: https://jsoup.org/apidocs/org/jsoup/select/Elements (fetched 2026-08-29T08:14:27.275287+00:00, sha 7f449012ae97)
- Data as of 2026-08-30T08:39:29.467469+00:00.
