iloveepub
Menu
EN

Processed locally — files never leave your device

TXT to EPUB

Turn any plain-text file into a real e-book: chapter headings become a linked table of contents, GBK and Big5 encodings are detected automatically, and readable typography replaces the wall of text. Everything runs locally in your browser — your file is never uploaded. Free, no accounts, no limits.

01Select your TXT

02Convert & download

How to convert TXT to EPUB

  1. Select your TXT file

    Open the .txt file from your device. It is read by your browser directly — nothing is uploaded anywhere.

  2. Convert to EPUB

    The encoding is detected automatically and chapter headings become a linked table of contents. A progress bar follows along while it runs locally.

  3. Download the EPUB

    Save the .epub file and open it in any reader — Kindle, Kobo, Apple Books, Calibre or your phone's reading app.

Why turn a TXT into an EPUB?

TXT is the lowest common denominator of text: it opens everywhere, but it reads like a scroll. A TXT novel opened in an e-reader app has no chapters to jump between, no table of contents, no control over font size or line spacing — just thousands of identical lines. Converting it to EPUB gives the same text a book's skeleton: a navigable table of contents, chapter breaks, proper paragraph spacing and a title page, so any e-reader can treat it like a store-bought book.

EPUB is also the format your devices actually want. Kindle, Kobo, Apple Books and Google Play Books all import EPUB directly, sync reading position across devices, and remember where you stopped — none of which a TXT file can do.

How chapters are detected

The converter scans the text line by line for chapter headings. In Chinese, lines beginning with patterns like 第一章, 第十二章, 第三节, 第一卷 — as well as 序章, 楔子, 前言, 引子, 后记, 尾声 and 番外 — are treated as chapter titles. In English, lines such as Chapter 12 or Chapter IV, plus Prologue and Epilogue, are recognized the same way. Each heading starts a new chapter that lands in the table of contents under its own title.

If a file contains no recognizable headings at all, the text is split into even parts of roughly 4,000 lines or 100,000 characters each, named Chapter 1, Chapter 2 and so on — so even a heading-less dump still becomes a navigable book. Anything before the first heading is kept as its own opening section under the book title.

Text encodings, handled for you

Plain text has no label saying which encoding it is in, and Chinese TXT files in particular arrive in many dialects: UTF-8 from modern sources, GBK from mainland Windows tools, Big5 from Taiwan and Hong Kong. This converter tries strict UTF-8 first; if the bytes are not valid UTF-8 it tries GBK, then Big5, and only falls back to Latin-1 when nothing else fits. The encoding actually used is shown next to the download button, so a GBK novel is never silently turned into mojibake.

Whatever the source encoding, the output EPUB is always UTF-8, which every modern e-reader renders correctly for Chinese, Japanese, Korean, Arabic and all other scripts.

Frequently asked questions

Does it work with Chinese TXT files?

Yes. Chinese novels are the main use case: GBK and Big5 encodings are detected automatically, and Chinese chapter markers like 第一章, 第三节, 序章, 楔子 and 番外 are recognized as chapter headings, so a linked table of contents is built for you.

How are chapters split?

Lines that look like chapter headings — 第X章 / 第X卷 / Chapter 12 / Chapter IV / Prologue and similar patterns — each start a new chapter. If no headings are found at all, the text is split into even parts of about 4,000 lines or 100,000 characters, named Chapter 1, Chapter 2 and so on.

What encodings are supported?

UTF-8, GBK and Big5 are tried automatically in that order, with Latin-1 as a last resort. The encoding that was actually detected is shown in the result line next to the download button. The output EPUB is always UTF-8.

Can I convert TXT to EPUB on my phone?

Yes. The converter runs in any modern mobile browser. Once the EPUB is downloaded, open it with your reading app — Apple Books on iOS, or any ePub reader on Android — and the chapters and table of contents will be there.

Is my file uploaded to a server?

Never. The whole conversion — encoding detection, chapter splitting and EPUB packaging — happens inside your browser. You can verify it yourself: open your browser's network inspector while converting and you will see zero uploads.

Is there a file size limit or a fee?

Files up to 120 MB are supported, with a performance warning above 100 MB. Every tool on iloveepub is free, with no accounts, no credits and no daily limits — the site is supported by ads.

Related tools