How to convert HTML to EPUB
Start with local HTML files and add any matching CSS or images. Set the book details, choose how chapters are made, then click Convert. The result includes EPUB navigation, packaged local assets, validation messages, and chapter previews before you download it.
- Select or drop the files, then click
browse filesto choose them from your device. Include at least one.htmlor.htmfile. - Fill in
Title,Author, andLanguage code. The language field starts withen. IfTitleis blank, the first HTML<title>is used when available; otherwise the title isUntitled. - Set
Chapter splitting,Table of contents source, andCover image. ForUpload a cover image, choose the file withChoose image. - Click
Convert, then check the book summary, structural validation, warnings, and chapter preview. - Click
Download .epubafter checking the generated chapters.
How HTML chapter splitting works
Chapter splitting can keep one HTML file as one chapter, split it at each <h1> or <h2>, or create one chapter per uploaded HTML file. When several HTML files are selected, the converter sorts them by filename and uses one chapter for each file.
Input: <h1>Chapter 1</h1>
Output: chapter-1.xhtml, chapter title "Chapter 1"
Text before the first selected heading becomes its own chapter and uses the source file title. If the chosen heading level is absent, the file stays as one chapter. Table of contents source sets the EPUB navigation and NCX entries to either the generated chapter headings or the uploaded filenames.
How HTML images, CSS, and covers are handled
If an <img src> names a matching uploaded image, the converter copies it into the EPUB and rewrites the path. A missing local image stays unresolved and adds a warning. A remote image URL is removed instead of being downloaded.
None leaves the EPUB without a cover. Auto-detect first image uses the first packaged image, or adds a warning when there is no packaged image. Upload a cover image uses the file selected with Choose image; without a selected file, it adds no cover. Inline <style> text and matching local linked CSS are collected. The converter does not read url() assets inside CSS.
What the HTML to EPUB converter removes
Before writing the chapters, the converter sanitizes the HTML and removes <script>, <iframe>, <object>, <embed>, <form>, <input>, <button>, <audio>, and <video> elements. It also removes inline event-handler attributes such as onclick. The warnings panel lists removed unsupported elements, but it does not count every sanitized attribute.
Examples of HTML to EPUB input
- For one HTML manuscript with
<h1>chapter headings, chooseSplit at each <h1>so each heading starts a chapter. - For a folder containing HTML files, a stylesheet, and images, upload the bundle to package matching local images and collect the local CSS.
- For an HTML package that needs a cover, choose
Upload a cover image, inspect the chapter preview, and save the EPUB.
When another ebook converter is a better fit
Use HTML to EPUB when the source is HTML with optional local assets. Visit Ebook Convert Tools to choose among ebook conversion tasks. If the source is already an EPUB and the target is MOBI7, use EPUB to MOBI Converter; it carries over available metadata, cover, and navigation information.
Frequently asked questions
Does HTML to EPUB upload my files?
No. The converter reads the selected HTML, CSS, and image files in browser-side JavaScript. Its conversion code does not upload those files.
Can I convert a web page URL to EPUB?
No. You must provide local HTML files and any local assets. Remote image URLs are removed rather than fetched.
What happens when I upload several HTML files?
Each HTML file becomes a chapter, and the files are processed in filename order. The interface sets Chapter splitting to One chapter per uploaded file.
What does EPUB structural validation check?
It reopens the generated ZIP and checks the EPUB mimetype, container XML, package document, manifest, spine references, and referenced chapter files. It is a structural check, not a full EPUB conformance test.