FictionBook 2.0 (.fb2)

FictionBook Standard

FictionBook 2.0 (FB2) is a popular open semantic XML-based ebook format, packaging an entire book's text, typography, metadata, and embedded cover illustrations into a single standalone XML file.

Convert FB2 to EPUB

Free in-browser FB2 to EPUB converter. Convert files instantly on your device.

Inspect & Metadata

Operating systems and file analyzers identify FB2 files by inspecting the leading binary byte sequence:

Select or drop files here

100% private in-browser conversion - files never leave your device

or paste Ctrl+V
Zero-Network-Transmission Privacy Guarantee: 0 bytes uploaded to external servers. All processing occurred locally in your browser sandbox.

Byte-Level Header Signature (Magic Bytes)

Operating systems and file analyzers identify FB2 files by inspecting the leading binary byte sequence:

HEX SIGNATURE (OFFSET 0):

3C 3F 78 6D 6C

ASCII REPRESENTATION: <?xml

Standardization: FictionBook Open XML Specification

Technical Specifications

Container ArchitectureSingle self-contained XML document containing metadata, body chapters, poems, epigraphs, and Base64-encoded binary images
CompressionUncompressed raw XML or zipped as .fb2.zip
Byte EndiannessUTF-8 / Unicode text stream
Color SpacesEmbedded image profiles
Channels & StructureSemantic book structure (title-info, body, epigraphs, footnotes, sections)
Max DimensionsUnbounded text length
TransparencyNone in markup (embedded PNGs support transparency)
Streaming & ProgressiveSequential XML stream; footnote hyperlinks provide instant footnote jumps

Technical Comparison Matrix: FB2 vs Competitors

Technical AttributeFB2 (Current)EPUBMOBITXT
File StructureSingle standalone XML text fileZIP archive of XHTML/CSS/imagesPalmDOC binary databasePlain raw text stream
Image StorageBase64 embedded inside XMLSeparate image files inside ZIPBinary records in Palm databaseNone (text only)
Semantic AwarenessHigh (native poem, epigraph tags)CSS class dependentPrimitive HTML tagsZero semantic structure
Primary RegionEastern Europe & PocketBookGlobal / Western standardLegacy Amazon KindleUniversal

Common Corruption Modes & Hex Recovery Guide

E-reader reports 'XML Parsing Error: mismatched tag at line X'.

Root Cause: Unclosed XML tag or unescaped ampersand ('&') inside book body text.

Recovery: Validate and repair XML schema tags using File2File FB2 Repair Tool.

Security Analysis & Parser Attack Vectors

FB2 is XML-based and vulnerable to standard XML parser attacks like XML Entity Expansion (billion laughs) and XXE.

Known Attack Vectors

  • XML External Entity (XXE) injection reading local server files during automated book processing.
  • XML entity explosion (billion laughs) consuming memory during XML DOM construction.
  • Heap corruption during Base64 image decoding in unhardened C e-reader libraries.

Defensive Best Practices: Disable DTD processing and external entity resolution in XML parsers handling FB2 files.

Historical Origins & Milestones

2010FB2.ZIP becomes the de facto standard ebook format across Eastern European e-readers (PocketBook).
2008FictionBook 2.1 introduces enhanced genre classifications and table structures.
2004Dmitry Gribov and Michael Matsnev create FB2 to prioritize semantic book structure over visual presentation.

Key Advantages & Pros

  • Pure semantic markup: describes what text represents (poem, quote, footnote, epigraph) rather than how it looks.
  • Single-file simplicity: all illustrations and cover images are embedded directly as Base64 text within the single XML file.
  • Trivial to convert, index, and translate automatically due to standardized semantic XML tags.

Technical Limitations & Cons

  • Lacks advanced CSS styling, custom web typography, and dynamic animations found in modern EPUB 3.
  • Base64 encoding increases the file size of embedded illustrations by approximately 33%.
  • Rarely supported on Western e-readers (Kindle, Kobo) without third-party firmware or conversion.

Interesting Technical Trivia

  • FB2 was created in Russia and remains the most widely read ebook format across Eastern Europe, supported natively by every PocketBook device.
  • In an FB2 file, footnotes are stored in a dedicated '<notes>' body section, allowing e-readers to display them as pop-ups.
  • FB2 files can be viewed and validated in any standard web browser simply by opening the .fb2 file as an XML document.

Frequently Asked Technical Questions

What devices read FB2 files?

PocketBook e-readers, FBReader, Moon+ Reader, Calibre, and various Android/iOS reader apps read FB2 natively.

How can I convert FB2 to EPUB or PDF?

Upload your FB2 file to File2File.app to convert it into a beautifully styled EPUB or PDF book in seconds directly in your browser.

What is an FB2.ZIP file?

An FB2.ZIP file is simply a standard .fb2 XML file compressed using ZIP compression to save storage space on e-reader memory cards.