Everything you need to know about FB2
FB2 (FictionBook, .fb2) is an XML-based ebook format created in Russia around 2004, popular in Eastern Europe and Russia. Unlike EPUB (a ZIP of HTML), FB2 is a single XML file that contains the entire book - metadata, structure, content, and even embedded images encoded as base64.
How it works under the hood
- Single XML file. Everything in one document - simpler than EPUB's ZIP structure, easier to hand-edit, smaller for text-only books.
- Semantic markup. FB2 has dedicated elements for `<title>`, `<epigraph>`, `<poem>`, `<stanza>`, `<verse>` - more semantic than generic EPUB HTML.
- Rich metadata. First-class support for book title, author (multiple), genre (FictionBook genre catalog), publisher, year, language, source, ISBN, translator.
- Base64 images. Images are embedded directly in the XML as base64 strings - keeps everything in one file but bloats text.
Where you'll actually use it
- Russian-language ebook collections (LitRes, Flibusta historically)
- FBReader (the canonical FB2 reader) ecosystem
- Programmatic ebook generation where one-file simplicity matters
- Long-term archival of fiction with proper metadata
How it compares to alternatives
FB2 vs EPUB: FB2 is single XML; EPUB is ZIP. EPUB has wider tool support. FB2 vs MOBI: Both are simpler than EPUB. FB2 has better metadata semantics; MOBI has Kindle support.
Things that will trip you up
- FB2 is virtually unsupported outside Russian-speaking markets - Apple Books and Kindle don't read it
- Base64 image encoding bloats the file ~33% larger than EPUB's binary embedding
- FB2 v3 (XML namespaces) was proposed but never widely adopted - stick to v2.x for compatibility