Why an EPUB Chapter Export May Split Differently Than You Expect

You download a book as separate Markdown files and expect one file for every chapter listed in its contents. Instead, an introduction gets its own file, two sections stay together, or a heading you added becomes a new boundary. The reason is simple: this export splits the edited Markdown by headings. It doesn’t promise to reproduce the original book’s internal chapter files.

Use an EPUB you have permission to convert. DRM-protected, password-protected, and damaged books are unsupported, and you shouldn’t bypass DRM. The tool accepts one EPUB 2 or EPUB 3 at a time and converts it automatically once you select it.

Decide what should count as a boundary

In the editor, find the Markdown headings that mark the divisions you want. The splitter recognizes ATX-style headings whose # markers begin directly at the start of a line and are followed by a space or tab. It first finds the highest heading level that appears at least twice outside fenced code blocks. Headings at that level and all higher levels then start files, even when a higher-level heading appears only once. A level-one heading is higher than a level-two heading; a heading inside a fenced code block does not create a split. The current implementation does not recognize indented code as a code block for this purpose, so check any heading-like lines there.

Suppose, hypothetically, your edited document has three level-one headings for major parts and several level-two headings for chapters. The repeated level-one headings are higher, so they determine the split. If your goal is one file per chapter, you may need to change the heading levels and review the result. Adding, removing, or changing a qualifying heading can also change where files begin and end.

Text before the first split heading goes into a numbered preamble file, usually 00-start.md; the numbering gains extra zero-padding when there are more files. For example, a 100-file export uses 000-start.md. A single level-one book title followed by two level-two chapter headings can produce a title file and two chapter files. If there are fewer than two qualifying chapter headings, the export falls back to one Markdown file; that is not a failed export. These rules describe the exported Markdown boundaries, not necessarily the source EPUB’s internal files or its table of contents.

The Headings counter counts headings. It isn’t a reliable count of the original book’s chapters. A chapter index may also be cleaned into a list, so don’t rely on that counter alone to confirm that the split matches the book.

Two settings with different jobs

The optional Add book details at the top (YAML front matter) setting is off by default. It adds book details to the output for Copy, Markdown download, and ZIP download. On its own, it doesn’t turn the book into separate chapter files.

The separate ZIP: one Markdown file per chapter option is also off by default and affects the ZIP export only. Once you’ve reviewed the headings and edited them if needed, turn on that option and use Download with images (.zip) to export an ebook as chapter Markdown files. The ZIP can also contain supported raster assets; keep the files and asset folder in their relative arrangement when moving them.

If you only use Copy or Download .md, you get text rather than a ZIP of split files and image assets. Choose the ZIP when you need separate files or packaged images.

Check the result at the joins

Open the downloaded ZIP and compare its file list with the edited headings and the source book. Then open several files around likely boundaries: the introduction, the end of an early chapter, the beginning of the next one, and a later chapter. Check that the text before and after each boundary belongs where you expect. Follow a few cross-chapter links or note references too; splitting doesn’t guarantee that every link or footnote works perfectly.

An illustration that is referenced in a chapter should still resolve after the ZIP is unpacked and moved. Check warnings for skipped or unsupported assets against the source. A heading count, a plausible list of filenames, or a complete-looking Preview can’t replace this check.

Preview shows at most 100,000 characters. For longer content, open the actual download instead of assuming a chapter is missing because Preview stopped. Beyond 500,000 characters, the editor shows a read-only excerpt and Copy is disabled, while the full text remains downloadable. Keep that limit in mind when you plan heading changes in the editor.

This article was substantially drafted by GPT-6.1 Terra for Yan Wang / LensUp. A Codex agent inspected the formal source and live page text on 2026-10-29. No new EPUB conversion, browser or reader rendering, device test, or human-owner test was performed.

Comments

Popular posts from this blog

How to Edit a PDF for Free (No Acrobat Needed)

How to print an ID card front and back on one page

How to Sign a PDF for Free (Draw, Type or Use a Photo of Your Signature)