EPUB to Text

Extract text and chapters out of an EPUB ebook locally, in your browser, with nothing uploaded.

Drop an ebook here and get its text back, chapter by chapter, in reading order. An EPUB is a ZIP archive (EPUB Open Container Format, OCF): META-INF/container.xml points at the package file, the package file lists every content file and the spine order, and the spine order is the reading order. This tool unzips the book in your browser, follows container to package to spine, and writes each chapter out as plain text. Nothing is uploaded. Books protected by DRM, which EPUB readers store under META-INF/encryption.xml, cannot be read by this tool, and the page says so plainly.

One book at a time. Large books with many chapters take a few seconds to unzip.

Honest limits. This tool extracts text only: images, layout, fonts and footnotes as links are not carried over, and a footnote becomes plain text in place where its link text sits. Poetry and verse keep their line breaks only where the file marks them as separate lines. Books with scrambled or missing spine entries may come out in file order rather than reading order, and the page says when the spine was missing. Encrypted books are refused, not partially read: a half-decrypted chapter would be worse than no chapter.

How an EPUB is put together

An EPUB is a ZIP archive, and its layout is fixed by the EPUB Open Container Format (OCF). The first file in the archive is mimetype, holding the single line application/epub+zip, uncompressed, with no trailing newline. Next, META-INF/container.xml names the package file through a rootfile element with a full-path attribute, usually something like OEBPS/content.opf or EPUB/package.opf. The package file is the heart of the book: its metadata block holds dc:title, dc:creator and dc:language, its manifest lists every content file with an id and a media type, and its spine lists the manifest ids in reading order through itemref elements. A chapter is normally one XHTML file in the manifest, referenced once in the spine.

That chain, container to package to spine to chapter, is the whole extraction job, and it is why reading order is trustworthy: the spine is the publisher's own reading order, not a guess from file names. EPUB 3 books add a navigation document, usually nav.xhtml, which is a nicer table of contents than the EPUB 2 NCX file, but the spine still defines the order, so this tool follows the spine and uses the navigation document only when it is present and useful. EPUB 2 books use the same container and package structure with a toc.ncx file instead of a navigation document, and they extract the same way.

DRM, stated plainly

Some store-bought books are encrypted, and the encryption is declared in META-INF/encryption.xml. No browser tool can read those chapters without the store's key, and this tool does not try: it reports the book as encrypted and stops, instead of returning scrambled text and calling it an extraction.

Why nothing is uploaded

Books are often bought, borrowed or personal. Extracting in the browser means the file is never sent anywhere, so there is no server copy to leak.

Frequently Asked Questions

Choose an .epub file on this page and press Extract text. The tool unzips the book in your browser, follows the container file to the package file to the spine order, and writes each chapter into the output box in reading order. Then copy the text or download it as a .txt file.
Yes. After extraction, use the chapter dropdown to show a single chapter, or keep All chapters for the whole book. The download always saves whatever the output box currently shows.
Because those books are encrypted with DRM, declared in META-INF/encryption.xml, and no browser tool can read them without the store's key. The tool reports the book as encrypted and stops, rather than returning scrambled text.
No. This tool extracts text only: fonts, layout and images are not carried over, and footnotes become plain text where their link text sits. If you need the book as it looks, keep the original EPUB.
Very little for text extraction. Both use the same container and package structure and the same spine order. EPUB 3 adds a navigation document instead of the EPUB 2 NCX table of contents, but the spine still defines the reading order, so both extract the same way.
No. The unzipping and the parsing run in your browser. The file never leaves your device.

Related Tools

Was this tool helpful?

Comments

Loading comments...

Check Out Other Popular Tools