# thephpleague/html-to-markdown

Convert HTML to Markdown with PHP

Repository: https://github.com/thephpleague/html-to-markdown
Canonical: https://ross.abutalabs.com/products/thephpleague-html-to-markdown
Language: PHP
License: MIT
License Family: permissive
Topics: php, markdown, commonmark, html, converter, phpleague, hacktoberfest
Last push: 2026-08-10T14:24:22+00:00

## Health v2 (maintenance only)
Score: 66/100 (v2, computed 2026-09-02T17:46:02.011165+00:00)
- activity 97, release rhythm 8, longevity 100
- inputs: {"age_days": 5430, "days_push": 23, "days_rel": null, "gap_med": null, "n_releases_24m": 0}
- flags: none
- formula: round(0.45*activity + 0.35*rhythm + 0.20*longevity); archived -> min(score, 10)

## Adoption (not part of the score)
Stars 1903, forks 215 (observed 2026-08-28T04:05:51.753237+00:00)

## What it is
A PHP library that converts HTML documents into Markdown text. It is part of the League of Extraordinary Packages and supports configurable conversion options.

## Use cases
- convert html to markdown in php
- migrate html content to markdown files
- convert html email to plain text
- store content as html but edit as markdown
- strip html tags when converting untrusted input

## When to choose
- you need programmatic HTML-to-Markdown conversion in a PHP project
- you want a mature, well-tested library with composer integration

## When to avoid
- you need Markdown-to-HTML conversion instead
- you work outside the PHP ecosystem

## Facets
- artifact type: library
- maturity: stable
- function: parser, markdown, serialization
- domain: web-development, developer-tools, documentation
- platform: php, cli
- tags: html-to-markdown, converter, commonmark, phpleague

## Member repositories
- thephpleague/html-to-markdown (main) score 66

## Provenance
- Observed fields: from GitHub, fetched 2026-08-28T04:05:51.753237+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-30T03:11:53.985065+00:00, confidence not recorded.
  - readme: https://github.com/thephpleague/html-to-markdown (fetched 2026-08-28T04:05:51.753237+00:00, sha a3ec5069cdda)
- Data as of 2026-08-30T08:39:29.467469+00:00.
