AyeTech

UniFi Backup Reader · decode .unf and .unifi backups

drop a file to begin
GitHub
Backup File
Drop your UniFi backup here
or click to choose a .unf or .unifi file
Parsed locally · No upload · No telemetry
Where to grab a backup
Both file types work, from older and newer Network releases. The reader checks what's inside and picks the right decoder, so just drop the file you have.
  1. From the cloud archive (easiest). Open account.ui.com/backups, click into the console you want, then Download the latest backup. You'll get a .unifi file — drop it here.
  2. Direct from the controller. In the UniFi Network web UI: Settings → System → Backups → Download Backup. You'll get a .unf file.
.unf
UniFi Network application backup. Sites, networks, Wi-Fi, devices, firewall rules.
.unifi
UniFi OS console backup. Same Network data plus console info, paired devices, and app versions.
db.gz (BSON)
What older Network releases store inside either file. MongoDB data, as a mongodump archive or the 10.x command stream.
db-config.jsonl.gz (PostgreSQL)
What newer Network releases store instead (postgres_v1). Detected automatically and shown in the same tabs.
How it works
Three layers stand between a backup file and the page you see. All three run in your browser — no server, no upload, no telemetry.
1
Decrypt
UniFi encrypts both formats so the file isn't readable at rest. The keys are static and have been publicly documented for years. .unf — AES-128-CBC with key bcyangkmluohmars and IV ubntenterpriseap. Same pair from Network 5.x through 10.x. .unifi — AES-256-CBC. The IV is the first 16 bytes of the file (random per backup). The 32-byte key is embedded in UniFi OS firmware.
2
Decompress
Decrypted payloads are containers, not data. .unf opens to a ZIP holding the Network database, version info, and metadata. .unifi opens to a gzipped TAR; inside, backup/network/ holds a complete .unf-equivalent payload, and sibling folders carry console info, app versions, and paired-device records. Both paths end at the same database file: db.gz on older Network releases, db-config.jsonl.gz on newer ones.
3
Parse
db.gz: ungzips to a MongoDB dump in one of two BSON wire formats, the legacy mongodump archive stream (magic 0x8199e26d, pre-Network 10.x) or the __cmd: "select" command stream (10.x+). db-config.jsonl.gz: ungzips to a PostgreSQL export (postgres_v1). Each table is a header line listing its columns, then one JSON line per row, with UUID and JSONB values wrapped in typed objects. Table and field names are mapped back to their BSON equivalents. Either way, records are grouped by collection (setting, wlanconf, networkconf, user, firewallrule, device and dozens more) and assembled into the tabs you'll navigate above. The untouched source records stay under All collections.
What's bundled into this HTML file
  • aes-js v3.1.2 (Richard Moore, MIT) — pure-JS AES implementation, ~64 KB
  • fflate v0.8.2 (Arjun Barrett, MIT) — pure-JS gzip/zip/inflate, ~33 KB
  • TAR extractor, BSON and PostgreSQL decoders, renderer: written for this project, zero dependencies
  • Webfonts — Outfit, Plus Jakarta Sans, JetBrains Mono (Open Font License), inlined as woff2
Open source · MIT licensed
Single HTML file (~550 KB) — no backend, no CDN at runtime, no telemetry. Every byte is auditable, including the bundled fflate, aes-js, and webfont sources. Fork it, file an issue, or one-click deploy your own private copy on Cloudflare's edge from the GitHub repo.