How do you convert an EPUB to a TXT file?

The easiest free way to convert an EPUB to TXT is our EPUB to TXT converter: choose the book, click Create TXT, and the whole text downloads as one plain file, chapter by chapter. It runs in your browser on a computer or a phone, and the book is never uploaded. If you'd rather work offline, Calibre does the same job, and you can also pull the text straight out of the EPUB by hand. Below are all three methods, the command-line options, and what a plain text file keeps and loses.

Captain EPUB holding up an open book that travels into a funnel, which drips plain text into a TXT notepad while a picture and a bold letter bounce off

Why convert an EPUB to plain text?

A TXT file has no chapters, fonts, images or layout: just the words, one paragraph after another. That is exactly what some jobs need:

If you only want to read the book, you don't need to convert it: open it in our online EPUB reader or one of the apps in our guide to opening EPUB files. And if you want to edit the text and keep the formatting, Word is a better target than TXT; see EPUB to Word.

All the methods below work only with DRM-free books: public-domain titles, books from DRM-free stores, or files you made yourself. Books locked to a store can't be converted, and our own tools reject them too.

Method 1: Convert it in your browser (the easiest)

Our free EPUB to TXT converter extracts the text on your own device: nothing is uploaded, there's no account, and it works on Windows, Mac, Linux, Android and iPhone. It also converts MOBI, AZW3 and FB2.

  1. Open the EPUB to TXT converter and choose your book, or drag it onto the box.
  2. Check the title and author. Leave Start the file with the title and author on if you want them at the top.
  3. Choose the line endings: Windows (CRLF) for Notepad and other Windows apps, LF for everything else.
  4. Click Create TXT. The file downloads with the book's name, and Copy all the text puts it on your clipboard instead.

The TXT file keeps each paragraph on its own line, with a blank line between paragraphs if you leave that option on. Line breaks in poems stay, table cells are separated by tabs, and chapters are separated by two blank lines. It's saved as UTF-8, so accents and every alphabet come through unchanged.

Convert EPUB to TXT now

Free, in your browser, and your book never leaves your device.

Open the EPUB to TXT converter

Method 2: Calibre, offline

Calibre is a free, open-source ebook manager for Windows, macOS and Linux. Its converter reads EPUB, MOBI, AZW3 and many other formats and writes TXT directly.

  1. Install Calibre from calibre-ebook.com and open it.
  2. Add the EPUB: drag the file onto the Calibre window, or click Add books and choose it.
  3. Open the converter: select the book and click Convert books in the toolbar. To convert several books at once, select them all first; Calibre then offers a bulk conversion.
  4. Choose TXT: in the top-right corner of the window, set Output format to TXT.
  5. Check the TXT options (optional): in the left column, click TXT output. The next section explains the settings that matter.
  6. Convert: click OK. The job runs in the background; you can follow it under Jobs, at the bottom right.
  7. Find the file: when it finishes, right-click the book and choose Open containing folder. The .txt file sits next to the EPUB in Calibre's library folder; copy it wherever you need it.

The result opens in Notepad, TextEdit, any code editor, and on most phones.

Tip: before converting, open the EPUB in our online EPUB reader to check that it opens and isn't protected. If you have a DRM-free MOBI or AZW3 instead, Calibre converts it to TXT too, or you can turn it into an EPUB first with our MOBI to EPUB converter.

The TXT output settings worth knowing

Calibre's defaults give a clean UTF-8 file, but a few settings under TXT output change the result a lot:

Method 3: Copy the text out of the EPUB by hand

An EPUB is a ZIP archive. Each chapter is an XHTML web page inside it, so on a computer where you can't install software you can still get the text:

  1. Make a copy of the EPUB and change its extension from .epub to .zip. On Windows, turn on View > Show > File name extensions in File Explorer first if you can't see the extension.
  2. Extract the ZIP: right-click it and choose Extract All on Windows, or double-click it on a Mac.
  3. Find the chapters: they are .xhtml or .html files, usually in a folder called OEBPS, OPS, Text or similar. The file names often follow the reading order, but not always; the .opf file in the same folder lists the official order.
  4. Open each chapter in your web browser, select all the text with Ctrl+A (Cmd+A on a Mac), copy it and paste it into Notepad or TextEdit.
  5. Save as plain text. In TextEdit, choose Format > Make Plain Text before saving.

This is fine for a few chapters, but slow for a whole novel with forty files. On a Mac, the built-in textutil command can convert the chapter files in one go: open Terminal in the extracted folder and run textutil -format html -cat txt -output book.txt *.xhtml. Check the order of the result, since the files are joined alphabetically.

Check your EPUB before you convert it

Open EPUB, MOBI, AZW3 and FB2 files right in your browser to see the chapters and confirm the book isn't protected. Free, and nothing is uploaded.

Open the EPUB reader

Method 4: The command line (Calibre or Pandoc)

Calibre installs a command-line converter called ebook-convert. The format comes from the file extension:

ebook-convert book.epub book.txt

Every setting from the previous section has a matching option, for example --txt-output-formatting=markdown, --max-line-length=70 or --inline-toc. Run ebook-convert book.epub book.txt -h to see the full list for your version. A short shell loop converts a whole folder of books.

Pandoc, a free document converter, also reads EPUB:

pandoc book.epub -t plain -o book.txt

Pandoc's plain output marks headings and emphasis lightly and wraps lines at 72 characters by default; add --wrap=none to keep each paragraph on one line. Use -t markdown instead if you want headings and links kept as Markdown.

Why your book shouldn't be uploaded

Most online converters work by uploading your file to their servers, converting it there and sending the result back, often with limits on file size and conversions per day. That's a poor fit for a manuscript, a book you're translating or anything private. Our EPUB to TXT converter does the whole job inside your browser, so the book stays on your computer or phone, and there are no limits beyond your device's memory.

What you lose in a TXT file

If you want to change a few words and keep the book an ebook, don't go through TXT at all: our guide to editing an EPUB file shows how to edit it directly.

Frequently asked questions

How do I convert EPUB to TXT for free?

Open our EPUB to TXT converter, choose the book and click Create TXT. It's free, needs no account and doesn't upload the book. To work offline, Calibre does the same: add the book, click Convert books, set Output format to TXT and click OK.

Can I convert EPUB to TXT on my phone?

Yes. Our EPUB to TXT converter works in the phone's browser on Android and iPhone: choose the book from your files, and the TXT goes to your downloads. You can also copy all the text and paste it into a notes app.

Why is my TXT file empty?

The book is probably made of images, like a comic, a children's picture book or a scanned PDF turned into an EPUB. There is no text to extract. If the book does have text and the file is still empty, check that it isn't protected with DRM by opening it in a reader first.

Can I convert a TXT file back into an EPUB?

Yes. Calibre also converts TXT to EPUB, and it can detect chapter headings in the text. The result is a plain book, so add a title, author and cover afterwards with our metadata editor and cover changer.

Related guides