Convert FB2 to Properties

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

FB2 vs Java Properties Format Comparison

Aspect FB2 (Source Format) Properties (Target Format)
Format Overview
FB2
FictionBook 2.0

XML-based ebook format developed in Russia. Designed specifically for fiction and literature with rich metadata support. Extremely popular in Eastern Europe and CIS countries. Stores complete book structure including chapters, annotations, and cover images in a single XML file.

Ebook Format XML-Based
Properties
Java Properties Files

Simple key-value text format widely used in Java applications for configuration and localization. Each line contains a property in key=value format. Commonly used for internationalization (i18n), application settings, and resource bundles. Human-readable and easy to edit.

Configuration Plain Text
Technical Specifications
Structure: XML document
Encoding: UTF-8
Format: Text-based XML
Compression: Optional (ZIP as .fb2.zip)
Extensions: .fb2, .fb2.zip
Structure: Key-value pairs
Encoding: ISO-8859-1 or UTF-8
Format: Plain text
Compression: None
Extensions: .properties
Syntax Examples

FB2 uses XML structure:

<FictionBook>
  <description>
    <title-info>
      <book-title>My Book</book-title>
      <author>John Doe</author>
    </title-info>
  </description>
  <body>
    <section>
      <title>Chapter 1</title>
      <p>Text content...</p>
    </section>
  </body>
</FictionBook>

Properties uses key-value format:

# Book Information
book.title=My Book
book.author=John Doe

# Chapter 1
chapter.1.title=Chapter 1
chapter.1.content=Text content...

# Application Settings
app.version=1.0.0
app.language=en
Content Support
  • Rich book metadata (author, title, genre)
  • Cover images (embedded Base64)
  • Chapters and sections
  • Annotations and epigraphs
  • Footnotes and comments
  • Poems and citations
  • Tables (basic)
  • Internal links
  • Multiple bodies (main + notes)
  • Simple key-value pairs
  • Comments (# or ! prefix)
  • Multi-line values (backslash continuation)
  • Unicode escape sequences
  • Whitespace handling
  • Property hierarchies (dot notation)
  • Special characters escaping
  • Empty values support
  • Locale-specific files
Advantages
  • Excellent for fiction/literature
  • Rich metadata support
  • Single file contains everything
  • Widely supported by ebook readers
  • Free and open format
  • Good compression ratio (.fb2.zip)
  • Extremely simple format
  • Universal Java support
  • Perfect for localization (i18n)
  • Easy to edit manually
  • Version control friendly
  • No external dependencies
  • Fast parsing and loading
Disadvantages
  • Limited outside Eastern Europe
  • Not supported by Amazon Kindle
  • Complex XML structure
  • Not ideal for technical docs
  • Manual editing is difficult
  • No formatting support
  • Flat key-value structure only
  • No nested data structures
  • Limited data types (strings only)
  • Escaping required for special chars
  • Not suitable for complex data
Common Uses
  • Fiction and literature ebooks
  • Digital libraries (Flibusta, etc.)
  • Ebook distribution in CIS
  • Personal ebook collections
  • Ebook reader apps
  • Java application configuration
  • Internationalization (i18n) files
  • Resource bundles
  • Application settings
  • Localized text strings
  • Environment configuration
Best For
  • Reading fiction on devices
  • Ebook library management
  • Sharing books in CIS region
  • Structured fiction content
  • Text extraction from ebooks
  • Creating localization files
  • Simple data storage
  • Configuration management
Version History
Introduced: 2004 (Russia)
Current Version: FB2.1
Status: Stable, widely used
Evolution: FB3 in development
Introduced: 1990s (Java 1.0)
Current Version: Ongoing standard
Status: Stable, universal
Evolution: Unchanged specification
Software Support
Calibre: Full support
FBReader: Native format
Cool Reader: Full support
Other: Moon+ Reader, AlReader
Java: Native support
Text Editors: All editors
IDEs: IntelliJ, Eclipse, NetBeans
Other: Python, PHP, Ruby libraries

Why Convert FB2 to Java Properties?

Converting FB2 ebooks to Java Properties format is useful when you need to extract text content for localization, create translation resources, or store book metadata in a simple key-value format. Properties files are the standard format for Java application internationalization (i18n) and configuration management.

FB2 (FictionBook 2) is an XML-based ebook format extremely popular in Russia and Eastern Europe. It excels at storing fiction with rich metadata including author information, cover images, annotations, and structured chapters. However, when you need to extract just the text content or metadata for use in applications, the complex XML structure can be cumbersome to work with.

Java Properties format provides a simple, flat key-value structure that's perfect for storing extracted text, chapter titles, metadata, or creating localization files. Properties files are universally supported in Java and many other programming environments, making them ideal for application integration.

Key Benefits of Converting FB2 to Properties:

  • Text Extraction: Extract book content as key-value pairs
  • Localization: Create i18n resource bundles from book text
  • Metadata Storage: Store book information in simple format
  • Application Integration: Use book data in Java applications
  • Easy Editing: Modify content in any text editor
  • Version Control: Track changes with Git/SVN easily
  • Universal Support: Works with Java, Python, PHP, Ruby

Practical Examples

Example 1: Metadata Extraction

Input FB2 file (book.fb2):

<title-info>
  <book-title>The Great Adventure</book-title>
  <author>
    <first-name>John</first-name>
    <last-name>Smith</last-name>
  </author>
  <date>2024</date>
  <genre>fiction</genre>
</title-info>

Output Properties file (book.properties):

# Book Metadata
book.title=The Great Adventure
book.author.firstname=John
book.author.lastname=Smith
book.date=2024
book.genre=fiction

Example 2: Chapter Content Extraction

Input FB2 chapters:

<section>
  <title>Chapter 1: The Beginning</title>
  <p>It was a dark and stormy night.</p>
</section>
<section>
  <title>Chapter 2: The Journey</title>
  <p>The adventure begins here.</p>
</section>

Output Properties file:

# Book Chapters
chapter.1.title=Chapter 1: The Beginning
chapter.1.content=It was a dark and stormy night.

chapter.2.title=Chapter 2: The Journey
chapter.2.content=The adventure begins here.

Example 3: Localization File Creation

Input FB2 annotation:

<annotation>
  <p>This book tells the story of adventure</p>
</annotation>

Output Properties for i18n (messages_en.properties):

# English localization
book.annotation=This book tells the story of adventure
book.read.button=Read Now
book.download.button=Download Book

Frequently Asked Questions (FAQ)

Q: What is FB2 format?

A: FB2 (FictionBook 2) is an XML-based ebook format created in Russia in 2004. It's designed for storing fiction with rich metadata including author info, genres, cover images, and structured content. FB2 is extremely popular in Eastern Europe and CIS countries, supported by readers like FBReader, Cool Reader, and Calibre.

Q: What are Java Properties files?

A: Java Properties files (.properties) are simple text files containing key-value pairs used for configuration and localization in Java applications. Each line has the format key=value. They're used extensively for internationalization (i18n), application settings, and resource bundles. Properties files can be read by Java's Properties class and many other programming languages.

Q: What data is extracted during conversion?

A: The converter extracts book metadata (title, author, genre, date), chapter titles, text content, and other structural elements from the FB2 file. These are organized as hierarchical keys (e.g., book.title, chapter.1.title) in the Properties file for easy access and localization.

Q: Will formatting be preserved?

A: No. Properties format only supports plain text key-value pairs. All formatting (bold, italic, etc.) and structural elements (lists, tables) are lost during conversion. Only the text content and basic metadata are preserved. This format is intended for text extraction and localization, not for preserving document formatting.

Q: Can I use Properties files for localization?

A: Yes! This is one of the main use cases. After converting FB2 to Properties, you can create multiple language versions (e.g., messages_en.properties, messages_es.properties, messages_fr.properties) for internationalization. Java's ResourceBundle class automatically loads the correct language file based on user locale.

Q: How are special characters handled?

A: Special characters are escaped according to Properties format rules. Unicode characters can be represented as \uXXXX escape sequences. Backslashes, equals signs, colons, and other special characters are automatically escaped. The file uses UTF-8 encoding by default for modern Java versions.

Q: Can I convert Properties back to FB2?

A: Not directly, as Properties format doesn't preserve the rich structure and formatting of FB2. Properties files are flat key-value stores, while FB2 has complex hierarchical XML structure with formatting, images, and metadata. You would need to manually reconstruct the FB2 structure.

Q: What programming languages support Properties files?

A: While Properties format originated in Java, it's supported by many languages including Python (configparser), PHP, Ruby, JavaScript (properties-parser), and more. The simple key-value format makes it easy to implement parsers in any language.