Convert a PDF Into a Reflowable EPUB E-Book

Converting PDF to EPUB rebuilds a fixed-layout document as a reflowable e-book: instead of frozen pages, the text becomes flowing XHTML that an e-reader re-wraps to fit any screen and font size. Because a PDF stores printed lines at fixed positions — not paragraphs — the converter must infer the paragraph structure, which is why every PDF-to-EPUB conversion is lossy and prose converts far better than tables or math. The standard tool is Calibre's free conversion engine, used from its app or the ebook-convert command line as shown below.

Why there is no one-click converter on this page

Good EPUB output needs heavy document analysis — un-wrapping printed lines into paragraphs, stripping page headers, detecting chapters — plus an EPUB packager, which is a desktop-class engine no browser exposes. Calibre does exactly this, free and locally, so the honest answer is to show you how to use it well.

Disclosure: this page contains affiliate placeholder links. If they were live, we could earn a commission at no extra cost to you.

AFFILIATE PLACEHOLDER: Recommended desktop PDF suite (placeholder link)

How to convert a PDF to EPUB (step by step)

Method 1: Calibre's graphical converter

  1. Install Calibre and add the PDF. Download Calibre from calibre-ebook.com, open it, and drag the PDF into the library window. Calibre registers the file and reads its metadata.
  2. Start the conversion. Select the book and click Convert books. Set the output format to EPUB in the top-right dropdown, and fill in the correct title and author under Metadata — these become the e-book's identity.
  3. Tune the PDF input options. Under PDF Input, set the un-wrap factor (default 0.45) higher if paragraphs stay broken into short lines, and under Structure Detection enable removal of repeating headers and footers so page furniture does not litter the text.
  4. Convert and proofread. Click OK, then open the result in Calibre's viewer. Check chapter breaks, hyphenation leftovers, and image placement, and re-run with adjusted options if paragraphs merged or split incorrectly.

Method 2: The ebook-convert command line

Calibre installs a CLI that scripts the same engine: ebook-convert book.pdf book.epub --unwrap-factor 0.7 --enable-heuristics --title "Field Notes" --authors "J. Moreau". The --enable-heuristics flag turns on un-hyphenation and italicizing of common cases; add --pdf-engine calibre variations or --no-images for text-only output. This is the route for converting a folder of PDFs in a loop.

Method 3: When conversion is the wrong tool

For layout-critical documents — cookbooks, comics, textbooks with equations — a reflowable EPUB will misrepresent the content. Keep the PDF, or make a fixed-layout image book instead: export pages with our PDF to Images tool and bind them in Calibre. It reads like a facsimile, with no resizable text but nothing scrambled.

How it works

An EPUB is a ZIP archive of XHTML chapter files, a CSS stylesheet, images, and two manifests (an OPF package file and a navigation document). Everything about its presentation is deferred to the reading device: the renderer picks the line breaks, page breaks, and font. A PDF is the exact opposite contract — the producing application already chose every line break and glyph position, then discarded the paragraph and chapter structure it worked from. Conversion therefore runs the typesetting process in reverse, and reverse-typesetting is inference, not decoding.

Calibre's pipeline makes the stages visible. First it extracts positioned text runs from each page. Then "un-wrapping" decides which line endings are hard (paragraph ends) and which are soft (the typesetter simply ran out of column width): a line ending well short of the median line length, or ending in sentence punctuation, likely ends a paragraph. The un-wrap factor is precisely that threshold — a fraction of the median line length below which a line is treated as a paragraph end, which is why raising it from 0.45 toward 0.8 joins more lines. Heuristic processing then removes hyphenation artifacts ("conver- sion" → "conversion"), and structure detection looks for text repeating at the same position on every page — running headers and page numbers — and deletes it, then splits chapters at detected heading patterns. Finally the reconstructed HTML is packaged with the images into the EPUB container.

Each stage can guess wrong, and the failure modes are characteristic: poetry gets its deliberate short lines merged, tables interleave, and multi-column pages read column-into-column. That is not a bug in Calibre; the information needed to do better was never written into the PDF.

Worked example: a 214-page novel PDF onto an e-reader

We converted a DRM-free 214-page, 2.8 MB novel PDF (single column, running headers, no images) with ebook-convert. The default run took 24 seconds and produced a 412 KB EPUB, but sampling chapter 3 showed 41 falsely broken paragraphs and the author's name from the running header embedded mid-sentence 19 times. Re-running with --unwrap-factor 0.72 --enable-heuristics plus header/footer removal patterns cut the broken paragraphs to 3 and removed all header artifacts; conversion time rose to 31 seconds and the file settled at 396 KB — 14% of the original size, since the embedded fonts and page structure were gone. On a 6-inch e-reader the EPUB reflowed at the reader's preferred 12pt with working chapter navigation, where the original PDF had required zooming on every single page.

Frequently asked questions

Why does my PDF to EPUB conversion have broken lines everywhere?

The PDF stores each printed line as an independent text run, and the converter has to guess which line breaks are real paragraph ends. In Calibre, raise the un-wrap factor in the PDF Input settings — values around 0.6 to 0.8 merge more lines into paragraphs.

Is EPUB better than PDF for reading on a Kindle or e-reader?

Yes for prose — EPUB reflows to fit the screen and respects your chosen font size, while a PDF page must be shrunk or panned on a 6-inch display. Modern Kindles accept EPUB uploads directly via Send to Kindle.

Why do page numbers and headers appear in the middle of my EPUB text?

Those are the PDF's running headers, footers, and page numbers, which sit in the text layer like any other text. Calibre's Structure Detection options can strip repeating header and footer lines; enable them and reconvert.

Can I convert a scanned book PDF to EPUB?

Not directly — a scan has no text layer, so the conversion produces empty or image-only pages. OCR the book first, then convert the OCR output; text accuracy will depend on scan quality.

Do tables, footnotes, and math survive conversion to EPUB?

Poorly — tables usually collapse into run-together lines, footnotes get inlined where they interrupt sentences, and equations typeset as positioned glyphs scramble. Textbooks and papers with heavy math are generally better kept as PDF.

Is converting a purchased PDF e-book to EPUB legal?

Format-shifting a DRM-free file you own for personal reading is generally tolerated in many places, but circumventing DRM is illegal in many jurisdictions regardless of ownership. Check your local law and the store's terms; this page is not legal advice.

Related tools