Skip to main content

WhatsApp Backup Tools

WhatsApp Backup Tools

Your WhatsApp history, truly yours.
The complete local-first suite to automatically organize your media and explore your chats offline, just like WhatsApp Web.

Features • Quick Start • How It Works • Limitations

PyPI Version Tests Status Tests Count Python Version Code style: ruff License

WhatsApp Backup Tools Viewer Hero

⚡️ 100% Local & Private — No cloud accounts, no telemetry, no data leaves your machine. Full native support for Android & iOS backups on Windows, macOS, and Linux.

Overview

WhatsApp Backup Tools is a suite to archive and access your WhatsApp data. Consists of two complementary programs:

  • wab-archiver (WhatsApp Backup Archiver) organises your WhatsApp media into a structured folder hierarchy using metadata from the WhatsApp database. Instead of an unstructured dump, you get a browsable archive sorted by contact or group, year, and direction (Sent/Received), with original message timestamps preserved.
  • wab-viewer (WhatsApp Backup Viewer) lets you browse and search your archived chats through a local web UI, replicating WhatsApp Web.

Both tools run locally — no data leaves your machine. Windows, Linux, and macOS are supported. Python 3.11 required.

⚠️ These tools are designed to run on a backup copy of your WhatsApp data — never on live device files. The archiver always makes a copy of your data.


Table of Contents

Ready to begin? Skip directly to Installation & Quick Start.


Features

WhatsApp Backup Archiver

Organise and preserve your WhatsApp media in a clean, human-readable structure.

🗂️ Organization & Metadata Stamping

  • Structured & Human-Readable: Organises media into Contacts/ and Groups/ sorted by year and Sent/Received, with original WhatsApp message timestamps preserved.
  • EXIF & Container Metadata Writing: Optionally writes original WhatsApp message timestamps directly into image EXIF metadata and MP4/M4A video/audio headers so third-party photo managers (Google Photos, Immich, Apple Photos) index media on chronological timelines. Includes a dedicated update-metadata command to retroactively backfill existing archives in-place.
  • Supported Media: Images, Videos, Audio, Voice notes, Video messages, Animated GIFs, Documents, Stickers, and Contact cards (.vcf).

⚡ Ingestion & Incremental Merging

  • Android Incremental Backup Merging: Discovers, decrypts, and sequentially merges Android incremental backups (msgstore-increment*.db.crypt14/15) with full entity resolution for reactions, polls, pins, locations, and edits.
  • Cross-Platform Extraction: Works with both Android (no root required; USB ADB mode supported) and iOS (via local device backups), with optional restore mode to reconstruct Android media layouts.
  • Smart Identity Tracking: Automatically detects contact renames, phone number migrations, and groups with identical names across runs.

🛡️ Safety & Preservation

  • Deleted Message & Chat Preservation: Seamlessly retains messages and chats deleted from your phone or revoked by senders across backup cycles (-P/--preserve-deleted), including call logs, interactive polls, shared locations, and progressive edit history.
  • Safe & Incremental Runs: Skips identical files, never overwrites existing media, merges multiple backup roots (--wa-root), and exports duplicate, missing, and conflicting media CSV audit reports.

WhatsApp Backup Viewer

Explore and search your archived chats through a local web UI replicating WhatsApp Web.

WhatsApp Backup Viewer Demo

🖥️ WhatsApp Web Experience & Navigation

  • Authentic WhatsApp Web UI: Fast, responsive layout with dark and light themes, contact avatars, customizable font size, and regional date formats. On phones, the chat list and the chat open as two levels like the WhatsApp app, with back navigation.
  • Dedicated Navigation Tabs: Browse Chats, Call History, Starred Bookmarks, and Archived Chats from the sidebar, with tab-aware search and instant keyboard shortcuts (Ctrl+K / /).
  • Full-Text & Contextual Search: Search across all chats or within a single conversation, jump directly to matches, or jump to specific dates with the date picker.

💬 Rich Timeline & Interactive Messaging

  • In-Chat Call Bubbles: Voice and video calls rendered chronologically in chat timelines with call duration, status, and 1-click jump to context.
  • Interactive WhatsApp Polls: Native poll cards with option percentages, checkmarks, and an interactive "View votes" popup detailing voter identities.
  • Pinned Messages Banner Strip: Authentic banner strip beneath the chat header to cycle through pinned messages and jump directly to them with emerald highlights.
  • Progressive Edit History: Inspect original text and edit timestamps for modified messages.
  • Interactive Mentions & Sender Colors: Group @mentions styled as badges opening 1-to-1 chats, with theme-adaptive participant sender colors.
  • Collapsible Long Messages: Neatly trimmed long text and media captions with a "Read More" toggle.

🎙️ Media, Voice Waveforms & Video Notes

  • Voice Message Waveforms: Authentic sound waveforms with tap/drag scrubbing, adjustable playback speeds (1x to 2x), and duration badges.
  • Circular Video Notes: Signature circular push-to-video player with live countdown rings.
  • In-Browser Gallery & Lightbox: Stream videos/audio, open photos in a full-screen lightbox with pan/zoom, and explore categorized media (photos, videos, audio, voice notes, documents, stickers).

🛡️ Privacy & Flexible Deployment

  • 100% Local & Offline: All databases and assets run locally; no external network requests or analytics.
  • Sub-Path & Reverse Proxy Hosting: Serve under custom base URLs (e.g. /whatsapp) behind Nginx, Traefik, or Caddy via --base-path.
  • External Storage Support: Whitelisted symlinks and Windows NTFS Directory Junctions to keep heavy media folders on secondary hard drives.

Archive Structure

After a successful run, the archive is organised into a clean, human-readable hierarchy:

📁 <output>/
├── 👤 Contacts/
│   ├── John Doe (0039123456789)/
│   │   ├── 2023/
│   │   │   ├── 📥 Received/
│   │   │   └── 📤 Sent/
│   │   └── 2024/
│   │       ├── 📥 Received/
│   │       └── 📤 Sent/
│   └── Unknown (0044987654321)/
│       └── 2022/
│           └── 📥 Received/
├── 👥 Groups/
│   ├── Family Chat/
│   │   ├── 2023/
│   │   │   └── 🖼️ IMG-20230115-WA0001_JohnDoe.jpg
│   │   └── 2024/
│   │       └── 🎥 VID-20240115-WA0002_Me.mp4
│   └── Work Team/
│       └── 2024/
├── 🗄️ WhatsApp Databases/          # Decrypted ChatStorage.sqlite, msgstore.db, etc.
├── 🛡️ preserved_messages.db        # Deleted messages, polls & edits (when using -P)
├── ⚙️ .wa_media_archiver.db        # Archive cache & state tracking
├── 📝 wab-archiver.log             # Execution audit log
├── 📊 missing_media_report.csv     # Missing media report
├── 📊 duplicate_media_report.csv   # Deduplicated media audit
└── 📊 source_conflicts_report.csv  # Conflicting copies across backup roots (--wa-root)

Please note: the actual output does not contain these emojis, they have been added here only for readability purposes.

  • Files in Contacts folders retain their original filename
  • Files in Groups folders have the sender name appended: IMG-20230115-WA0001_JohnDoe.jpg
  • Your own sent media in groups is appended with _Me
  • All copied files have their modified date set to the original WhatsApp timestamp (optionally, embedded EXIF DateTimeOriginal and MP4 container metadata can also be written using --exif-timestamps)
  • Contact folder names use the 00 prefix for phone numbers (e.g. 0039...), not +

Installation & Quick Start

To organize and view your WhatsApp data on your computer, the tool needs two things from your phone: your WhatsApp Database and your WhatsApp Media.

Everything is processed 100% locally on your computer — no data leaves your machine. See docs/prerequisites.md for full system requirements.


Step 1: Install the Tool

Ensure Python 3.11+ is installed, then install from PyPI:

pip install whatsapp-backup-tools

💡 Windows users: If pip is not recognized, run py -m pip install whatsapp-backup-tools instead.

Alternative installation methods (offline wheel, clone, or running without pip)
  • Pre-built wheel (.whl): Download from GitHub Releases and run:
    pip install whatsapp_backup_tools-x.xx-py3-none-any.whl
    
  • Local clone:
    git clone https://github.com/auanasgheps/whatsapp-backup-tools.git
    cd whatsapp-backup-tools
    pip install .
    
  • Manual execution without pip:
    python -m wab_archiver --help
    python -m wab_viewer --help
    

Step 2: Get the Files from Your Phone

Choose your platform for a step-by-step extraction walkthrough:

🤖 Android 🍏 iOS / iPhone
Open Android Setup Guide → Open iOS Setup Guide →
• E2E Encrypted Backup: Enabled (save 64-digit key)
• Media Sync: Pull automatically over USB (--from-adb) or via Syncthing
• Root: Not required
• In-App E2E Backup: Disabled
• Backup Source: Local backup via Finder (macOS) or Apple Devices / iTunes (Windows)
• Type: Standard unencrypted backup

Step 3: Archive & View

The simplest and recommended way to archive your data is using a configuration file (config.toml), which avoids entering long terminal paths on every run.

1. Generate & Fill Your Configuration

Generate a starter configuration template in your current folder:

wab-archiver config generate

Open example-config.toml, enter your settings (destination path, backup source, and encryption key or iOS backup path), and save it as config.toml. See the Configuration Guide for full descriptions of all options.

2. Run the Archiver

Run a preview (--dry-run) first to verify your configuration and paths:

wab-archiver archive --dry-run

Once the dry run completes without errors, remove --dry-run to create your archive:

wab-archiver archive
Prefer running directly via command line without a config file?

Android example:

wab-archiver archive \
  --msgstore "/path/to/WhatsApp/Databases/msgstore.db.crypt15" \
  --e2e-key YOUR_64_CHAR_KEY \
  --wa-root "/path/to/WhatsApp" \
  --output "/path/to/my-archive" \
  --dry-run

(Alternatively, if your phone is connected via USB, use --from-adb to pull and decrypt the database automatically.)

iOS example:

wab-archiver archive \
  --ios-backup "/path/to/Backup/<UDID>" \
  --output "/path/to/my-archive" \
  --dry-run

💡 On Windows, replace the line continuation \ with ` (PowerShell) or ^ (cmd.exe). Remember to enclose paths containing spaces in quotes.

Already have an archive and only want to add EXIF timestamps?

To retroactively backfill original WhatsApp timestamps into your photos and videos without re-extracting:

wab-archiver update-metadata "/path/to/my-archive"

3. Open the Local Chat Viewer

Point wab-viewer to your archive folder:

wab-viewer "/path/to/my-archive"

Open your browser at http://127.0.0.1:5000 to browse, search, and relive your chats. See the Viewer Guide for all features.


Re-running the Archiver

The archiver is safe to re-run on an existing archive:

  • Files already copied with identical content will be silently skipped
  • Files with the same name but different content will be renamed with a numeric suffix and logged as a warning
  • New media not yet in the archive will be copied normally
  • If a contact has been renamed since the last run, their folder on disk will be automatically renamed to match, keeping the archive consolidated
  • Recommended: use the config file to keep settings for easier re-runs

Prerequisites

  • Python 3.11 or later is required
  • Core Dependencies: Required Python packages (flask, wa-crypt-tools, iphone-backup-decrypt, cryptography) are installed automatically by pip. See docs/prerequisites.md for complete technical details.
  • Android:
    • End-to-end encrypted backup must be enabled in WhatsApp before pulling the database. Root is not required
    • ADB is installed
  • iOS/iPadOS:
    • End-to-end encrypted backup must be disabled
    • An iOS backup on your computer

See docs/prerequisites.md for full setup instructions: E2E backup configuration, database extraction (Android and iOS), contacts pull, and locating your media folder.


Known Limitations

Archiver

  • Year folders reflect the local time of the machine running the script, not UTC. A message sent just after midnight on 1 January will be filed under the new year only if your machine's clock agrees. This is intentional — the archive reflects your local experience of when media was shared
  • iOS restore mode is not supported. Restore mode reconstructs the Android Media/ folder layout, which has no equivalent on iOS. Running wab-archiver restore on an iOS archive exits with a clear error
  • iOS number change tracking is best-effort. Contacts present in the device address book are consolidated automatically. Contacts not saved to the address book appear as separate folders
  • Recent Android link previews and media thumbnails may be missing until the next full backup. To save space and mobile data, WhatsApp's daily incremental backups only save message text and details, leaving out image previews. Once WhatsApp completes its next full base backup on your phone (typically created every 5 to 7 days, or when manually triggering a backup in WhatsApp settings), those missing previews will appear in your archive after running the archiver again. Because this tool runs 100% locally and offline, it never connects to WhatsApp servers to download missing previews.

Viewer

  • Profile pictures are not displayed: Local WhatsApp backups do not store contact avatars (requires live WhatsApp connection or unbacked-up sandbox databases).
  • Unsaved contact push names on Android require root: Friendly push names for unsaved numbers reside in private application storage (wa.db), excluded from backups. Unsaved numbers display their international phone number.
  • See viewer known limitations for full technical details on receipts and incremental preview caches.

Star History

Star History Chart

Credits and Thanks


Development Philosophy

Handling personal communication archives requires high standards for data integrity and privacy. This project is built on three core engineering pillars:

  • Strict Verification: Over 1,000 unit, integration, and UI tests validate everything from multi-root media deduplication to SQLite transaction safety.
  • Domain Rigor: Deep reverse-engineering of proprietary WhatsApp artifacts across both mobile operating systems (cryptographic pipelines, protobuf varints, and auxiliary databases), cross-checked against established open-source implementations to ensure structural accuracy.
  • Developed with AI: Modern AI coding tools were leveraged as pair programmers to accelerate implementation and broaden test coverage, strictly guided by human architectural design and verified against automated CI suites.

Disclaimer

WhatsApp Backup Tools are not affiliated, associated, authorised, endorsed by, or in any way officially connected with WhatsApp LLC, or any of its subsidiaries or its affiliates.

The project is provided 'as is' without any express or implied warranties.

Metadata

Release files for whatsapp-backup-tools 0.80

For a detailed explanation of source distributions (sdists) and built distributions (wheels), please see the package formats documentation.

Source distribution (sdist)

Source distribution for whatsapp-backup-tools 0.80
File Size Uploaded Provenance Actions
whatsapp_backup_tools-0.80.tar.gz 425.4 kB With provenance Details for whatsapp_backup_tools-0.80.tar.gz

Built distribution (wheel)

Table of built distributions (wheels) for whatsapp-backup-tools 0.80
File Interpreter ABI Platform Actions
whatsapp_backup_tools-0.80-py3-none-any.whl Python 3 none any Details for whatsapp_backup_tools-0.80-py3-none-any.whl

Total release size: 892.7 kB

Release files / whatsapp_backup_tools-0.80.tar.gz

Download URL whatsapp_backup_tools-0.80.tar.gz
Size 425.4 kB
Tags Source
SHA-256 checksum
How to use checksums
9e986f9025ad6257abd8c7eeb1ffa112aabdd82c921fbdedf49f7d8128d60762
BLAKE2b-256 checksum
How to use checksums
52c6eb55a5ebf75c199c340fc7cac3524a5fd9aa4d84bfcce690e2fde0a74714
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
Yes
Uploaded via twine/7.0.0 CPython/3.13.16

Provenance

Provenance describes where a file came from. On PyPI, provenance is shared via attestations, which provide a verifiable record of the build or publishing details. View details, limitations and caveats.

PyPI Publish Attestation

PyPI verified that this artifact, at this checksum, originated from the publisher listed below.

Signed by GitHub Actions, verified by PyPI on Nov 24, 2026.

Transparency log

Release files / whatsapp_backup_tools-0.80-py3-none-any.whl

Download URL whatsapp_backup_tools-0.80-py3-none-any.whl
Size 467.2 kB
Tags Python 3
SHA-256 checksum
How to use checksums
cde026ba186bbffd9bb2022207291a9f204e1022e9e62c4d2968cf3d59d3a3a5
BLAKE2b-256 checksum
How to use checksums
64a16898d39022ff31790a112f1f3a9baf04a15907f5740376a8069fce12bec1
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
Yes
Uploaded via twine/7.0.0 CPython/3.13.16

Provenance

Provenance describes where a file came from. On PyPI, provenance is shared via attestations, which provide a verifiable record of the build or publishing details. View details, limitations and caveats.

PyPI Publish Attestation

PyPI verified that this artifact, at this checksum, originated from the publisher listed below.

Signed by GitHub Actions, verified by PyPI on Nov 24, 2026.

Transparency log

Security for whatsapp-backup-tools 0.80

Provenance

Provenance describes where a file came from. On PyPI, provenance is shared via attestations, which provide a verifiable record of the build or publishing details. View details, limitations and caveats.

Full provenance

Both files in this release have been uploaded with provenance metadata.

Select from 2 files

Attestation for whatsapp_backup_tools-0.80.tar.gz

PyPI Publish Attestation

PyPI verified that this artifact, at this checksum, originated from the publisher listed below.

Signed by GitHub Actions, verified by PyPI on Nov 24, 2026.

Transparency log

A note on package security

PyPI is a repository for distributing packages, not a service for auditing them. While third-party security researchers and our staff do their best to detect and remove malicious packages, PyPI cannot guarantee the quality, security or suitability of any given package.

To learn more about protecting yourself from malicious actors, visit our package security documentation.

Anthropic, PBC Visionary sponsor Bloomberg Visionary sponsor Hudson River Trading Visionary sponsor Meta Visionary sponsor NVIDIA Visionary sponsor Microsoft Sustainability sponsor Depot Continuous Integration AWS Cloud computing and Security Sponsor Datadog Monitoring Fastly CDN Google Download Analytics Sentry Error logging StatusPage Status page