Skip to content

Convert JSONLZ4 to HTML

Export Firefox bookmark backups or render session-recovery JSONLZ4 files as local HTML.

Make HTML files online

We can't read JSONLZ4 files yet, so this conversion isn't available. If you can export your work to one of these formats - or others - we'll turn it into HTML:

Want to convert JSONLZ4 to HTML?

Let us know. We pick the conversions to add next by how many people ask for them.

How to convert jsonlz4 to html file

Firefox users may need an HTML bookmark file for another browser, a shareable link list, or an archive. A .jsonlz4 backup cannot be opened as a web page; the correct process depends on whether it is a Firefox bookmark backup or a session-recovery file.

What JSONLZ4 contains

JSONLZ4 is not a general-purpose document format. It usually means JSON compressed with Mozilla's LZ4 wrapper, whose files begin with the eight-byte signature mozLz40\0. Mozilla Firefox uses it for automatic bookmark backups and session-recovery data.

Files in a Firefox profile's bookmarkbackups folder contain bookmarks, folders, separators, and related bookmark metadata. Files such as recovery.jsonlz4, previous.jsonlz4, and upgrade.jsonlz4-* in sessionstore-backups contain saved windows, tabs, URLs, titles, and session state. Firefox's current bookmark database, places.sqlite, is not a JSONLZ4 file.

Find the active Firefox profile through Help → More Troubleshooting Information → Profile Folder → Open Folder. Copy the backup before working with it, because Firefox can replace session-recovery files while it runs.

What HTML provides

HTML is a browser-readable text format that can hold clickable links, headings, and bookmark-folder structure. Firefox's bookmark export uses the widely supported Netscape Bookmark HTML format, which Firefox, Chrome, Edge, and many other browsers can import; a session HTML file is instead a readable archive and cannot restore a browser session.

Export a Firefox bookmark backup

This is the preferred route for a file from bookmarkbackups; do not decompress it manually. In Firefox, first export or back up the current bookmarks, because restoring a backup replaces the existing bookmark set.

  1. Open Bookmarks → Manage Bookmarks.
  2. Select Import and Backup → Restore → Choose File, then select the copied .jsonlz4 bookmark backup.
  3. After Firefox restores it, select Import and Backup → Export Bookmarks to HTML and save the .html file.

The exported HTML preserves bookmark folders and is the appropriate file for importing bookmarks into another browser. Restoring a bookmark backup does not restore open tabs or session cookies.

Render a session backup as HTML

A file from sessionstore-backups cannot be restored through Firefox's bookmark menu or exported as bookmarks. Use a local Python 3 installation and the maintained lz4 package to decompress it and create a link list without uploading potentially sensitive tab titles, URLs, and search terms.

python -m pip install lz4
python jsonlz4_to_html.py recovery.jsonlz4 session.html

Save the following as jsonlz4_to_html.py. Firefox's payload is a raw LZ4 block without a stored uncompressed size, so the script increases the output buffer until decompression succeeds.

import html
import json
import sys
from pathlib import Path

import lz4.block


def decompress_mozlz4(data):
    if not data.startswith(b"mozLz40\0"):
        raise ValueError("Not a Firefox Mozilla-LZ4 JSON file.")
    payload = data[8:]
    size = max(1024, len(payload) * 4)
    while size <= 2 * 1024 ** 3:
        try:
            return lz4.block.decompress(payload, uncompressed_size=size)
        except lz4.block.LZ4BlockError:
            size *= 2
    raise ValueError("Unable to decompress the file.")


if len(sys.argv) != 3:
    raise SystemExit("Usage: python jsonlz4_to_html.py input.jsonlz4 output.html")

session = json.loads(decompress_mozlz4(Path(sys.argv[1]).read_bytes()))
parts = [
    "<!doctype html><meta charset='utf-8'><title>Firefox session tabs</title>",
    "<style>body{font:16px system-ui,sans-serif;margin:2rem;max-width:70rem}"
    "li{margin:.45rem 0;overflow-wrap:anywhere}small{color:#555}</style>",
    "<h1>Firefox session tabs</h1>",
]

for number, window in enumerate(session.get("windows", []), 1):
    parts.append(f"<h2>Window {number}</h2><ol>")
    for tab in window.get("tabs", []):
        entries = tab.get("entries", [])
        if not entries:
            continue
        try:
            index = int(tab.get("index", 1)) - 1
        except (TypeError, ValueError):
            index = 0
        entry = entries[max(0, min(index, len(entries) - 1))]
        url = str(entry.get("url", ""))
        title = str(entry.get("title") or url or "(untitled tab)")
        safe_url = html.escape(url, quote=True)
        safe_title = html.escape(title, quote=True)
        if url.startswith(("https://", "http://")):
            parts.append(f'<li><a href="{safe_url}" target="_blank" rel="noopener noreferrer">{safe_title}</a><br><small>{safe_url}</small></li>')
        else:
            parts.append(f"<li>{safe_title}<br><small>{safe_url}</small></li>")
    parts.append("</ol>")

parts.append("</html>")
Path(sys.argv[2]).write_text("\n".join(parts), encoding="utf-8")

Open session.html locally. The script creates links only for http:// and https:// URLs; about:, extension, and local-file addresses remain text to avoid activating non-web locations.

Compatibility and privacy limits

The session output records only each tab's selected history entry. It does not preserve back-forward history, cookies, logins, form fields, container identities, extension state, or suspended-tab state, and it cannot recreate the original session.

An unknown .jsonlz4 file may use a different LZ4 variant or contain unrelated JSON. On macOS or Linux, check the Firefox wrapper signature with xxd -l 8 filename.jsonlz4; if it is not mozLz40\0, do not use the Firefox-specific script.

There is no established reputable online service that directly converts Firefox JSONLZ4 session backups into safe HTML. General conversion sites require uploading browsing data and may not recognize Mozilla's wrapper; use local processing, or decompress and redact the JSON before considering any web-based tool.

JSONLZ4 vs HTML: format comparison

How the JSONLZ4 and HTML formats compare on the properties that matter most for this conversion.

Comparison of the JSONLZ4 and HTML file formats
Property .JSONLZ4 Mozilla JSONLZ4 session backup .HTML HyperText Markup Language
Opens in a web browser No Yes, natively
Plain-text readable No Yes
Text formatting None Extensive
Images No Yes
Interactive elements No Yes
Further editing Limited Easy
Typical file size Small Small
Open standard No Yes
Introduced — 1993
Developer Mozilla W3C / WHATWG
MIME type — text/html

Information about file extensions and file types is provided by File-Extensions.org

The database currently does not contain any direct jsonlz4 file converter links.

Frequently asked questions

Can I convert a Firefox .jsonlz4 bookmark backup to HTML?

Yes, a .jsonlz4 bookmark backup can be turned into Firefox-compatible HTML after its compressed JSON data is decoded and mapped to bookmark folders and links. The HTML preserves bookmark structure, but it is not a byte-for-byte copy of the original backup.

Will converting .jsonlz4 to HTML keep my open tabs and session history?

No, HTML is suitable for bookmarks, not Firefox session-recovery data. A session .jsonlz4 file contains tabs, windows, history, and other browser state that a bookmark HTML file cannot represent.

Why does my .jsonlz4 file fail when I try to convert it to HTML?

The file may be a session-recovery file rather than a bookmark backup, or it may still be wrapped in Firefox's compressed JSON format. HTML conversion requires decoding the JSONLZ4 data and knowing whether its contents are bookmarks before creating the export.

Will the HTML file be larger and still editable after converting .jsonlz4?

Usually, the HTML result is larger because it stores readable markup instead of compressed JSONLZ4 data. It remains editable as bookmark HTML, but editing it cannot preserve Firefox-specific session details or every internal field from the source.

Additional formats for
jsonlz4 file conversion

Convert to html from
other formats

Share on social media:

Already downloaded

This file has already been downloaded. For your privacy it was deleted from our server right after the download, so it cannot be downloaded again. To get it once more, convert the file again.