HTML EPUB Swap
HTML to EPUB
Converting…
Choose a HTML file
.html, .htm, .xhtml
Convert
Download
HTML pivot preview
FAQ and format details
Why convert HTML to EPUB?
Writers convert HTML to EPUB when a CMS export or static-site chapter should travel on an e-reader. It is also a way to give a client a book-shaped file without InDesign. If your source is Markdown, convert Markdown→HTML first or use Markdown→EPUB; this page assumes you already have markup.
How this conversion runs
The sanitizer drops scripts. If the body contains two or more h1 elements, each h1 starts a new XHTML chapter; otherwise you get a single chapter. The converter writes EPUB 3: mimetype, container.xml, package.opf, nav.xhtml, a small stylesheet, and chapter files in reading order.
Keep in mind for HTML → EPUB
Fixed-layout EPUBs, audio overlays, and DRM are out of scope. Per-page CSS from the original site is replaced by one simple stylesheet. A website with a global nav in every HTML file will look like repeated 'chapters' of menus unless you paste only the article body.
After you have a EPUB file
Open the .epub in Apple Books, Thorium, or Calibre's viewer. Calibre can send it to a Kindle after its own conversion — Amazon does not ingest EPUB on older devices the same way. Edit structure in Sigil if you need a hand-tuned table of contents.
How do I control chapters?
Use h1 headings in the HTML for each chapter title. Subheads should be h2–h6. A single h1 (or none) yields one chapter titled from the document.
Does this make a Kindle file?
No. The output is EPUB 3. Use Calibre or Kindle Previewer if you need AZW3/KFX. Those formats are a later catalog type, not an alias of EPUB.
This pair at a glance
- Accepts
- .html, .htm, .xhtml
- Writes
- .epub · application/epub+zip
- Read fidelity
- exact (HTML → HTML)
- Write fidelity
- high (HTML → EPUB)
- Source size
- Plan for files under 7.6 MB
Runs in this browser.
Something off with this pair? Send feedback.
About HTML and EPUB
Source file
HTML
The web’s native document format: structured markup for headings, paragraphs, lists, tables, links, and media.
HTML is the pivot format for this converter. Incoming files are turned into a sanitized HTML document, and outgoing files are generated from that document. Browsers, email clients, and most rich-text editors already speak it, which is why it is the most flexible interchange point.
- Extensions
- .html, .htm, .xhtml
- MIME types
- text/html, application/xhtml+xml
- Kind
- text · utf-8
- Category
- markup
- Standard
- Open format · since 1993
- Spec
- HTML Living Standard
- Comfortable size
- Up to about 7.6 MB in this browser converter
- Read into HTML
- exact fidelity · implemented — Identity transform after sanitizing script/style that cannot round-trip into other document types.
What this format can hold
- headings
- paragraphs
- lists
- tables
- links
- images
- inline formatting
- semantic structure
Apps that consume HTML
- Chrome (Google) — opens on Windows, macOS, Linux, Android
- Firefox (Mozilla) — opens on Windows, macOS, Linux, Android
- Safari (Apple) — opens on macOS, iOS
- Edge (Microsoft) — opens on Windows, macOS
- VS Code (Microsoft) — creates on Windows, macOS, Linux
- WordPress — creates and opens on Web
Catalog notes
Destination file
EPUB
The open ebook format: a ZIP of XHTML chapters, CSS, and a package manifest. What Apple Books, Google Play Books, and most non-Kindle readers consume.
EPUB 3 is HTML in a spine. That makes the HTML hub almost native: we concatenate or split XHTML documents and rewrite the OPF package. Kindle’s AZW/MOBI family is a different type and is not in this matrix.
- Extensions
- .epub
- MIME types
- application/epub+zip
- Kind
- zip · binary
- Category
- ebook
- Standard
- Open format · since 2007
- Spec
- EPUB 3 (W3C)
- Comfortable size
- Up to about 38 MB in this browser converter
- Written from HTML
- high fidelity · implemented — Emits EPUB 3 with a single content document split on h1, plus nav.xhtml.
What this format can hold
- headings
- paragraphs
- lists
- links
- images
- inline formatting
- chapters
- table of contents
Usually dropped on the way out
- multi file chapter map unless h1 split
Apps that consume EPUB
- Apple Books (Apple) — opens on macOS, iOS
- Google Play Books (Google) — opens on Web, Android, iOS
- Calibre — creates and opens on Windows, macOS, Linux
- Thorium Reader — opens on Windows, macOS, Linux
- Foliate — opens on Linux
- Kindle (via conversion) (Amazon) — opens on e-ink, iOS, Android
- Sigil — creates on Windows, macOS, Linux
Catalog notes
Other conversions
Other conversions from HTML: MarkdownWordRTFOpenDocumentPDF
Other ways to get EPUB: MarkdownWordRTFOpenDocumentPDF