Skip to main content
PDFBase

PDF to EPUB Converter

Local

Turn a PDF’s text into a reflowable EPUB 3 ebook

All Tools
PDF to EPUB
Local
Tool Details
Input formatsPDF
Output formatEPUB
Max file size50 MB
Max files1
ProcessingLocal

Privacy First

Your files are processed entirely in your browser. Nothing is uploaded to any server.

How do I convert a PDF to EPUB?

Add the PDF, choose how the book should be divided into chapters, and download the .epub. The converter rebuilds paragraphs, headings and lists from the PDF’s text layer and writes a complete EPUB 3: a package document carrying the title and author from the PDF’s metadata, a navigation document, an NCX for older readers, and one XHTML file per chapter. Nothing is uploaded.

About the PDF to EPUB Converter

Turn the text of a PDF into a valid EPUB 3 ebook that reflows to whatever screen it is read on. The converter rebuilds paragraphs, headings and lists from the PDF’s text layer, then writes a complete EPUB: an uncompressed mimetype entry first in the archive, META-INF/container.xml, a package document carrying the title, author and language from the PDF’s own metadata, an EPUB 3 navigation document plus an NCX for older readers, and one XHTML file per chapter. Chapters are split at the top two heading levels when the document has at least two of them, and in blocks of ten pages when it does not — or you can force either behaviour. This is a text conversion. Images, figures, page backgrounds and exact typography are not carried into the ebook, and tables arrive as lines of text rather than as tables. A scanned PDF has no text layer, so it produces a warning instead of an empty book.

  • Read a fixed-layout PDF on a phone or e-reader at a font size you choose, instead of zooming around an A4 page on a six-inch screen.
  • Send a report to a Kobo, Nook or Apple Books library, all of which take EPUB directly.
  • Keep a confidential manuscript off an upload-based converter while still getting a file your e-reader will open.
  • Get a chapter list that actually navigates: headings become a real EPUB 3 table of contents rather than one long scroll.

How to use the PDF to EPUB tool

  1. 1

    Upload PDF file

    Select PDF file from your device or drag file into the upload area.

  2. 2

    Choose settings

    Choose settings such as Chapter split before processing.

  3. 3

    Convert to EPUB

    Run the PDF to EPUB tool to create the EPUB output.

  4. 4

    Download the result

    Download the finished file. The original file stays on your device and is not uploaded.

Why convert a PDF to EPUB at all?

Because a PDF is a fixed page and an EPUB is reflowable text. On a six-inch e-reader or a phone, a page laid out for A4 forces you to zoom and pan across every line; the same content as EPUB wraps to the screen at whatever font size you set, and your reading position, bookmarks and highlights work the way the device intends. That single difference is the whole reason this conversion exists, and it is also why a converter that simply wraps page images in an EPUB — several do — gives you nothing at all.

How are the chapters decided?

Three ways, and you pick. "Auto" splits at the top two heading levels when the document has at least two of them, and otherwise falls back to blocks of ten pages titled "Pages 1–10", "Pages 11–20" and so on. "At every top-level heading" forces heading splitting even on a document with only one. "Every 10 pages" forces the page grouping, which is the honest choice for a scanned-in typescript or a report whose section titles are set at body size. Whichever you choose, the chapters become a real EPUB 3 table of contents that your reader can navigate.

Are images and page layout carried into the ebook?

No. This is a text conversion: photographs, charts, logos and page backgrounds are not included, and tables arrive as consecutive lines rather than as tables. Fonts, margins and column arrangement are replaced by the ebook stylesheet, which is what makes the text reflow. If the document is mostly figures — a photo book, an illustrated manual, a set of engineering drawings — EPUB is the wrong destination, and PDF to PNG or Extract Images From PDF will serve you better.

Will the file open on a Kindle, Kobo or Apple Books?

Kobo, Nook, Apple Books and Google Play Books read EPUB directly, so the file works as downloaded. Amazon’s Send to Kindle accepts EPUB too and converts it on their side; what this tool does not produce is MOBI or AZW3, which are different formats and are not claimed anywhere on this page. The output is EPUB 3 with an EPUB 2 NCX included as well, so older e-ink firmware that ignores the newer navigation document still shows a working table of contents.

Are my files uploaded when converting PDF to EPUB?

No. Everything — reading the PDF, inferring the structure, writing the XHTML, zipping the archive — happens in this browser tab. That matters for the documents people usually want as ebooks: unpublished manuscripts, internal handbooks, review copies under embargo. An upload-based converter has to hold the whole book on its server to do the same job, and several of the ones ranking for this search keep files for hours afterwards.

Convert a PDF to EPUB in code

Calibre is the offline equivalent of this page and does the job in one command. The other two snippets are for when you want to control where the chapters are cut, which is the part every automatic converter gets wrong on some documents.

Shell (Calibre)

ebook-convert ships with Calibre and picks the output format from the file extension.

# macOS: brew install --cask calibre   Debian/Ubuntu: apt install calibre
ebook-convert manual.pdf manual.epub

# --enable-heuristics runs Calibre cleanup pass: it unwraps lines that the
# PDF layout broke, deletes blank lines, repairs hyphenated words and
# promotes lines that look like headings. Useful on a text-heavy PDF, and
# worth reading the result of, because every one of those steps is a guess.
ebook-convert manual.pdf manual.epub --enable-heuristics

# --unwrap-factor tunes how eagerly PDF lines are joined (default 0.45)
ebook-convert manual.pdf manual.epub --unwrap-factor 0.6

Python (pypdf + EbookLib)

Extract the text yourself, then decide where the chapter boundaries go.

# pip install pypdf EbookLib
from pypdf import PdfReader
from ebooklib import epub

reader = PdfReader("manual.pdf")
book = epub.EpubBook()
book.set_identifier("urn:uuid:0f1d8f1e-2b3c-4d5e-8f90-a1b2c3d4e5f6")
book.set_title("Manual")
book.set_language("en")

chapters = []
for start in range(0, len(reader.pages), 10):
    group = reader.pages[start:start + 10]
    label = "Pages %d-%d" % (start + 1, start + len(group))
    body = "".join("<p>%s</p>" % (page.extract_text() or "") for page in group)
    item = epub.EpubHtml(title=label, file_name="chap_%04d.xhtml" % start, lang="en")
    item.content = "<h1>%s</h1>%s" % (label, body)
    book.add_item(item)
    chapters.append(item)

book.toc = tuple(chapters)
book.add_item(epub.EpubNcx())
book.add_item(epub.EpubNav())
book.spine = ["nav"] + chapters
epub.write_epub("manual.epub", book)

JavaScript (JSZip)

An EPUB is a ZIP with rules. The one that catches people out is the mimetype entry.

import JSZip from "jszip"

const zip = new JSZip()

// Must be the first entry AND stored uncompressed: a reader identifies
// the archive by reading these bytes at a fixed offset.
zip.file("mimetype", "application/epub+zip", { compression: "STORE" })

const container = [
  '<?xml version="1.0" encoding="UTF-8"?>',
  '<container version="1.0" xmlns="urn:oasis:names:tc:opendocument:xmlns:container">',
  '  <rootfiles>',
  '    <rootfile full-path="OEBPS/content.opf" media-type="application/oebps-package+xml"/>',
  '  </rootfiles>',
  '</container>',
].join("\n")

zip.file("META-INF/container.xml", container)

// ...then OEBPS/content.opf, OEBPS/nav.xhtml and one XHTML file per chapter.
const blob = await zip.generateAsync({ type: "blob", mimeType: "application/epub+zip" })

How to do this offline, on the command line

Calibre is the offline equivalent, and it is the better answer whenever you can install a desktop application: it reads more input formats and lets you tune the conversion.

ebook-convert

macOS: brew install --cask calibre · Debian/Ubuntu: apt install calibre

ebook-convert manual.pdf manual.epub --enable-heuristics

Part of Calibre. --enable-heuristics runs its cleanup pass — unwrapping lines the PDF layout broke, deleting blank lines, repairing hyphenation and promoting lines that look like headings. Each of those is a guess, so read the output before shipping it. Like this page, it does not OCR a scan.

Frequently Asked Questions

What exactly is inside the EPUB it produces?
A valid EPUB 3 archive: an uncompressed mimetype entry first, META-INF/container.xml, an OEBPS package document with the title, language and identifier, an EPUB 3 navigation document, an NCX table of contents for older readers, a stylesheet, and one XHTML file per chapter.
How does it decide where chapters begin?
On "Auto" it splits at the top two heading levels when the document has at least two of them, and otherwise groups every ten pages into a chapter named "Pages 1–10". You can force either behaviour with the Chapter split option.
Are the images from the PDF included in the ebook?
No. The conversion is text only — photographs, charts, logos and page backgrounds are dropped, and tables come across as lines of text. For an illustrated document, PDF to PNG or Extract Images From PDF is the better tool.
Can I read the result on a Kindle?
Amazon’s Send to Kindle accepts EPUB and converts it on their side, so yes, by that route. This tool does not produce MOBI or AZW3 — those are different formats. Kobo, Nook, Apple Books and Google Play Books open EPUB directly.
Where do the book title and author come from?
From the PDF’s document information dictionary: dc:title uses the PDF’s Title when it has a usable one and the filename otherwise, dc:creator is written only when the PDF names an Author, and dc:language follows the PDF’s declared language or defaults to English.
Does it work on a scanned book?
No. A scan is images of pages with no text layer, so there is nothing to reflow. The result card names every page that produced no text. OCR the file first, then convert the searchable copy.

Need More Tools?

Explore our collection of 58 free PDF tools, all with privacy-first processing.

Browse All Tools