Turn a PDF into a web page. Choose clean text-flow HTML with real headings, paragraphs, lists and tables that reflows on phones, a positioned layout that keeps every line where it was, or an exact look with the page picture under a selectable text layer. Preview it, then download the .html file.
Open a PDF to convert it to HTML.
The converted web page is previewed here, exactly as it will look when you open the downloaded .html file.
Advertisement
Advertisement
How to use the PDF to HTML
Open your PDF by dropping it into the box or clicking to choose it.
Pick the layout: Text flow for content you want to edit or publish, Positioned layout to keep the page design, Exact look for a pixel-perfect copy.
Adjust the options, such as which elements to detect or the page range, for example 1-5.
Check the Preview and the HTML code tab.
Download .html or press Copy HTML to paste the code into your editor or CMS.
Text flow, positioned layout or exact look?
Text flow
Positioned layout
Exact look
Looks like the PDF
No, clean web styling
Close: same positions and sizes
Identical
Responsive on phones
Yes, text reflows
No, fixed page width
No, fixed page width
Easy to edit
Yes
Hard (one element per text run)
Hard
Images and graphics
Not included
Not included
Included as page pictures
Searchable, selectable text
Yes
Yes
Yes (invisible text layer)
Typical file size
Smallest
Small
Largest (about 100 to 400 KB per page)
Best for
Websites, blogs, CMS, accessibility
Forms, flyers, archived layouts
Brochures, scans, design proofs
How the conversion works
PDF text is stored as runs of characters with an exact position, a font and a size. For Text flow, runs are grouped into lines, lines into paragraphs, and larger fonts become headings: the font size used for most of the text is the body size, and sizes clearly above it map to <h1> to <h5>. Bullet and number markers become <ul> and <ol>, and aligned rows with wide gaps become a <table>.
For the positioned modes, every run becomes an absolutely positioned <span>. A PDF point is 1/72 inch and a CSS pixel is 1/96 inch, so coordinates are multiplied by 96 ÷ 72 = 1.333; a US Letter page (612 × 792 pt) becomes a 816 × 1056 px box. Each span is stretched horizontally with scaleX() so that the web font covers exactly the same width as the original text.
Want Markdown instead of HTML? Use PDF to Markdown. Going the other way? HTML to PDF turns a web page into a PDF.
Frequently asked questions
How do I convert a PDF to HTML for free?
Open the PDF on this page, choose a layout and the HTML is generated in a few seconds. Press Download .html to save it or Copy HTML to paste the code elsewhere. There is no sign-up and no upload.
Which layout should I choose?
Text flow produces clean, responsive HTML that is ideal for websites, blogs, email newsletters and editing, because text reflows on any screen. Positioned layout places every line at its exact spot, which keeps forms, brochures and multi-column designs recognisable. Exact look adds a picture of each page behind an invisible text layer, so it looks identical to the PDF while text stays selectable and searchable.
Does the HTML keep fonts and colors?
Text flow uses clean web styling instead of the PDF fonts. Positioned layout keeps font sizes, bold and italic, and maps fonts to the closest web-safe family (sans-serif, serif or monospace), with each line stretched to its original width; text is shown in black. For the exact original fonts, colors and images, use Exact look.
Are images from the PDF included?
In Exact look, yes: each page is embedded as a JPEG image inside the HTML file, so it needs no extra files. Text flow and Positioned layout contain text only, which keeps them small and clean.
Why is the HTML output empty?
The PDF most likely contains scanned images with no text layer. Use Exact look to get the pages as pictures in HTML, or run the document through OCR first to make the text available.
Is the generated HTML safe to put on my website?
Yes. The output is static HTML and CSS with no JavaScript. All text from the PDF is escaped, and only http, https and mailto links are kept.
Is my PDF uploaded?
No. The PDF is read with pdf.js inside your browser and the HTML is generated on your device. Nothing is sent to a server.