Browser-based document converter · PDF to EPUB

PDF to EPUB Converter

Reflows the text of a PDF into an EPUB ebook, starting chapters at the headings it detects and leaving the fixed page layout behind.

Input

PDF files (.pdf), up to 25MB

Drop your PDF file here or click to choose

.pdf

Files are read and converted on your device. Nothing is uploaded, and the result is yours to download or open in the Word editor.

Result

EPUB file, ready to download or edit

Choose a file to see the EPUB result here.

PDF to EPUB Converter

Operator: Abdulla Al Fahad. How tools are built and checked

Reading a PDF on a phone or an e-reader means pinching, panning and squinting at a page that was designed for paper. An EPUB reflows to the screen, remembers where you are and lets you change the type size, which is why reading apps prefer it. The PDF to EPUB Converter reads the text layer of a PDF, rebuilds paragraphs from the positioned fragments, decides which lines were headings from their font size, and builds an EPUB 3 ebook from them, complete with a table of contents and chapters split wherever you choose.

A PDF stores glyphs at coordinates rather than paragraphs and headings, so this is a reconstruction. It works well on reports, papers, manuals and books exported from a word processor: single column, consistent body size, headings visibly larger than the text. It struggles with two-column layouts, dense tables and anything scanned, and it never carries images across. The options set the chapter rule, language and author, and the summary shows the resulting chapter count before you download.

Key features

  • Rebuilds paragraphs and headings from the text layer as the PDF to Word converter does, then turns headings into chapters.
  • Writes a valid EPUB 3 package with an EPUB 2 NCX, one XHTML file per chapter and a readable default stylesheet.
  • Breaks chapters at the top heading level, at the top two levels, or not at all, and names the first chapter after the book when text precedes the first heading.
  • Sets the book's language from a list of thirteen and an optional author, with the title taken from the file name.
  • Reports pages, words, headings and the resulting EPUB chapter count, and warns when no headings could be found.

How the PDF becomes chapters

Lines and paragraphs are rebuilt from the text layer exactly as the PDF to Word converter does it, and that page explains the grouping rules. What matters for an ebook is the heading decision, because headings become chapters: a paragraph of at most two lines and 120 characters whose font size is at least 1.25 times the body size is a heading, level 1 from 1.7 times the body size upwards and level 2 below that. A large line that starts with a number, such as 1. Overview, is a heading; a body-sized line starting with a number or bullet is a list item.

The Chapters menu offers three rules: a break at every Heading 1, a break at Heading 1 and Heading 2, or a single chapter. When the document has no Heading 1 its top heading level stands in for it, so a report whose largest headings all came out as Heading 2 is still split per heading in the default mode. Text before the first chapter heading forms a first chapter named after the book, chapters with no text are dropped, and each chapter's heading text becomes its entry in the table of contents.

The package is an EPUB 3 zip with an EPUB 2 NCX for older readers, one XHTML file per chapter and a small stylesheet a reader may override. The book's title is the PDF's file name without its extension, the Language menu writes dc:language, and the Author field fills dc:creator.

How it works

pdf.js reads each page's text items with their positions and font names; the PDF to Word page describes how they are merged into lines and paragraphs. Each paragraph is then classified by size: body text, a list item when it starts with a bullet or a body-sized number, or a heading when it is short and at least a quarter larger than the body.

The EPUB writer splits the block list into chapters at the chosen heading levels, serialises each chapter to XHTML, generates the package document, navigation document, NCX and stylesheet, and zips them with the mimetype entry stored first and uncompressed, as the EPUB specification requires.

Common use cases

  • Reading a long government or academic report on an e-reader instead of printing it.
  • Converting a public-domain book that only exists as a typeset PDF into an EPUB that reflows on a phone.
  • Turning a product manual delivered as PDF into an ebook so field staff can search it and resize the text on a tablet.
  • A self-publishing author checks how a print-ready PDF would read as an ebook before commissioning a proper EPUB.

How to use this tool

  1. Choose or drop a PDF. Without any further click the text is read and the EPUB built with the default settings: a new chapter at every Heading 1, English, no author.
  2. Read the summary: the pages, headings and EPUB chapter chips tell you whether the chapter rule matched the document. Change Chapters if the count is wrong.
  3. Set Language and type an Author, pressing Enter to apply it.
  4. Scan the preview for interleaved columns and stray page numbers, then choose Download .epub, or Edit in Word editor to clean the text first.

Example

annual-report-2025.pdf, text lines as positioned (size, font, baseline)

page 1
  Annual Report 2025                 28pt  Helvetica-Bold  y=700
  Prepared by the finance team       11pt  Helvetica       y=660
  Overview                           14pt  Helvetica-Bold  y=610
  Sales rose nine percent, led by    11pt  Helvetica       y=580
  the European team.                 11pt  Helvetica       y=566
  • Six engineers hired              11pt  Helvetica       y=540
page 2
  Outlook                            14pt  Helvetica-Bold  y=700
  The team expects steady growth.    11pt  Helvetica       y=670
  Page 2 of 12                        9pt  Helvetica       y=40

annual-report-2025.epub with Chapters: Heading 1 and Heading 2

body size 11pt -> 28pt is Heading 1 (>= 1.7x), 14pt is Heading 2 (>= 1.25x)
OEBPS/nav.xhtml
  Annual Report 2025   -> chapter-001.xhtml
  Overview             -> chapter-002.xhtml
  Outlook              -> chapter-003.xhtml
OEBPS/chapter-002.xhtml
  <h2><strong>Overview</strong></h2>
  <p>Sales rose nine percent, led by the European team.</p>
  <ul><li>Six engineers hired</li></ul>
OEBPS/chapter-003.xhtml
  <h2><strong>Outlook</strong></h2>
  <p>The team expects steady growth.</p>
  <p>Page 2 of 12</p>                <- footer text kept as a paragraph
content.opf: <dc:title>annual-report-2025</dc:title>, <dc:language>en</dc:language>
Summary: 2 pages · 31 words · 4 paragraphs · 3 headings · 1 list item · 3 EPUB chapters
(with the default New chapter at every Heading 1: 1 EPUB chapter)

Tips for best results

  • Rename the PDF before you convert. The file name becomes the book title in the reader's library, so quarterly-report-final-v3.pdf is worth renaming to Quarterly Report 2025.pdf first.
  • If the summary shows 1 EPUB chapter for a document that clearly has sections, the title is probably the only Heading 1 and the sections were read as Heading 2; switch Chapters to New chapter at Heading 1 and Heading 2.
  • Set the Language to match the text. Readers use it for hyphenation and dictionary lookup; it is written into the book's metadata, not detected from the text.
  • Running headers and page numbers show up in the preview as short one-line paragraphs. To remove them, use Edit in Word editor, delete them there, download the .docx and run it through the Word to EPUB converter.

Edge cases to watch

Two-column pages interleave their columns sentence by sentence, which is far more disruptive in a reflowed ebook than in an editable file.

Headers, footers and page numbers become stray one-line paragraphs between sections of the ebook.

Hyphenation at line ends is kept, so a word broken across lines in the PDF reads conver- sion on an e-reader.

Tables become lines of text, and figures, charts and photographs vanish without a warning.

Common errors and how to fix them

No selectable text was found in this PDF. Scanned PDFs need OCR before they can be converted.
The pages are pictures. An OCR tool, which many scanners and PDF apps include, adds a hidden text layer; convert its output.
This PDF is password-protected. Remove the password with Unlock PDF, then try again.
This converter does not ask for passwords. Run the file through the Unlock PDF tool on this site first: it takes the password the reader knows and saves a copy without one, which converts normally here.
No chapter headings were detected, so the book has a single chapter.
A warning rather than an error: no paragraph was short and at least a quarter larger than the body text, so there was nothing to split on. Accept a single-chapter book, or take the result into the Word editor, apply Heading 1 to the section titles, download the .docx and use the Word to EPUB converter.
This file is larger than 25MB. Split it into smaller files and try again.
Large PDFs are large because of images, which the ebook will not contain anyway. Break the PDF up with this site's Split PDF tool and convert each part, or compress the images first.

Best practices

  • Start from the PDF closest to the source: an export from Word or InDesign converts far better than a scan or a print-to-PDF of a web page.
  • Flatten forms and strip comments before converting: values typed into form fields and the text of annotations live outside the page content and are never read.
  • Give the book its metadata here (file name for the title, language, author); fixing it afterwards means editing the EPUB by hand.

How headings and chapters are detected

The detector has no access to the PDF's structure tags or to the heading styles of the program that produced it; it sees only font sizes. It first finds the body size: every line's size is rounded to the nearest half point and the size that accounts for the most characters wins. The 1.25 and 1.7 multipliers are then applied to that figure, so with an 11pt body a short line of roughly 14pt or more becomes a second-level heading and one of roughly 19pt or more a first-level heading.

Two consequences follow. A document whose section titles are 12pt bold is below the threshold, so it yields no headings and a single-chapter book with a warning; and a numbered title such as 3. Methods counts as a heading only when it is set that much larger than the body, otherwise its leading number makes it a numbered list item. Once headings exist, the Chapters option decides which levels begin a new XHTML file, measured from the top level actually present: a report with a 28pt title and 14pt sections gives one chapter in the default mode and a chapter per section in Heading 1 and Heading 2 mode, while a report with 14pt sections and no larger title gets a chapter per section straight away.

Frequently asked questions

Why does my EPUB have only one chapter?

Either no text is noticeably larger than the body, in which case the warning says so, or the title is the only Heading 1 and the sections are Heading 2; switch the Chapters menu to its Heading 1 and Heading 2 setting.

Where does the book title come from?

From the PDF's file name without its extension. The converter does not read the PDF's title metadata, so rename the file before converting if you want a tidy title in your reader's library.

Are images and the cover included?

No. Only the text layer is read; pictures, diagrams and the cover page's artwork are left out and are not counted in a warning. Add a cover in an ebook manager such as Calibre afterwards.

Can I convert a scanned book?

Not directly. A scan has no text layer, so the tool stops with a message. OCR the PDF first; the OCR layer converts normally, though recognition errors carry into the ebook.