04 / Create · TXT → EPUB

TXT to EPUB converter

Give your text a home.

Convert TXT files or pasted text into an EPUB with chapters, a contents list and book metadata. Choose the source encoding, review the detected headings and keep the chapters you need. This is for turning existing writing into a navigable ebook; it does not rewrite your manuscript or add illustrations.

  • A .txt up to 10 MB, or pasted text
  • Chapters you review before the export
  • Runs in this tab; nothing is uploaded
All tools
Opening your workspace…

At a glance

TXT to EPUB quick specs

Verified
Input
Plain text (.txt, .text) or pasted prose
Output
EPUB 3 with detected chapters, contents & metadata
Scope & limit
Up to 10 MB per file
Processing
Local in your browser — files never upload
Price & account
Free; no sign-up or install required
Key boundary
Plain text only; use Markdown or Word converters for rich formatting

From file to finished

How to convert a TXT file to EPUB

  1. Choose a .txt or .text file, paste your text into the editor, or press Try sample text to load the three-chapter example.

  2. If the text looks wrong, pick the real encoding in the toolbar and press Reload file with this encoding; Auto only reads a Unicode byte-order mark.

  3. Choose a detection rule and press Review chapters; the sidebar lists what was found and the preview shows the selected chapter body.

  4. Rename or exclude chapters, tick Join single line breaks inside paragraphs for wrapped prose, and check that no heading-only row slipped in.

  5. Fill in Book title, Author and the language code, then press Download EPUB; the file is saved as the book title plus .epub.

Formats and inputs

Supported plain text formats and inputs

TXT stores characters without a book package, cover or dependable chapter structure. UTF-8, UTF-16, GB18030 and Big5 describe how its bytes become characters, not different ebook formats. EPUB adds reading order and navigation around that text. Choose the correct decoding before reviewing headings: packaging garbled text as EPUB does not repair it. A .text extension is accepted alongside .txt.

InputSupportWhat to expect
UTF-8 .txt or .text, with or without a byte-order markBest fitAuto reads the mark when present and falls back to UTF-8, then strips the mark and normalizes line endings. This is the path most .txt files take, and the one the chapter rules were written for.
UTF-16 little-endian or big-endian with a byte-order markWorksAuto recognizes both marks and decodes the file without a choice; the text is stored as UTF-8 in the EPUB. A UTF-16 file with no mark needs the matching entry in the picker.
GB18030 Chinese textWorksChoose Simplified Chinese (GB18030) and press Reload; Auto will not detect it. Strict decoding rejects an invalid byte sequence, which is why the reload message names the encoding rather than showing broken glyphs.
Big5 or Shift JIS textWorksBoth are named options in the picker and decode with the same strict setting. Pick the wrong one and the reload fails with a sentence naming the encoding, so a second attempt costs one click.
Windows-1252 legacy fileWorksSelect Western (Windows-1252) and reload. The decoder accepts the usual accented letters, but a file that mixes encodings can still fail on one byte, and the error names the encoding.
Markdown text with hash headingsPartialOnly # and ## lines are understood as headings; bold, links, lists and code fences stay as literal characters in the EPUB. Use it for a draft whose section marks are hashes, not for styled Markdown.
.docx, .pdf, .epub or .htmlNot supportedThe chooser accepts .txt, .text and text/plain only. A document with formatting has to be exported as plain text first, and HTML tags would be escaped and shown as text.
A file over 10 MB or a text over 5 million charactersNot supportedThe read stops before decoding, and pasted text is counted after normalization. Split the manuscript into volumes and build one EPUB per part; the 1,000 chapter ceiling is a separate limit.

What it can do

What TXT to EPUB can do

See the chapter list before you build

Paste or load the text, choose a detection rule and press Review chapters. Every heading the rule finds becomes a row you can rename, exclude or keep, and the preview shows the chapter body, shortened at 12,000 characters. Change the text or the rule afterward and the download stays disabled until you review again.

Start from a pasted manuscript, no file needed

The editor accepts typing and pasting directly, which suits a draft copied out of a writing app, a forum post or a notes file you never saved. The encoding picker and Reload button apply only to a chosen file; everything after the text — rules, chapter edits, metadata and export — works the same. Try sample text loads a three-chapter example.

Read GBK, Big5 and UTF-16 files correctly

Auto scans for a Unicode byte-order mark and nothing else, so a Chinese novel saved as GB18030 or a Shift JIS file fails the strict UTF-8 read under Auto. Pick the encoding by name, press Reload file with this encoding, and the same bytes are decoded strictly: an invalid sequence fails with a sentence naming the encoding rather than quiet replacement characters.

Split on the heading style the file already uses

English rules match Chapter 1, Part IV, Book Two or a lone Prologue; Chinese rules match 第一章, 第二卷 and similar forms; Markdown rules match one or two hash marks. A heading must fit on one line of 140 characters or fewer. One chapter mode skips the rules and keeps everything together, the safe choice for poetry or a file with no headings.

Set the three details an EPUB must carry

Book title, Author and language code feed the package metadata, and the title also names the download, with spaces kept and characters such as slashes replaced. The language field checks only the shape of a tag such as en, en-US or zh-Hans, so a bare word like English passes but tells a reader nothing. Chapter titles are written into both the visible heading and the contents list, so rename them here rather than after export.

Inspect a small, standard EPUB 3 package

The download contains a stored mimetype, container.xml, the OPF package, a navigation document, an NCX table of contents for older readers, a stylesheet and one XHTML file per included chapter. There is no cover, no image folder and no embedded font, so the file stays small and every part can be opened and checked with unzip.

After you run it

What you get from TXT to EPUB

The export is a single EPUB 3 file, not a folder or a link, and the page tells you when the download starts. Check these parts before you send the book to anyone.

What you getWhat it means
An EPUB file named after the book titlesafeFilename keeps spaces, replaces characters such as slashes and colons with dashes, trims the name to 120 characters and appends .epub; a blank title stops the build.
One XHTML document per included chapterchapter-1.xhtml onward, in the order shown in the sidebar; excluded rows are absent and renamed chapter titles become the visible heading and the document title.
A contents list in nav.xhtml and toc.ncxBoth files list every included chapter in the same order, which is what a reading app shows as the table of contents and what a chapter jump uses.
Package metadata from the three fieldscontent.opf carries the title, the language and the author when one is given; without an author the creator element is omitted rather than written empty.
A completion message and a downloaded fileThe status line reads “EPUB created. Your download should start automatically.” and the file lands in the downloads folder; pressing Download EPUB again rebuilds it from the current list.
A way to confirm the structureUnzip the file: mimetype must be first and stored, chapter files must match the included rows, and the nav list must have the same number of entries.
No cover, images or fontsThe package is text and CSS only, declares no cover image and carries no artwork; add those in an EPUB editor if the title needs them.

When people reach for it

Common TXT to EPUB use cases

A plain-text source works well for prose that needs book navigation rather than rich page design. The tasks below assume the words already exist; editing, translation and image preparation belong in the source workflow.

If you need to…What this tool does
Turn a finished draft into an EPUB for a beta readerLoad the .txt or paste the draft, review the Chapter rows, set the title and author, and send the exported file; nothing is rewritten on the way.
Read a Project Gutenberg .txt on an e-readerThe Chapter and Part lines become a contents list, and the EPUB opens at the first chapter instead of one long scroll.
Package class readings copied from a documentPaste each reading, put a heading line above it, and export one book whose contents list follows the syllabus order.
Convert a Chinese novel saved as GBK or Big5Choose GB18030 or Big5, reload the file, then use the Chinese rule; chapter lines such as 第一章 become separate documents.
Fix a manuscript whose headings are all hash marksPick Markdown headings and the hash marks are stripped from the chapter titles instead of appearing in the book.
Make a one-chapter EPUB to test a reading appChoose One chapter, keep a short text together and export; the file opens as a single document with one contents entry.

Why use it

Why convert TXT to EPUB in your browser

Use this route when the manuscript is already plain text and the missing piece is ebook structure. You can review how the source becomes chapters without learning package markup or introducing formatting that the original never contained.

Turn a text archive into a navigable edition

A long novel in one file is portable but difficult to move around on an e-reader. Chapter review lets you decide whether the detected structure reflects the book before handing it to someone else.

Separate a decoding problem from a writing problem

Garbled punctuation and Chinese characters can come from the wrong encoding, even when the original file is intact. Choosing and reloading the encoding first prevents unnecessary manual edits that would damage an otherwise correct manuscript.

Keep manuscript revision in the original workflow

The conversion does not invent summaries, chapter names or new prose. You can keep the text file as the editing master and create reading copies from it, rather than maintaining two separately revised versions of the book.

Catch false chapter breaks before distribution

A heading rule can mistake a short line for a chapter or miss an unusual title style. Reviewing the detected list is a practical checkpoint before a beta reader receives a book with confusing navigation.

When it does not work

Why TXT to EPUB may fail

The page refuses a file or a build at a few fixed points, and each refusal names the field or limit. Most are recoverable without leaving the tab; the encoding and size cases are the two that need a different source file.

  • The file is larger than 10 MB

    The chooser checks the byte size before reading, so the file never reaches the decoder. Split the manuscript or paste only the volume you need; the paste path has no byte limit, only the 5 million character limit.

  • Auto cannot decode the bytes

    A file without a byte-order mark is tried as UTF-8, and an invalid sequence stops the load with a sentence naming the encoding. GB18030, Big5, Shift JIS and Windows-1252 must be chosen by name before Reload.

  • The text is over 5 million characters

    The limit is checked after decoding and after pasted text is normalized, and the message asks you to split the book. Five million characters is roughly 800,000 words, so most manuscripts stay well under it.

  • More than 1,000 headings are found

    The counter trips on the next heading after the thousandth, which usually means a loose rule matched dialogue or notes. Switch to English or Chinese only, use One chapter, or split the text before reviewing.

  • The book title is empty

    The EPUB builder requires a non-blank title, so clearing the field blocks the download with “Give your book a title before downloading.” The same value seeds the saved file name, so fixing the title fixes both the metadata and the download name.

  • The language value fails the format check

    A space, underscore or one-letter code such as en US fails; a plain word like English passes, but it is not a useful tag. The accepted shape is two to eight letters, optionally followed by hyphen-separated subtags such as zh-Hans.

  • Every row is excluded or a chapter title is blank

    Clear selection leaves no included chapter, so Download EPUB disables itself. A chapter title can be cleared while the button stays enabled, and the click then reports “Give every included chapter a title.” Re-select a row or type a title.

Repair paths

How to fix common TXT to EPUB issues

Match the sentence in the status line to the row below. Each fix keeps the same tab and the same text; only the encoding case needs the file again.

What you seeLikely causeWhat to do
The characters change after ReloadA UTF-16 or legacy encoding was chosen for a UTF-8 fileSet the encoding back to Auto or UTF-8, press Reload, and compare the first line before reviewing chapters.
“This file could not be read as auto”The bytes are not valid UTF-8 and carry no byte-order markChoose GB18030, Big5, Shift JIS or Windows-1252 by name, then press Reload; the message repeats with the new encoding if it is still wrong.
“This file is larger than 10.0 MB”The byte limit is checked before decodingSplit the .txt into volumes, or paste one volume into the editor; the paste path is limited by characters, not megabytes.
“More than 1,000 chapter headings were detected”The selected rule matched too many short linesSwitch to English or Chinese only, or One chapter, and review again; split a genuinely huge book into parts.
“Give every included chapter a title”A chapter title input was clearedType a title in the row, or untick that chapter and download again; the title becomes the chapter heading and the contents entry.
“Give your book a title before downloading”The Book title field is emptyType a title, check the Author and language fields, and download; the saved file name follows the title with unsafe characters replaced.
“Use a language code such as en, en-US, fr or zh-Hans”The value contains a space, an underscore or fewer than two lettersReplace it with a code such as en, fr or zh-Hans; the value is written to the package metadata and to each chapter document.

Plain-language notes

Key TXT and EPUB terms explained

Only the terms that change a setting or explain a failure. Each one maps to something you can see in the sidebar, the picker or the exported package.

Byte-order mark

The first bytes of a UTF-16 or UTF-8 file that say which encoding wrote it. Auto reads this mark and nothing else, which is why a file in another encoding needs the picker.

UTF-8

A variable-width Unicode encoding that covers most scripts without a separate code page. It is the default decode path and the encoding the EPUB stores, so a file re-saved as UTF-8 needs no picker step.

GB18030

China’s national encoding, and the usual container for a novel saved by a Chinese word processor. It is not detected automatically, so choose Simplified Chinese (GB18030) and reload the file.

Chapter rule

The set of line patterns that turns a short line into a heading: Chapter, Part, Book, 第…章 or a Markdown hash. The rule is applied line by line after the line endings are normalized, and a line longer than 140 characters never matches.

XHTML

The XML form of HTML that EPUB reading systems expect. Each chapter becomes its own XHTML document, and characters such as < and & are escaped so a stray tag shows as text instead of breaking the book.

OPF package

content.opf is the manifest and spine: it lists every chapter file, points to the navigation and NCX files and carries the title, language and optional author. Reading apps read it before anything else.

NCX

An older table-of-contents format kept beside the EPUB 3 navigation document. Readers that ignore nav.xhtml still use toc.ncx, which is why both lists are written from the same chapter order.

Spine

The part of the OPF that fixes reading order. Every included chapter gets one itemref in sidebar order, so the only way to change that order is to move the heading lines in the source text and review again.

Plain text versus Markdown

A plain-text conversion does not interpret bold markers, links or tables as formatting. If those marks are intentional document structure, use Markdown to EPUB instead; otherwise they remain characters in the resulting book.

Other ways to do it

TXT to EPUB vs. alternatives

If the job is more than text plus a contents list, another tool is the better start. These are the four paths worth comparing before you spend time on metadata here.

OptionBetter whenTrade-off
calibre’s Convert booksThe source is .docx, .html or .rtf, or the book needs a cover, metadata series and a batch of titlesA desktop conversion workflow offers broader settings and library integration. Configure encoding and chapter detection for the source rather than relying on this page’s review list.
pandoc from the command lineThe manuscript is Markdown with links, emphasis and code, or the conversion belongs in a scriptUse metadata and conversion options in a command or source file, then inspect the resulting chapters in a reader. Suitable for repeatable builds and custom templates.
Sigil, an EPUB editorThe book already exists and the chapters, cover or stylesheet need direct editingA full editor allows markup and package changes. Keep one source of truth if you later regenerate the book from a plain-text manuscript.
The TXT reader on this siteYou only need to read the file in a browser, not hand it to an e-readerGives pages, search and a saved place, but produces no book file and no contents list you can share.
Leaving the file as .txtThe text is short, personal or read on a device that opens plain text directlyThe source stays unchanged. Navigation and encoding support depend on the receiving app, and no new EPUB package is created.

Your files and this tool

Privacy, accuracy and TXT to EPUB limits

The file is read and the EPUB is built inside this tab; the site has no endpoint that accepts a manuscript. What leaves the browser is the page itself and its analytics request, not the words you pasted.

  • The file is opened with the browser’s File API and decoded in memory. No request carries its bytes, and the text in the editor stays in the page until you close or reset it.
  • The EPUB is assembled with JSZip in memory and offered as a blob download; the temporary object URL is revoked after a minute, and nothing is written to localStorage by this tool.
  • Loading the page fetches the site’s scripts and styles, and the shared analytics tag sends a page-view request. Neither call includes the manuscript or the exported file.
  • There is no account, no server-side history and no saved draft, so a reload clears the text. Keep the source .txt if you expect to rebuild the book later.
  • The page writes title, author and language only. It does not add an ISBN, publisher, series, description or cover, and it does not run EPUBCheck, so a successful download is not a validation report.
  • Chapter detection is a fixed rule set and the preview is shortened at 12,000 characters. Read the chapter list rather than the preview to confirm every heading was found.

A little more detail

Frequently asked questions about TXT to EPUB

Can I paste text instead of choosing a file?

Yes. Click into the editor and paste, or press Try sample text to load a three-chapter example. Pasted text skips the file chooser, the byte limit and the encoding picker, but it still goes through the 5 million character check and the same chapter rules. The title, author and language fields, the chapter list and the download work exactly as they do for a loaded file.

Should I use TXT or Markdown for a manuscript with formatting?

Use TXT when you want the supplied characters treated as plain writing. Asterisks, links and table notation do not become rich formatting through this route. If your source intentionally uses Markdown structure, choose Markdown to EPUB instead. For a Word manuscript with images and linked notes, start with DOCX conversion rather than discarding that structure in a text export.

Why is my whole book one chapter?

None of the selected rule’s patterns matched a line, or the file has no headings at all. In that case the book is exported as one chapter titled Text. Check that the rule matches the language of the headings, that each heading sits on its own line of 140 characters or fewer, and that Markdown files use one or two hash marks rather than bold text.

Which encoding should I choose for a Chinese novel?

Try GB18030 first for a mainland edition and Big5 for a Taiwanese one, then press Reload file with this encoding. Auto will not find either, because it only looks for a Unicode byte-order mark. If the reload fails, the message names the encoding it tried; switch to the other Chinese option or re-save the file as UTF-8 in a text editor.

Can I add a cover or images?

No. A .txt file has no image references and this page writes no cover, image folder or embedded font. The EPUB contains XHTML chapters, a stylesheet, a navigation document, an NCX and the package file. Add artwork in an EPUB editor after export, or start from the images-to-EPUB tool if the pages are pictures rather than text.

What exactly is inside the downloaded EPUB?

A stored mimetype entry, META-INF/container.xml, and an OEBPS folder with chapter-1.xhtml onward, nav.xhtml, toc.ncx, book.css and content.opf. The OPF carries the title, language and author you entered, and the spine lists the chapters in sidebar order. There is no ISBN, publisher, description or cover metadata.

Is my manuscript uploaded to a server?

No. The file is read with the browser’s File API, decoded in the tab and packaged with JSZip in memory. The download is a blob created locally. The page loads the site’s scripts and styles, and the shared analytics tag sends a page-view request, but neither receives the text or the EPUB.

Why is the Download EPUB button disabled?

It stays disabled until a review succeeds; loading a file or the sample runs that review automatically, and editing the text or changing the rule disables it again. It also stays disabled while a chapter build is running or when every chapter is excluded. Review again, include at least one row, and the button returns.

Can I edit the text inside the page?

You can edit the source text and rename chapter titles, but there is no per-chapter body editor. Changing the text marks the review stale and disables the download until you review again. To fix wording, edit the .txt in a text editor and reload it, or paste the corrected text; the join option only affects how single line breaks are written, not the words.