Developer
News and Updates
Get Support
Sign in
Get Support
Sign in
DOCUMENTATION
Cloud
Data Center
Resources
Sign in
Sign in
DOCUMENTATION
Cloud
Data Center
Resources
Sign in
Last updated Sep 1, 2026

Convert HTML to ADF

Technical Guide

Introduction

HTML is the standard language used to represent rich content on the World Wide Web. It is also commonly used to represent data exported from diverse office suite applications such as word processors and spreadsheets.

HTML can be extremely complicated and parsing it to produce ADF is not straight-forward. Anchor links, relative URLs, and media references are all difficult to support. Further, HTML has features like forms, scalable vector graphics, cascading style sheets, canvas graphics, and more that are unlikely to ever be supported by ADF.

adf-builder-java-html

Experimental

This library provides a separate adf-builder-java-html module that uses JSoup to parse HTML, then transforms the output into its own ADF nodes. At this time, this support should be considered EXPERIMENTAL, as it was thrown together hastily and has not undergone extensive testing to ensure its production readiness.

Example

Both of these should result in the same (or at least very similar) ADF:

Markdown

1
2
3
4
5
6
7
<h2>Heading 2</h2>
<p>Paragraph text</p>
<ol>
    <li>List item 1</li>
    <li>List item 2</li>
</ol>

Java

1
2
3
4
5
6
7
8
9
doc(
    h2("Heading 2"),
    p("Paragraph text"),
    ol(
        li("List item 1"),
        li("List item 2")
    )
)

Usage

1
2
3
4
    String html = "<h2>Heading 2</h2>\n<p>Paragraph text</p>…";
    HtmlParser parser = new HtmlParser();
    Doc doc = parser.unmarshall(html);

Further Reading

Rate this page: