Skip to converter

EPUB to TXT — the spine decides the order, unreferenced files are skipped

An ebook is a ZIP archive of small HTML documents, and the filenames inside it often do not match the order a reader sees. The conversion walks the spine — the manifest that declares reading order — and writes the text in that sequence. A file that exists in the archive but is not referenced by the spine never appears in the output.

Page layout, fonts, margins, headers, footers and page breaks are not reproduced: the text stream is reflowed, not re-laid-out.

Drop files here or EPUB, up to 8 MB
    Add a file to start.

    Processed on your device. Files aren’t sent anywhere.

    No sign-up. Nothing to install.

    The spine is the reading order

    EPUB separates two things: the files in the archive and the order in which they are read.

    • The archive holds chapter documents, styles, images and metadata.
    • The spine lists which documents are part of the reading flow, and in what sequence.
    • The extraction follows that list, so output order matches the order a reader experiences.
    • Documents not listed in the spine are skipped, even when they are valid files inside the archive.
    • Only text is extracted: images, page layout and fonts are dropped.

    Questions about spine-based extraction

    Why is a chapter missing from the text?
    Only documents listed in the spine are read, in spine order. A file that exists in the archive but is not referenced is skipped, which is how covers and production leftovers behave.
    Does the output follow the filenames?
    No. Filenames such as 03.xhtml can appear first if the spine places them first. Reading order comes from the spine, not from the archive listing.
    Are the ebook's images kept?
    No. Embedded images, layout and fonts are dropped; plain text also flattens headings, lists and tables into lines.
    How big an ebook can be converted?
    One file up to 8 MiB, output capped at 400000 characters. ZIP entries are limited to 4 MiB each and 16 MiB total, so an oversized archive is rejected rather than partially read.

    File order versus output order

    Consider an ebook whose chapter files were named during production in a different sequence from the reading order.

    File in the archiveSpine positionPosition in the TXT output
    03.xhtmlfirst in the spinefirst text in the output
    01.xhtmlsecond in the spinesecond text in the output
    02.xhtmlthird in the spinethird text in the output
    appendix.xhtmlnot in the spineabsent from the output
    cover.xhtmlnot in the spineabsent from the output

    Chapters the spine does not reference

    A missing chapter is usually not a failure. Covers, title pages and production leftovers commonly live in the archive without being part of the spine, so they are correctly ignored.

    If a chapter you expected is absent, that is worth checking rather than assuming the reader broke: only spine-listed documents are read. Convert the same file toward HTML and compare, or inspect the spine in the archive to see whether the chapter is listed.

    Checking the extracted text

    Because headings, lists and tables become plain lines, verification is about sequence and coverage.

    1. Convert the .epub and download the .txt.
    2. Read the first lines and confirm they match the chapter the ebook opens with.
    3. Search for a phrase from the last spine-listed chapter to confirm the walk reached the end.
    4. Look for the chapter you expected but did not find, then check whether the spine lists it.
    5. Compare the character count with the 400000-character output cap.
    6. If structure matters, convert the same ebook toward sanitized HTML.

    The spine is a promise about reading order; the archive listing is only a directory.

    Why filenames mislead when you extract an ebook

    Share this converter

    More sharing options