Convert IPYNB to FB2

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

IPYNB vs FB2 Format Comparison

Aspect IPYNB (Source Format) FB2 (Target Format)
Format Overview
IPYNB
Jupyter Notebook

Interactive computational notebook format used in data science, machine learning, and scientific computing. Contains code cells, markdown text, and rich output including visualizations. Based on JSON structure with cells for code execution and documentation.

Interactive Data Science
FB2
FictionBook 2

FB2 (FictionBook) is an XML-based ebook format popular in Russia and Eastern Europe. It stores the entire book structure including metadata, chapters, footnotes, and images in a single XML file. FB2 separates content from presentation, allowing reading applications to control the visual layout.

Ebook XML-Based
Technical Specifications
Structure: JSON with cells array
Encoding: UTF-8 JSON
Format: Open format (Jupyter/IPython)
Cell Types: Code, Markdown, Raw
Extensions: .ipynb
Structure: Single XML document with schema
Encoding: UTF-8 XML
Standard: FictionBook 2.0 schema (XSD)
Images: Base64-encoded inline binaries
Extensions: .fb2, .fb2.zip
Syntax Examples

IPYNB uses JSON cell structure:

{
  "cell_type": "code",
  "source": ["import pandas as pd\n",
             "df = pd.read_csv('data.csv')"],
  "outputs": [{"output_type": "stream",
               "text": ["   col1  col2\n"]}]
}

FB2 uses XML structure for book content:

<FictionBook>
  <description>
    <title-info>
      <book-title>My Book</book-title>
      <author><first-name>John</first-name>
        <last-name>Doe</last-name></author>
    </title-info>
  </description>
  <body>
    <section><p>Content here</p></section>
  </body>
</FictionBook>
Content Support
  • Python/R/Julia code cells
  • Markdown text with formatting
  • Code execution outputs
  • Inline visualizations (matplotlib, plotly)
  • LaTeX math equations
  • HTML/SVG output
  • Embedded images
  • Metadata and kernel info
  • Structured sections and chapters
  • Paragraphs with emphasis and strong text
  • Epigraphs, poems, and citations
  • Footnotes and endnotes
  • Base64-embedded images
  • Rich metadata (author, genre, date)
  • Table of contents
Advantages
  • Interactive code execution
  • Mix of code and documentation
  • Rich visualizations
  • Reproducible research
  • Multiple language kernels
  • Industry standard for data science
  • Self-contained single XML file
  • Rich metadata support
  • Automatic reader-controlled layout
  • Popular format with many readers
  • Schema-validated structure
  • Supports footnotes and annotations
Disadvantages
  • Large file sizes (embedded outputs)
  • Difficult to version control
  • Requires Jupyter to edit interactively
  • Non-linear execution issues
  • Not suitable for production code
  • Limited adoption outside Eastern Europe
  • No CSS/HTML styling control
  • Limited code formatting options
  • No interactive content support
  • Large files when images are embedded
Common Uses
  • Data analysis and exploration
  • Machine learning experiments
  • Scientific research and papers
  • Educational tutorials
  • Data visualization
  • Prototyping algorithms
  • Ebook distribution and libraries
  • Digital book collections
  • Offline reading on mobile devices
  • Ebook archival and preservation
  • Multi-format ebook conversion source
Best For
  • Data science and machine learning workflows
  • Interactive code exploration and prototyping
  • Reproducible research and analysis
  • Educational tutorials and demonstrations
  • Ebook reading on FBReader and CoolReader apps
  • Digital book collections and archival
  • Offline reading on Android devices
  • Eastern European ebook distribution
Version History
Introduced: 2014 (Project Jupyter)
Current Version: nbformat 4.5
Status: Active, widely adopted
Evolution: From IPython Notebook to Jupyter ecosystem
Introduced: 2004 (Russia)
Current Version: FB2 2.1
Status: Stable, widely used in Eastern Europe
Evolution: From FictionBook 1.0 to FB2 with XML schema
Software Support
Jupyter: Native format
VS Code: Full support
Google Colab: Full support
Other: JupyterLab, nteract, Kaggle, DataBricks
Readers: FBReader, CoolReader, AlReader
Desktop: Calibre, FBReader Desktop
Mobile: FBReader (Android/iOS), Moon+ Reader
Converters: Calibre, fb2edit, Pandoc

Why Convert IPYNB to FB2?

Converting Jupyter Notebooks to FB2 format allows you to read your notebook content using FBReader and other FB2-compatible reading applications. FB2 is particularly popular for ebook reading on Android devices and in the Russian-speaking digital book ecosystem.

FB2's self-contained XML structure means the entire book, including metadata and images, is stored in a single file. This makes it easy to share, archive, and manage converted notebooks as ebooks. The format's rich metadata support allows you to specify title, author, and subject information.

For users who prefer FBReader or CoolReader for their ebook reading, converting notebooks to FB2 provides a familiar reading experience. The format's reader-controlled layout means the reading application optimizes text display for the device's screen size.

Key Benefits of Converting IPYNB to FB2:

  • FBReader Compatible: Read in the popular FBReader app and other FB2 readers
  • Self-Contained: Single XML file with all content and images
  • Rich Metadata: Preserve title, author, and subject information
  • Structured Chapters: Notebook sections become navigable chapters
  • Offline Reading: Download and read without internet connection
  • Android Friendly: Popular format with excellent Android reader support
  • Archival Format: XML-based format suitable for long-term preservation

Practical Examples

Example 1: Python Course Notebook to FB2

Input IPYNB file (notebook.ipynb):

{
  "cells": [
    {
      "cell_type": "markdown",
      "source": ["# Python for Beginners\n",
                  "## Chapter 1: Variables and Data Types\n",
                  "Python supports several built-in data types."]
    },
    {
      "cell_type": "code",
      "source": ["name = 'Alice'\n",
                  "age = 30\n",
                  "height = 5.7\n",
                  "is_student = True\n",
                  "print(f'{name} is {age} years old')\n",
                  "print(f'Height: {height} ft, Student: {is_student}')"],
      "outputs": [{"text": "Alice is 30 years old\nHeight: 5.7 ft, Student: True"}]
    }
  ]
}

Output FB2 file (notebook.fb2):

<FictionBook>
  <description>
    <title-info>
      <book-title>Python for Beginners</book-title>
    </title-info>
  </description>
  <body>
    <section>
      <title>Chapter 1: Variables and Data Types</title>
      <p>Python supports several built-in
      data types.</p>

      <p>[Code]</p>
      <p>name = 'Alice'</p>
      <p>age = 30</p>
      <p>height = 5.7</p>
      <p>is_student = True</p>
      <p>print(f'{name} is {age} years old')</p>

      <p>Output: Alice is 30 years old</p>
      <p>Height: 5.7 ft, Student: True</p>
    </section>
  </body>
</FictionBook>

Example 2: Data Analysis Book to FB2

Input IPYNB file (analysis.ipynb):

{
  "cells": [
    {
      "cell_type": "markdown",
      "source": ["# Exploratory Data Analysis Cookbook\n",
                  "## Recipe: Detecting Outliers\n",
                  "Use the IQR method to find outliers in your data."]
    },
    {
      "cell_type": "code",
      "source": ["import numpy as np\n",
                  "data = [12, 15, 14, 10, 100, 13, 11, 14]\n",
                  "q1, q3 = np.percentile(data, [25, 75])\n",
                  "iqr = q3 - q1\n",
                  "lower = q1 - 1.5 * iqr\n",
                  "upper = q3 + 1.5 * iqr\n",
                  "outliers = [x for x in data if x < lower or x > upper]\n",
                  "print(f'IQR: {iqr}')\n",
                  "print(f'Outliers: {outliers}')"],
      "outputs": [{"text": "IQR: 3.25\nOutliers: [100]"}]
    }
  ]
}

Output FB2 file (analysis.fb2):

<FictionBook>
  <description>
    <title-info>
      <book-title>Exploratory Data Analysis
      Cookbook</book-title>
    </title-info>
  </description>
  <body>
    <section>
      <title>Recipe: Detecting Outliers</title>
      <p>Use the IQR method to find outliers
      in your data.</p>

      <p>[Code]</p>
      <p>import numpy as np</p>
      <p>data = [12, 15, 14, 10, 100, ...]</p>
      <p>q1, q3 = np.percentile(data, [25, 75])</p>
      <p>iqr = q3 - q1</p>

      <p>Output:</p>
      <p>IQR: 3.25</p>
      <p>Outliers: [100]</p>
    </section>
  </body>
</FictionBook>

Example 3: Tutorial Collection to FB2

Input IPYNB file (research.ipynb):

{
  "cells": [
    {
      "cell_type": "markdown",
      "source": ["# Web Scraping with Python\n",
                  "## Fetching a Web Page\n",
                  "Use the `requests` library to download HTML content."]
    },
    {
      "cell_type": "code",
      "source": ["import requests\n",
                  "url = 'https://example.com'\n",
                  "response = requests.get(url)\n",
                  "print(f'Status: {response.status_code}')\n",
                  "print(f'Content length: {len(response.text)} chars')\n",
                  "print(f'Title found: {\"\" in response.text}')"],
      "outputs": [{"text": "Status: 200\nContent length: 1256 chars\nTitle found: True"}]
    }
  ]
}</pre>

            <p><strong>Output FB2 file (research.fb2):</strong></p>
            <pre style="background: #f5f5f5; padding: 1rem; border-radius: 5px; border-left: 4px solid #27ae60;"><FictionBook>
  <description>
    <title-info>
      <book-title>Web Scraping with Python
      </book-title>
    </title-info>
  </description>
  <body>
    <section>
      <title>Fetching a Web Page</title>
      <p>Use the requests library to download
      HTML content.</p>

      <p>[Code]</p>
      <p>import requests</p>
      <p>url = 'https://example.com'</p>
      <p>response = requests.get(url)</p>
      <p>print(f'Status: {response.status_code}')</p>

      <p>Output:</p>
      <p>Status: 200</p>
      <p>Content length: 1256 chars</p>
      <p>Title found: True</p>
    </section>
  </body>
</FictionBook></pre>
        </div>

        <!-- FAQ Section -->
        <div class="conversion-info" style="margin-top: 3rem;">
            <h3 style="color: #2c3e50;">Frequently Asked Questions (FAQ)</h3>

            <h4 style="color: #34495e; margin-top: 1.5rem;">Q: What is FB2 and where is it commonly used?</h4>
            <p style="margin-left: 1rem;">A: FB2 (FictionBook 2) is an XML-based ebook format that originated in Russia and is widely used in Eastern European countries. It is the primary format for many online ebook libraries and is natively supported by popular reading applications like FBReader, CoolReader, and AlReader.</p>

            <h4 style="color: #34495e; margin-top: 1.5rem;">Q: How does code from notebooks appear in the FB2 file?</h4>
            <p style="margin-left: 1rem;">A: Code cells are represented as pre-formatted text sections within the FB2 XML structure. While FB2 does not support syntax highlighting natively, the monospaced text presentation distinguishes code from regular narrative text in the reading application.</p>

            <h4 style="color: #34495e; margin-top: 1.5rem;">Q: Can I read the FB2 file on an iPhone or iPad?</h4>
            <p style="margin-left: 1rem;">A: Yes. FBReader is available for iOS and provides full FB2 support. Other iOS reading applications that support FB2 include KyBook, Marvin, and TotalReader. You can also convert FB2 to EPUB using Calibre for Apple Books compatibility.</p>

            <h4 style="color: #34495e; margin-top: 1.5rem;">Q: Are notebook images embedded in the FB2 file?</h4>
            <p style="margin-left: 1rem;">A: FB2 supports embedding images as Base64-encoded binary data within the XML file. Static images from notebook outputs may be included. However, interactive visualizations are not supported and are converted to text representations.</p>

            <h4 style="color: #34495e; margin-top: 1.5rem;">Q: Can I convert the FB2 to other ebook formats?</h4>
            <p style="margin-left: 1rem;">A: Yes. Calibre can convert FB2 to EPUB, MOBI, AZW3, PDF, and many other formats. FB2's structured XML format makes it an excellent intermediate format for multi-format ebook distribution.</p>

            <h4 style="color: #34495e; margin-top: 1.5rem;">Q: Does the conversion preserve notebook metadata?</h4>
            <p style="margin-left: 1rem;">A: Yes. The notebook filename and available metadata are mapped to FB2's rich metadata elements including title-info, document-info, and publish-info. This ensures the ebook is properly cataloged in reading applications.</p>

            <h4 style="color: #34495e; margin-top: 1.5rem;">Q: How are markdown headings converted in FB2?</h4>
            <p style="margin-left: 1rem;">A: Markdown headings become FB2 section titles. The heading hierarchy creates nested sections in the FB2 document, which reading applications use to build the table of contents for navigation.</p>

            <h4 style="color: #34495e; margin-top: 1.5rem;">Q: What is the difference between .fb2 and .fb2.zip extensions?</h4>
            <p style="margin-left: 1rem;">A: The .fb2.zip extension indicates a ZIP-compressed FB2 file. Since FB2 is XML text, compression can significantly reduce file size (often 60-80% smaller). Most FB2 readers can open both compressed and uncompressed variants.</p>
        </div>
    </section>
</div>

    </div>
    <footer style="width: 98%; display: flex; justify-content: space-between; align-items: center; padding: 5px; background: #f8f9fa; bottom: 0; left: 0; font-size: 14px;">
    
    <div>
        Conversions: 1810,
        Conversion Time: 19 hours, 35 minutes, 4 seconds,
        Converted File Size: 9.70 GB
    </div>
    
    <div style="text-align: right;">
        © 2025 Convert.Me - All rights reserved.
    </div>
</footer>


    
<script src="/static/js/converters/text/ipynb_to_fb2.js"></script>


    
<form style="display:none;">
    <input type="hidden" name="csrfmiddlewaretoken" value="D4uVJ3pvPnysIGO13cMsPrLONceZL8VU83AysVtFCRxGmB33dvOGe0YtVkoRSxLP">
</form>
</body>
</html>