FictionBook 2.0

.fb2 · eBooks

FB2, short for FictionBook 2, is an XML-based e-book format from Russia. In Russian-speaking countries it was for years the standard format of online libraries and e-book shops, and huge free collections still use it. If you downloaded a book from a Russian, Ukrainian or Belarusian site, or got an e-reader collection from someone there, the files are probably .fb2 or .fb2.zip. Outside that region FB2 is rare, and Kindle, Kobo, Apple Books and Tolino cannot read it.

Origin

FictionBook was created by the Russian programmer Dmitry Gribov. Version 2 came out in 2004, the last revision of its XML schema (2.21) dates from January 2008. The aim was a single, strictly structured file that would survive decades of conversion to whatever format came next, so it describes the structure of a book, not its appearance. A successor, FB3, exists on paper and is used internally by the Russian store LitRes, but common readers do not support it.

How an FB2 file is built

Unlike EPUB, which is a ZIP of many files, an FB2 book is one XML document:

  • <description> holds the metadata: title, authors, genre codes, language, series and number in the series, translator, publisher, ISBN and information about who prepared the file.
  • <body> contains the text, divided into nested <section> elements. There are dedicated tags for epigraphs, poems with stanzas, citations, subtitles and text author. A second <body> usually holds footnotes.
  • <binary> elements hold the images, including the cover, encoded as Base64 text.

There is no CSS layout, no embedded fonts, no fixed pages and no DRM. The reader decides the typography entirely. Base64 makes images about a third larger, which is why FB2 files are often distributed zipped as .fb2.zip (or .fbz). Most FB2 readers open the zip directly.

How to open FB2

  • Android and iPhone: FBReader, the app named after the format, or KOReader on Android.
  • Windows: calibre's viewer or SumatraPDF.
  • Linux: Foliate, Okular or calibre.
  • macOS: calibre.
  • E-readers: PocketBook reads FB2 and FB2.ZIP natively. For Kindle, Kobo or Tolino, convert to EPUB first.

Common FB2 problems

FB2 shows garbled characters

Older Russian files are often encoded in Windows-1251 instead of UTF-8. That is fine as long as the first line of the XML declares it. If the declaration is missing or wrong, the reader guesses and Cyrillic turns into gibberish. Converting the book to EPUB with the right encoding fixes it for good.

FB2 file won't open: "not well-formed"

FB2 is strict XML, so a single unclosed tag or an unescaped & makes the whole book invalid. Strict readers refuse it, tolerant ones (FBReader, calibre) usually cope. Converting it through calibre often produces a clean, valid book.

How to read FB2 on Kindle

Kindle does not support FB2 and Send to Kindle refuses it. Convert the book to EPUB and send that, or convert it to AZW3 and copy it over USB.

Converting FB2

FB2 to EPUB works very well because FB2 is so tidy: chapters become the table of contents, footnotes become clickable links, the cover and series metadata carry over. Poems and epigraphs keep their own styling. FB2 to PDF produces print-ready pages in the US Letter size. In the opposite direction, converting EPUB, DOCX or MOBI to FB2 loses whatever FB2 cannot describe: custom fonts, colours, most CSS and complex tables.

FB2 at a glance

DeveloperDmitry Gribov
First releaseFictionBook 2.0, 2004
Current version2.21 (schema from 2008)
Typesingle XML file, images in Base64
Compressionnone; often distributed as ZIP (.fb2.zip, .fbz)
DRMnot supported
Typical usee-book libraries in Russian-speaking countries, PocketBook readers

More technical detail: MobileRead wiki and the PRONOM registry of the UK National Archives.

We can convert FB2 into

Documents

PDF DOCX DOC ODT TXT HTML RTFPDF/ADOCMDOTDOTXFODTOTTUOTABWAWTFOZABW

Presentations

Images

JPG PNGWEBP GIF TIFFHEICAVIFJXLPSDICOAAIAPNGARTAVS BMP CINCURDCXDDSDPXFF FITSFL32 HDRHRZJP2JBIGJNGJPCMNGMTVOTBPALMPAM PBMPCD PCXPFMPGMPGXPHMPICTPPMPSBPTIFQOIRASRGFSGISIXELSUN TGAVICARVIFFVIPS WBMPXBMXPMXWDDCM

Vector images

SVG EPSEMFFXGHPGLPOV PSSIFSVGZWMFXAML

eBooks

EPUB MOBI AZW3CBZHTMLZ LIT LRF OEB PDB TCRTXTZCB7CBTDJVU

Markup languages

MDTEXRSTADOCWIKIORGCONTEXTDOCBOOKDOKUWIKIHADDOCKICMLIPYNBJATSJIRAMANMSMUSEOPMLTEITEXITEXTILETYPXWIKIZIM