Convert HTML to EPUB
Use local .html or .htm files to create an .epub. You can also provide local CSS and image files. At least one HTML file is required.
How to Convert HTML to EPUB
- Drop your files into the upload area or click browse files. Upload at least one
.htmlor.htmfile. - Set Title, Author, and Language code. The language code defaults to
en. If Title is empty, it can be filled from the first HTML file's<title>; an empty title otherwise falls back toUntitledduring conversion. - Choose Chapter splitting and a Cover image option.
- After the files and settings are ready, review the automatically generated validation messages, warnings, and chapter preview.
- Click Download .epub to save the result.
Choose Chapters and Review the Table of Contents
Chapter splitting offers these choices:
- One chapter (no split) keeps the document together.
- Split at each <h1> or Split at each <h2> creates chapters from headings. Heading text becomes the chapter title, and content before the first heading can become a lead-in chapter.
- One chapter per uploaded file makes each HTML file a chapter. Multiple HTML files are sorted by filename and processed in that order; the interface also selects this mode when more than one HTML file is uploaded.
The generated EPUB navigation and NCX use either the chapter headings or the uploaded filenames, according to Table of contents source.
Covers, Images, and CSS
- None adds no cover.
- Auto-detect first image uses the first packaged image. If no image is found, the conversion continues without a cover and shows a warning.
- Upload a cover image supports
.jpg,.jpeg,.png,.gif, and.webp. Select a file with Choose image; choosing the option without a file does not add a cover.
Local image references matching uploaded filenames are packaged and rewritten. Missing local images remain unresolved and produce a warning. Remote image URLs are not fetched; they are removed with a warning. Inline <style> text and local linked CSS files are collected as CSS, but url() assets in CSS are not read or resolved.
Content Removed During Conversion
DOMPurify sanitizes each chapter before the custom scan. The scan removes <script>, <iframe>, <object>, <embed>, <form>, <input>, <button>, <audio>, and <video> elements, plus inline on* event-handler attributes. Some removed elements appear in the warnings panel, but not every sanitization or attribute removal is counted there.
Validation and Chapter Preview
After conversion, the tool reopens the generated file as a ZIP archive. Validation checks the mimetype entry and its application/epub+zip content, parses META-INF/container.xml and content.opf as XML, checks for the manifest and spine, verifies spine references, and checks that spine-referenced chapter files exist in the archive. These checks do not establish full EPUB conformance or confirm every reader's behavior.
The preview lists the chapters and shows them in a simple built-in serif frame. Use it to inspect the generated content, but it may not match the final reading application.
Processing and Privacy Notes
Parsing, sanitizing, splitting, packaging, validation, preview generation, and EPUB creation are implemented in browser-side JavaScript. The converter uses files supplied from your device and does not fetch web pages for conversion. The page also loads DOMPurify from https://cdn.jsdelivr.net; the converter code does not establish server upload behavior for your selected files.
Frequently Asked Questions
Does converting HTML to EPUB upload my files anywhere?
The converter reads, sanitizes, and packages your HTML, CSS, and images in browser-side JavaScript. The converter code does not establish an upload of those selected files to a server.
Can this tool fetch a web page for me?
No. It works with HTML files and assets you provide from your device; it does not crawl websites or fetch authenticated pages. Remote images referenced by a URL are removed rather than downloaded.
How is the EPUB validated?
The tool reopens the generated ZIP and checks the mimetype content, parses the container and package XML, checks for the manifest and spine, verifies spine references, and checks that spine-referenced chapter files exist in the archive. This is a limited structural check, not a full EPUB conformance test.