Browser-based document converter · DOCX to EPUB

Word to EPUB Converter

Packages a .docx as an EPUB 3 ebook with a chapter per Heading 1, a table of contents, and the document's lists and tables intact.

Input

Word files (.docx), up to 25MB

Drop your DOCX file here or click to choose

.docx

Files are read and converted on your device. Nothing is uploaded, and the result is yours to download or open in the Word editor.

Result

EPUB file, ready to download or edit

Choose a file to see the EPUB result here.

Word to EPUB Converter

Operator: Abdulla Al Fahad. How tools are built and checked

Books, course notes and long reports are written in Word, but phones and e-readers want EPUB, which reflows to the screen and offers a contents menu instead of page numbers. The Word to EPUB Converter reads a .docx, cuts it into chapters at the headings you choose and wraps the result in an EPUB 3 package with a navigation document, a stylesheet and the document's lists, tables and quotes intact.

Chapters decides where a new chapter and a contents entry begin, Language goes into the book's metadata so a reading app picks the right hyphenation and dictionary, and Author fills dc:creator. The book's title is taken from the file name, so The Lighthouse Keeper.docx produces a book called The Lighthouse Keeper, and an EPUB chapters chip in the summary shows whether the split matched the structure you intended.

Key features

  • Complete EPUB 3 package: uncompressed mimetype, container.xml, OPF with Dublin Core metadata, nav.xhtml and an NCX for older readers.
  • Three chapter settings, with the document's top heading level standing in when there is no Heading 1.
  • Language written into dc:language and every chapter's xml:lang, with thirteen to choose from, and an optional author in dc:creator.
  • Turns away legacy .doc and encrypted files with an explanation, and lists custom styles that were not recognised.

What goes into the EPUB package

An EPUB is a zip archive with a prescribed layout. The mimetype entry comes first, stored uncompressed; META-INF/container.xml points at the package document, OEBPS/content.opf, which holds a dc:identifier (a fresh urn:uuid), dc:title, dc:language, dc:creator when an author was given, the manifest and the reading order. OEBPS/nav.xhtml is the EPUB 3 navigation document, OEBPS/toc.ncx repeats its entries for EPUB 2 readers, and a small style.css plus one XHTML file per chapter complete the package.

Chapter boundaries come from Word's built-in heading styles. By default each Heading 1 paragraph (and a paragraph in the Title style, which counts as Heading 1) starts a new file and a contents entry titled with that heading's text; the second setting splits at Heading 2 and Subtitle as well, and Single chapter puts everything in one file. A document with no Heading 1 is split at its top heading level instead, so a manuscript written entirely in Heading 2 still gets one chapter per Heading 2, and the second setting then splits at Heading 3 too. Lower headings stay inside their chapter, the contents list is flat, text before the first chapter heading becomes an opening chapter named after the book, and a document with no headings at all yields a single chapter and a warning.

Inside a chapter the markup is semantic XHTML: headings, paragraphs, nested lists, tables with th cells for a repeating header row, blockquote for the Quote styles, pre and code for the Code styles, and strong, em, u and s. Web and mail links are kept; bookmarks and cross-references become plain text. Colours, fonts, sizes, alignment and highlights are not carried over, comments are removed, and pictures are counted in a warning but omitted, so the book has no cover and no illustrations. The stylesheet sets Georgia body text, Helvetica or Arial headings, bordered tables and blue links.

How it works

The .docx is checked by its first bytes: an OLE container (a legacy .doc or an encrypted document) and anything that is not a zip are rejected before parsing. mammoth then converts the Word XML to HTML with a style map that sends Title to h1, Subtitle to h2 and the Quote and Code styles to blockquote, code and pre, and the HTML is read into the shared block model behind every converter on this site.

The EPUB exporter finds the highest heading level present, opens a new chapter at each heading of that level (and the next level down in the second setting), writes each chapter as well-formed XHTML, builds the navigation document, the NCX and the package file from the chapter list, and zips everything with the mimetype stored first.

Common use cases

  • An author finishing a novel in Word wants an EPUB to upload to a self-publishing store without buying layout software.
  • A lecturer turns a 200-page set of course notes into a book students can read on their phones, with each week as a chapter.
  • A company converts its employee handbook so staff can read it in a reading app rather than scrolling a PDF.
  • A translator delivers a manuscript as an EPUB with the Language set to French so readers hyphenate correctly.

How to use this tool

  1. Rename the .docx to the book's title, then drop it on the upload area.
  2. Set Chapters to match the heading structure, pick the Language, and type an Author name followed by Enter.
  3. Compare the EPUB chapters chip with the number of chapters you expect, and read any warning about custom styles or missing headings.
  4. Download .epub and check the contents menu in a reading app; if the headings need changing first, use Edit in Word editor, save the corrected .docx and convert that.

Example

Word document: The Lighthouse Keeper.docx

Title style:  The Lighthouse Keeper
Normal:       A novel in three parts.
Heading 1:    Part One
Normal:       The storm had been building since noon.
Heading 2:    The Beacon
Normal:       By dusk the lamp was lit.
Heading 1:    Part Two
Normal:       Morning came grey and quiet.

EPUB package (New chapter at every Heading 1)

The Lighthouse Keeper.epub
  mimetype                 application/epub+zip, stored first
  META-INF/container.xml   locates the package file
  OEBPS/content.opf        title The Lighthouse Keeper, language en, three spine items
  OEBPS/nav.xhtml          Contents: The Lighthouse Keeper, Part One, Part Two
  OEBPS/toc.ncx            the same three entries for EPUB 2 readers
  OEBPS/style.css
  OEBPS/chapter-001.xhtml  <h1>The Lighthouse Keeper</h1><p>A novel in three parts.</p>
  OEBPS/chapter-002.xhtml  <h1>Part One</h1> ... <h2>The Beacon</h2> ...
  OEBPS/chapter-003.xhtml  <h1>Part Two</h1> ...

In the Heading 1 and Heading 2 setting, The Beacon becomes
chapter-003.xhtml and the book has four chapters.

Tips for best results

  • Rename the .docx to the exact book title before converting; final_v3.docx produces a book called final_v3.
  • Format chapter titles with Word's own Heading 1 style, or Title for the title page; a custom style named Chapter Heading is not recognised even if it is based on Heading 1, and the warning after conversion lists such styles.
  • Delete a table of contents generated by Word before converting; its entries would survive as text ending in page numbers that mean nothing in a reflowable book.
  • Press Enter or click outside the Author field to apply it; the Chapters and Language selects convert again as soon as they change.

Edge cases to watch

A Heading 1 title page followed by Heading 2 chapters gives one chapter under the default setting, because the Heading 1 is taken as the chapter level; pick the Heading 1 and Heading 2 setting for that manuscript.

Page breaks and section breaks do not start chapters; only headings do.

Footnotes are gathered into a numbered list after the body text, so in a split book they land at the end of the final chapter rather than the chapter that cites them.

Every conversion generates a new identifier, so library apps that key books on it treat a second download as a new title rather than an update.

Common errors and how to fix them

This file is either a legacy .doc or a password-protected document. Open it in Word, remove any password, and save it as .docx, then try again.
Both a 1997-2003 .doc and an encrypted .docx use the same OLE container, which the converter cannot read. In Word, remove the password under File, Info, Protect Document, then Save As a Word Document (.docx).
This file is not a Word .docx document. Choose a file saved as .docx.
The file has a .docx name but is not a Word zip package, usually because an .odt, .rtf or .txt file was renamed. Export a real .docx from the original program, or use the ODT to Word or RTF to Word converter first.
No chapter headings were detected, so the book has a single chapter.
The EPUB downloads anyway. If the book should have chapters, apply Heading 1 to each chapter title in Word, or set the headings with Edit in Word editor, download the .docx and convert again.
This file is larger than 25MB. Split it into smaller files and try again.
Text alone rarely reaches 25MB; embedded photographs do, and pictures are not carried into the EPUB anyway, so save a copy with the images removed and convert that.

Best practices

  • Use one Heading 1 per chapter and Heading 2 for sections within it; that structure gives a clean contents menu with either split setting.
  • Keep tables to a few narrow columns; reflowable readers cannot scroll a wide table sideways, so long rows are cut off on a phone.
  • Open the EPUB in a reading app such as Apple Books, Calibre or Thorium and check the contents menu before sending it to anyone.

Why the chapter split matters in a reflowable book

There are no pages inside an EPUB: the reading app lays each XHTML file out for the current screen and font size, and a novel delivered as a single 400,000-character file opens slowly on an e-ink reader. Splitting at headings gives each chapter its own file: the reader loads only the chapter being read and can jump from the contents menu straight to Part Two.

The split also decides what the contents menu says, because each entry takes its text from the heading that opened the chapter: Chapter 7: The Crossing gives a fuller entry than Chapter 7. The opening chapter formed from text before the first heading is named after the book, which suits a title page but not a stray paragraph, so give that material a heading or move it after the first chapter heading.

Frequently asked questions

Where does the book's title come from?

From the file name without its extension; it is written to dc:title and names the opening chapter when text precedes the first heading. Rename the .docx first if that is not the title you want.

Can I add a cover image?

Not here. Images are dropped and no cover is generated; add one afterwards with an ebook editor such as Calibre or Sigil.

Why does the book look different in each reading app?

Reading apps substitute their own fonts for the stylesheet's Georgia and Helvetica and let readers change size and spacing; structure and the contents menu are the same everywhere.