Convert TXT to EPUB
FileReshape's TXT to EPUB converter turns a plain text file into an EPUB 3 e-book. It finds chapter headings such as "Chapter 1" or "Part Two" and makes a table of contents from them, joins hard-wrapped lines into paragraphs, and lets you set the title and author. The file is converted in your browser and is not uploaded.
Did a file not convert correctly? E-mail [email protected], ideally with a small sample file, and it will be fixed.
Key facts
- Input: Plain text (.txt). Output: EPUB (.epub).
- Your files are not uploaded: the work is done in your browser, on your own device.
- File size: up to 300 MB per book.
- Needs a current browser (Chrome, Edge, Firefox or Safari) on a computer, tablet or phone; nothing to install.
- Free to use, with no sign-up.
Why convert TXT to EPUB
A long text in a .txt file is hard to read on a phone or e-reader: the lines are often broken at a fixed width, there is no table of contents, and the reader cannot remember where you were in a file without chapters. An EPUB fixes that. The text reflows to the screen, the app keeps your place, and you can jump from chapter to chapter. This tool reads the text file in your browser (UTF-8, UTF-16 or older Windows encodings), looks for lines that look like chapter headings in English and several other languages, as well as Markdown headings, and makes each one a chapter. Lines that were wrapped at a fixed width, as in Project Gutenberg texts, are joined into normal paragraphs, while short lines such as poems and addresses keep their line breaks.
How to convert TXT to EPUB
- Drop your .txt file in the box, or click to choose it. The page shows how many chapter headings it found.
- Check the title and add the author. Choose "No chapters" if the headings found are wrong.
- Click Convert to EPUB and save the e-book.
What changes when you convert
Chapter headings need a line of their own
A heading is found when it stands alone on a short line after an empty line and starts with a word like Chapter, Part, Book, Prologue or Epilogue (or Kapitel, Chapitre, Capítulo, Hoofdstuk, Rozdział), or is a Markdown heading starting with #. A title on the next line, as in "CHAPTER I" followed by "The Keeper", is joined to it. Texts with other headings become one long chapter.
Plain text has no formatting
A text file has no bold, italics, pictures or fonts, so the e-book has none either. The EPUB uses a plain stylesheet, and your reading app picks the typeface and size.
Wrong letters in the result
If letters like é or ø look wrong, the text was saved in an encoding the tool did not guess. UTF-8 and Windows-1252 are recognised. Open the file in a text editor, save it as UTF-8 and convert it again.
About the formats
Plain text
A plain text file (.txt) holds only characters and line breaks: no fonts, colours, images or layout. That makes it the most portable document format there is, readable by every editor, search tool and programming language.
- The encoding decides how letters beyond A-Z are stored; UTF-8 covers every alphabet.
- Windows ends lines with CR LF, Mac and Linux with LF; current editors read both.
- There is no page layout, so page breaks are written as marker lines or form feed characters.
EPUB
EPUB is the open standard for e-books, first published by the IDPF in 2007 and maintained by the W3C since 2017. Apple Books, Kobo, Google Play Books and most library and e-reader apps open it. The text reflows to fit the screen and the reader's chosen font size, so an EPUB has no fixed pages.
- An EPUB is a ZIP archive of XHTML pages, CSS, images and fonts, plus a package file (.opf) that lists them.
- The spine in the package file sets the reading order. EPUB 2 (2007) and EPUB 3 (2011 onwards) are both common.
- Books with DRM, such as Adobe ADEPT or Apple FairPlay, are encrypted and only open in the apps that hold the key. Kindle books use Amazon's own formats, not EPUB.
- Fixed-layout EPUBs, used for comics and picture books, have set pages instead of reflowing text.
Frequently asked questions
Is my text uploaded?
No. The text file is read and the EPUB is written by your browser on your own device. Nothing is sent to a server.
Can I send the EPUB to my Kindle?
Yes. Send to Kindle accepts EPUB files. It also takes plain text, but an EPUB keeps the chapters and the title, and the Kindle shows a table of contents.
Which language does the e-book get?
The book's language is set to the language of this page, which reading apps use for hyphenation and text-to-speech.
Can I convert a Markdown file?
Yes. Lines that start with #, ## or ### become chapters. Other Markdown formatting stays as plain text.