Sometimes you just want the words out of an ebook — to search them, count them, quote them, or feed them into another tool. This extractor pulls the full text out of an EPUB right in your browser, in proper reading order, with no reader app and no upload.
How it works
An EPUB is a ZIP archive of XHTML chapter files plus a package document. The extractor:
- Unzips the archive, inflating compressed entries with the browser’s native decompression API.
- Reads
META-INF/container.xmlto find the OPF package, then reads the OPF spine — the list that defines the book’s reading order. - For each content document in that order, it removes
<script>and<style>blocks, converts block-level tags to line breaks, strips the remaining HTML, and decodes character entities. - Joins the chapters together and reports a word count.
What you can do with the extracted text
Search without an ebook reader. EPUB readers are designed for reading, not searching across a large collection. Extracting to plain text lets you use any text editor, grep, or search tool to find specific passages, terminology, or character names.
Word and character counts. Academic and editorial work sometimes requires a count of actual words in a manuscript. Paste the extracted text into a word counter to get accurate totals across the whole book, not estimates.
Feed into AI tools. If you want to ask questions about a book’s content, extract the text first and then paste it into an AI assistant. Text-based EPUB extraction gives a cleaner, more coherent input than copying from an ebook reader’s pages.
Accessibility conversion. Plain text is the easiest format to convert to large print, to feed into a text-to-speech engine for personal use, or to process for screen-reader workflows.
Diff and compare editions. If you have two editions of the same text as EPUBs, extract both to plain text and run a text diff to see exactly what changed between them.
Understanding the EPUB format
EPUB 2 and EPUB 3 are both ZIP archives, but their internal structure differs slightly. EPUB 2 uses an OPF file and a toc.ncx for navigation. EPUB 3 replaces toc.ncx with a navigation document and may use HTML5 and SVG content. This extractor follows the OPF spine in both versions, so the reading order is correct regardless of which EPUB version your file is.
The container.xml file at META-INF/container.xml is the always-stable entry point. It points to the OPF file regardless of where the publisher placed it in the archive hierarchy, which is why all conforming EPUB extractors start there.
Tips and notes
- The output is plain text: paragraph and heading breaks are kept as newlines, but all styling, fonts, and images are dropped — exactly what you want for analysis or search.
- Use Copy text to paste into a document, or Download .txt to save the whole book as a single file.
- DRM-free, text-based EPUBs work best. DRM-encrypted books (common on commercial ebooks from Kindle, Kobo, and Adobe) encrypt the chapter content and cannot be extracted by this or any browser-based tool.
- Image-only EPUBs — such as scanned comic books or picture books — contain no extractable text because the content is in image files rather than XHTML documents.
- Everything runs locally, so your ebook never leaves your device.