PHPackages                             xen3r0/adf-converter - PHPackages - PHPackages  [Skip to content](#main-content)[PHPackages](/)[Directory](/)[Categories](/categories)[Trending](/trending)[Leaderboard](/leaderboard)[Changelog](/changelog)[Analyze](/analyze)[Collections](/collections)[Log in](/login)[Sign up](/register)

1. [Directory](/)
2. /
3. [Parsing &amp; Serialization](/categories/parsing)
4. /
5. xen3r0/adf-converter

ActiveLibrary[Parsing &amp; Serialization](/categories/parsing)

xen3r0/adf-converter
====================

A PHP toolkit to parse the Atlassian Document Format (ADF) and export it to HTML or Markdown

v1.0.0(1mo ago)055↑33.3%1MITPHPPHP ^8.2CI passing

Since Jul 17Pushed 1mo agoCompare

[ Source](https://github.com/Xen3r0/adf-converter)[ Packagist](https://packagist.org/packages/xen3r0/adf-converter)[ RSS](/packages/xen3r0-adf-converter/feed)WikiDiscussions main Synced 1w ago

READMEChangelog (1)Dependencies (5)Versions (2)Used By (1)

adf-converter
=============

[](#adf-converter)

[![CI](https://github.com/Xen3r0/adf-converter/actions/workflows/ci.yml/badge.svg)](https://github.com/Xen3r0/adf-converter/actions/workflows/ci.yml)[![Latest Version](https://camo.githubusercontent.com/57c0482c8f074bd0fc3fa11054c3e65e0e3d3b9ad8f73479f6e182ded7615211/68747470733a2f2f696d672e736869656c64732e696f2f7061636b61676973742f762f78656e3372302f6164662d636f6e7665727465722e737667)](https://packagist.org/packages/xen3r0/adf-converter)[![License](https://camo.githubusercontent.com/ebbf8e3d7f923f9fd8ddc1a391f62748113d94c881d1bc955c1fe7458a012b6a/68747470733a2f2f696d672e736869656c64732e696f2f6769746875622f6c6963656e73652f58656e3372302f6164662d636f6e7665727465722e737667)](LICENSE)[![PHP Version](https://camo.githubusercontent.com/6e7c045daae47092cf54ae494dbe07c81d81269bf92165499c0e40749fea3b3e/68747470733a2f2f696d672e736869656c64732e696f2f7061636b61676973742f646570656e64656e63792d762f78656e3372302f6164662d636f6e7665727465722f7068702e737667)](composer.json)

A PHP toolkit to parse the [Atlassian Document Format (ADF)](https://developer.atlassian.com/cloud/jira/platform/apis/document/structure/) — the rich-text format used by Jira and Confluence — and convert it to and from **HTML** and **Markdown**.

It parses any of the three formats into a typed node tree (an AST) and exports that tree back out, so every combination below is supported:

From ↓ / To →ADF (JSON)HTMLMarkdown**ADF**—✅✅**HTML**✅✅✅**Markdown**✅✅✅Requirements
------------

[](#requirements)

- PHP &gt;= 8.2
- Extensions: `ext-dom`, `ext-json`

Installation
------------

[](#installation)

```
composer require xen3r0/adf-converter
```

Quick start
-----------

[](#quick-start)

Convert an ADF document (for example the `body` you get back from the Jira API) to HTML:

```
use Xen3r0\Adf\Parser\Adf\AdfParser;
use Xen3r0\Adf\Exporter\Html\HtmlExporter;

$adf = '{"version":1,"type":"doc","content":[
    {"type":"heading","attrs":{"level":1},"content":[{"type":"text","text":"Hello"}]},
    {"type":"paragraph","content":[{"type":"text","text":"world"}]}
]}';

$document = (new AdfParser())->parse($adf);
echo (new HtmlExporter())->export($document);
// Helloworld
```

Turn user-written Markdown into an ADF document ready to send to Jira:

```
use Xen3r0\Adf\Parser\Markdown\MarkdownParser;

$document = (new MarkdownParser())->parse("# Title\n\nsome **bold** text");

echo json_encode($document); // valid ADF JSON
```

Documentation
-------------

[](#documentation)

- [Getting started](docs/getting-started.md) — installation and the core flow
- [Parsing](docs/parsing.md) — the ADF, HTML and Markdown parsers
- [Exporting](docs/exporting.md) — the HTML and Markdown exporters, and the AST
- [Supported elements](docs/supported-elements.md) — node and mark reference
- [Security](docs/security.md) — how untrusted input is made safe
- [Development](docs/development.md) — running the tests, linters and CI locally

Security
--------

[](#security)

All exported HTML and Markdown is hardened against XSS: dangerous URL schemes (`javascript:`, `data:`, …) are stripped from links, and text content is escaped. See [docs/security.md](docs/security.md) for details. To report a vulnerability, please open a [security advisory](https://github.com/Xen3r0/adf-converter/security/advisories/new).

License
-------

[](#license)

Released under the [MIT License](LICENSE). Copyright © Manuel Santisteban.

###  Health Score

41

—

FairBetter than 87% of packages

Maintenance90

Actively maintained with recent releases

Popularity12

Limited adoption so far

Community8

Small or concentrated contributor base

Maturity46

Maturing project, gaining track record

 Bus Factor1

Top contributor holds 100% of commits — single point of failure

How is this calculated?**Maintenance (25%)** — Last commit recency, latest release date, and issue-to-star ratio. Uses a 2-year decay window.

**Popularity (30%)** — Total and monthly downloads, GitHub stars, and forks. Logarithmic scaling prevents top-heavy scores.

**Community (15%)** — Contributors, dependents, forks, watchers, and maintainers. Measures real ecosystem engagement.

**Maturity (30%)** — Project age, version count, PHP version support, and release stability.

###  Release Activity

Cadence

Unknown

Total

1

Last Release

46d ago

### Community

Maintainers

![](https://avatars.githubusercontent.com/u/2823704?v=4)[Manuel Santisteban](/maintainers/xen3r0)[@Xen3r0](https://github.com/Xen3r0)

---

Top Contributors

[![Xen3r0](https://avatars.githubusercontent.com/u/2823704?v=4)](https://github.com/Xen3r0 "Xen3r0 (7 commits)")

---

Tags

htmlmarkdownjiraatlassianadfConfluence

###  Code Quality

TestsPHPUnit

Static AnalysisPHPStan

Code StylePHP CS Fixer

Type Coverage Yes

### Embed Badge

![Health badge](/badges/xen3r0-adf-converter/health.svg)

```
[![Health](https://phpackages.com/badges/xen3r0-adf-converter/health.svg)](https://phpackages.com/packages/xen3r0-adf-converter)
```

###  Alternatives

[league/html-to-markdown

An HTML-to-markdown conversion helper for PHP

1.9k34.9M393](/packages/league-html-to-markdown)[tempest/framework

The PHP framework that gets out of your way.

2.3k42.4k21](/packages/tempest-framework)[helsingborg-stad/municipio

A bootstrap theme for creating municipality sites.

4028.8k10](/packages/helsingborg-stad-municipio)[code16/sharp

Laravel Content Management Framework

79466.8k10](/packages/code16-sharp)[petebishwhip/laradocs

Maintain beautiful, version-controlled documentation alongside your Laravel codebase. Markdown in, a polished docs site out.

11419.8k](/packages/petebishwhip-laradocs)

PHPackages © 2026

[Directory](/)[Categories](/categories)[Trending](/trending)[Changelog](/changelog)[Analyze](/analyze)
