EPUB Reader & Validator Online
Build a valid EPUB 3 e-book from Markdown or HTML chapters with cover and TOC, or read an EPUB: metadata, TOC, chapter text and structure checks.
Result
Press “Run” to see the result.
action=create (default with title) builds an EPUB 3 book: send chapters (array of {title, markdown | html}) or one markdown text split at # headings (split_level 2 for ##), plus authors, language (default vi), publisher, description, date, subjects, rights, identifier and an optional cover image (multipart field or cover_base64). The book has a nav document and an NCX for old readers, a cover page, landmarks, clean XHTML (scripts and unsafe tags removed, images given as data: URIs embedded), optional title page, toc_depth=2 for sections and embed_font=1 to embed Be Vietnam Pro for readers without Vietnamese fonts. The answer is the .epub file, or JSON with base64 when format=json.
action=read (default when a file is sent) returns the metadata (title, creators with roles, languages, identifiers, publisher, dates, subjects, series), the table of contents (nav or NCX), each spine item with title, word count and its content as text, markdown, html or none, the cover (base64 with include_cover=1) and structure issues. action=validate returns only the checks: mimetype first and stored, container.xml, package document, required metadata, manifest files present, spine references, navigation, XHTML namespace and HTML entities.
Everything runs in memory; files are not stored. The checks cover the common mistakes, not the full W3C EPUBCheck rule set. No conversion to MOBI or PDF.
Use this in your code
curl -X POST "https://apibox.io.vn/v1/epub" \
-H "Authorization: Bearer YOUR_API_KEY" \
-H "Content-Type: application/json" \
-d '{"title":"Truyện ngắn","authors":"Nguyễn Văn A","markdown":"# Chương 1\n\nXin chào.\n\n# Chương 2\n\nTạm biệt.","format":"json"}'const res = await fetch('https://apibox.io.vn/v1/epub', {
method: 'POST',
headers: {
Authorization: 'Bearer YOUR_API_KEY',
'Content-Type': 'application/json',
},
body: JSON.stringify({
"title": "Truyện ngắn",
"authors": "Nguyễn Văn A",
"markdown": "# Chương 1\n\nXin chào.\n\n# Chương 2\n\nTạm biệt.",
"format": "json"
}),
});
const data = await res.json();
console.log(data);import requests
res = requests.post(
"https://apibox.io.vn/v1/epub",
headers={"Authorization": "Bearer YOUR_API_KEY"},
json={"title": "Truyện ngắn", "authors": "Nguyễn Văn A", "markdown": "# Chương 1\n\nXin chào.\n\n# Chương 2\n\nTạm biệt.", "format": "json"},
timeout=30,
)
print(res.json())<?php
$ch = curl_init('https://apibox.io.vn/v1/epub');
curl_setopt_array($ch, [
CURLOPT_RETURNTRANSFER => true,
CURLOPT_CUSTOMREQUEST => 'POST',
CURLOPT_HTTPHEADER => ['Authorization: Bearer YOUR_API_KEY', 'Content-Type: application/json'],
CURLOPT_POSTFIELDS => '{"title":"Truyện ngắn","authors":"Nguyễn Văn A","markdown":"# Chương 1\\n\\nXin chào.\\n\\n# Chương 2\\n\\nTạm biệt.","format":"json"}',
]);
$response = curl_exec($ch);
print_r(json_decode($response, true));API documentation → Get a free API key
FAQ
Does it pass EPUBCheck?
The writer produces EPUB 3 with the required parts (stored mimetype, nav, NCX, dcterms:modified, unique identifier) and well-formed XHTML. Run W3C EPUBCheck for a full conformance report before publishing to a store.
Are remote images downloaded?
No. Readers do not load remote images, so they are removed with a warning; send images as data: URIs in the Markdown or HTML.
Can it read EPUB 2 files?
Yes. The reader uses the nav document of EPUB 3 or the NCX of EPUB 2 for the table of contents.