Convert TOML to EPUB3

Drag and drop files here or click to select.
Max file size 100mb.
Uploading progress:

TOML vs EPUB3 Format Comparison

Aspect TOML (Source Format) EPUB3 (Target Format)
Format Overview
TOML
Tom's Obvious Minimal Language

A minimal configuration file format created by Tom Preston-Werner. Designed for clarity with unambiguous semantics that map directly to a hash table. Supports typed values including strings, integers, floats, booleans, dates, arrays, and tables. Widely used in Rust, Python, and modern tooling ecosystems.

Configuration Format Formally Specified
EPUB3
Electronic Publication Version 3

The latest major version of the EPUB standard, maintained by the W3C. Built on HTML5, CSS3, and JavaScript, EPUB3 brings modern web technologies to ebook publishing. It adds multimedia support, enhanced accessibility (ARIA), MathML, SVG, and scripting capabilities that were absent in EPUB 2.

Modern Ebook Standard HTML5-Based
Technical Specifications
Structure: Key-value pairs with tables and arrays
Encoding: UTF-8 required
Format: Plain text, human-readable
Compression: None
Extensions: .toml
MIME Type: application/toml
Structure: ZIP archive with HTML5, CSS3, metadata (OCF)
Encoding: UTF-8 / UTF-16
Format: Compressed package with web content
Compression: ZIP (deflate)
Extensions: .epub
MIME Type: application/epub+zip
Syntax Examples

TOML structured configuration:

[package]
name = "myapp"
version = "1.0.0"
authors = ["Dev <[email protected]>"]

[dependencies]
serde = { version = "1.0", features = ["derive"] }
tokio = "1.28"

EPUB3 HTML5 content document:

<!DOCTYPE html>
<html xmlns="http://www.w3.org/1999/xhtml"
      xmlns:epub="http://www.idpf.org/2007/ops">
<head><title>Config Reference</title></head>
<body>
  <section epub:type="chapter">
    <h1>Package</h1>
    <p>Name: myapp</p>
  </section>
</body></html>
Content Support
  • String values (basic and literal)
  • Integer and float numbers
  • Boolean values
  • Date and time types (RFC 3339)
  • Arrays (typed and mixed)
  • Tables and inline tables
  • Array of tables
  • Comments
  • HTML5 rich text and semantic markup
  • CSS3 styling with media queries
  • Audio and video embedding
  • MathML for mathematical formulas
  • SVG vector graphics
  • JavaScript interactivity
  • ARIA accessibility attributes
  • Embedded fonts (WOFF)
  • Fixed-layout pages
  • Media overlays (text-audio sync)
Advantages
  • Clear, minimal syntax
  • Strong typing for all values
  • Human-readable and writable
  • Formally specified standard
  • Native date/time support
  • Unambiguous parsing
  • Modern HTML5 foundation
  • Enhanced accessibility (WCAG compliance)
  • Multimedia support (audio, video)
  • MathML and SVG support
  • Scripting capabilities
  • Semantic structure with epub:type
  • Better typography (CSS3)
Disadvantages
  • Not designed for document content
  • No formatting or styling
  • Limited to structured data only
  • Not suitable for prose
  • Smaller ecosystem than JSON/YAML
  • Complex specification
  • Inconsistent reader support for advanced features
  • JavaScript support varies across readers
  • Not natively supported on Kindle
  • Multimedia increases file size
Common Uses
  • Rust project configuration (Cargo.toml)
  • Python project metadata (pyproject.toml)
  • Hugo static site configuration
  • Netlify deployment settings
  • Application settings files
  • Modern digital book publishing
  • Interactive educational content
  • Accessible ebook production
  • Technical documentation with code
  • Multimedia-rich publications
  • Scientific papers with formulas
Best For
  • Application configuration
  • Project metadata definitions
  • Structured settings files
  • Build system configuration
  • Modern ebook publishing
  • Accessible digital content
  • Interactive educational materials
  • Rich multimedia ebooks
Version History
Introduced: 2013 (Tom Preston-Werner)
Current Version: TOML v1.0.0 (2021)
Status: Stable, formally specified
Evolution: Community-driven development
Introduced: 2011 (EPUB 3.0 by IDPF)
Current Version: EPUB 3.3 (2023, W3C)
Status: Active W3C Recommendation
Evolution: 3.0 → 3.0.1 → 3.1 → 3.2 → 3.3
Software Support
Editors: VS Code, Vim, Sublime Text, IntelliJ
Languages: Rust, Python, Go, JavaScript, Java
Tools: Cargo, pip, Hugo, Netlify CLI
Validation: taplo, toml-lint
E-Readers: Kobo, Apple Books, Google Play Books
Apps: Calibre, Thorium Reader, Readium
Editors: Sigil, BlueGriffon EPUB Edition
Validators: EPUBCheck (W3C official)

Why Convert TOML to EPUB3?

Converting TOML to EPUB3 leverages the latest ebook standard to transform configuration data into modern, accessible digital publications. EPUB3 is built on HTML5 and CSS3, providing superior formatting, semantic markup, and accessibility features compared to older ebook formats. This makes it the ideal choice for creating professional-grade documentation from structured TOML data.

EPUB3 introduces significant improvements over EPUB 2, including support for multimedia content, MathML for mathematical notation, SVG graphics, JavaScript interactivity, and enhanced accessibility through ARIA attributes and semantic epub:type annotations. When converting TOML configuration files, these capabilities allow for richer presentation of data types, interactive tables, and better navigation.

The conversion is especially valuable for software development teams that need to document their project configurations in a portable, device-agnostic format. A Cargo.toml or pyproject.toml file converted to EPUB3 becomes a navigable reference guide with proper semantic structure, making it easy to browse on any modern e-reader or reading application that supports EPUB3.

EPUB3's accessibility features are a major advantage for organizations that need to comply with WCAG guidelines. The converted document includes proper semantic markup, navigation aids, and ARIA attributes that make configuration documentation accessible to users with disabilities. This is increasingly important for government and enterprise documentation requirements.

Key Benefits of Converting TOML to EPUB3:

  • Modern Standard: Built on HTML5 and CSS3 for superior rendering
  • Accessibility: ARIA attributes and semantic markup for WCAG compliance
  • Semantic Structure: epub:type annotations for meaningful document structure
  • Rich Typography: CSS3 provides advanced text formatting options
  • Future-Proof: Actively maintained W3C standard with ongoing development
  • Navigation: Enhanced table of contents and landmark navigation
  • Cross-Platform: Supported by all modern e-readers and reading apps

Practical Examples

Example 1: Rust Workspace Configuration

Input TOML file (Cargo.toml):

[workspace]
members = ["core", "api", "cli"]
resolver = "2"

[workspace.package]
version = "3.2.1"
edition = "2021"
license = "Apache-2.0"

[workspace.dependencies]
serde = { version = "1.0", features = ["derive"] }
tokio = { version = "1.28", features = ["full"] }
tracing = "0.1"

Output EPUB3 file (workspace.epub):

Modern EPUB3 with HTML5 content:
✓ Semantic chapter structure (epub:type)
✓ Workspace members listed with navigation
✓ Package metadata formatted with CSS3
✓ Dependencies table with version details
✓ ARIA accessibility attributes included
✓ Landmark navigation (toc, bodymatter)
✓ Validated with EPUBCheck

Example 2: Hugo Site Configuration Reference

Input TOML file (hugo.toml):

baseURL = "https://example.com/"
languageCode = "en-us"
title = "My Technical Blog"
theme = "clarity"

[params]
description = "A blog about software engineering"
author = "Jane Developer"
showReadingTime = true

[menu]
[[menu.main]]
name = "Home"
url = "/"
weight = 1

[[menu.main]]
name = "About"
url = "/about/"
weight = 2

Output EPUB3 file (hugo-config.epub):

Accessible EPUB3 documentation:
✓ Site settings chapter with base URL, title
✓ Parameters section with descriptions
✓ Menu configuration with navigation items
✓ HTML5 semantic elements throughout
✓ CSS3 styling for professional appearance
✓ Screen reader compatible content
✓ Proper language metadata (en-us)

Example 3: Multi-Environment Deployment Config

Input TOML file (deploy.toml):

[environments.staging]
url = "https://staging.example.com"
replicas = 2
auto_deploy = true

[environments.production]
url = "https://example.com"
replicas = 5
auto_deploy = false

[notifications]
slack_channel = "#deployments"
email = ["[email protected]"]
on_failure = true

Output EPUB3 file (deploy.epub):

Interactive EPUB3 reference guide:
✓ Staging environment chapter
✓ Production environment chapter
✓ Notification settings section
✓ Comparison tables with CSS3 styling
✓ epub:type semantic annotations
✓ Landmark and TOC navigation
✓ Portable across all EPUB3 readers

Frequently Asked Questions (FAQ)

Q: What is the difference between EPUB and EPUB3?

A: EPUB3 is the latest major version of the EPUB standard. While EPUB 2 used XHTML 1.1 and CSS 2, EPUB3 is built on HTML5 and CSS3. Key improvements include multimedia support (audio/video), MathML for math notation, SVG graphics, JavaScript interactivity, enhanced accessibility with ARIA, semantic markup with epub:type, and media overlays for text-audio synchronization.

Q: What is TOML and where is it used?

A: TOML (Tom's Obvious Minimal Language) is a configuration file format created by Tom Preston-Werner. It is widely used as Cargo.toml in Rust projects, pyproject.toml in Python packaging, configuration for Hugo and Netlify, and in many other tools. TOML supports strings, integers, floats, booleans, dates, arrays, and tables with a formally specified grammar.

Q: Will my TOML data types be represented in EPUB3?

A: Yes. TOML data types are mapped to appropriate HTML5 representations in the EPUB3 output. Strings are rendered as text, numbers retain their formatting, booleans are displayed clearly, dates use standard formatting, arrays become ordered or unordered lists, and tables become sections with headings. The semantic structure preserves the meaning of the original data.

Q: Is EPUB3 backward compatible with EPUB 2 readers?

A: EPUB3 includes a fallback mechanism for older EPUB 2 readers through the use of content fallbacks. However, advanced features like multimedia, JavaScript, and MathML will not work on EPUB 2-only readers. Most modern e-readers and apps now support EPUB3, including Apple Books, Kobo, Google Play Books, and Calibre.

Q: How does EPUB3 improve accessibility over EPUB 2?

A: EPUB3 adds extensive accessibility features including ARIA roles and attributes, semantic epub:type annotations for structural meaning, page-list navigation for print-equivalent page references, media overlays for synchronized text and audio, and support for alternative text on images. These features help meet WCAG 2.0 guidelines and make content accessible to users with disabilities.

Q: Can I validate the generated EPUB3 file?

A: Yes. Use EPUBCheck, the official W3C validation tool, to verify that the generated EPUB3 file conforms to the standard. EPUBCheck validates the container structure, content documents, metadata, navigation, and accessibility features. You can run it from the command line or use the online version at the DAISY Consortium website.

Q: Why choose EPUB3 over standard EPUB for TOML conversion?

A: EPUB3 provides better semantic markup for structured data like TOML, superior CSS3 styling for tables and code blocks, accessibility features for compliance requirements, and HTML5 elements that better represent configuration data. If your target audience uses modern e-readers or reading apps, EPUB3 delivers a significantly better reading experience.

Q: What devices support EPUB3?

A: EPUB3 is supported by Apple Books (iOS/macOS), Google Play Books, Kobo e-readers, Thorium Reader (desktop), Calibre, Readium-based apps, and most modern reading applications. Amazon Kindle does not natively support EPUB3 but Amazon offers conversion through the Send to Kindle service. Coverage of EPUB3 features varies by reader, with Apple Books and Thorium offering the most complete support.