<- Back to Projects

ChatViz

A privacy-first, 100% client-side chat export viewer for Instagram, Snapchat and WhatsApp with zero outbound network calls and an encrypted IndexedDB vault.

React 19Tailwind CSS v4Web WorkersWebCryptoIndexedDBCloudflare Workers

ChatViz

A private, client-side viewer for your Instagram, Snapchat and WhatsApp chat exports. Your conversation archives are processed entirely in browser memory and saved into an encrypted local vault—no servers, no telemetry, no tracking.

License: MITReact 19Tailwind CSS v4Vite 8Cloudflare WorkersWebCrypto AES-256-GCM
ChatViz conversation screen in dark mode showing virtualized message list, stats bar, search highlights, and reaction pills
The conversation screen: virtualized scrolling, timestamp grouping, media attachments, search with match highlights, and top conversation statistics.
0
Network calls (air-gapped CSP)
100%
Client-side memory processing
600k
PBKDF2-SHA256 iterations
100k+
Virtual messages at 60 fps

Multi-Platform Import

Parses Instagram message_*.json with automated Mojibake UTF-8 repair, Snapchat chat_history.json, and raw WhatsApp .txt or media-packed .zip exports.

Zero-Trust Network Air Gap

Enforces a strict Content-Security-Policy with connect-src ‘none’ and frame-ancestors ‘none’. The application cannot execute outbound fetches, XHRs, WebSockets, or analytics beacons.

Encrypted In-Browser Vault

Protects stored chats using PBKDF2-SHA256 (600,000 iterations) and AES-256-GCM. Decryption keys exist exclusively in volatile memory and are purged on tab close or manual lock.

High-Capacity Virtualization

Powered by @tanstack/react-virtual to smoothly render over 100,000 messages with dynamic height estimation, date separators, and sticky headers at 60 fps.

Streaming Zip64 Engine

A custom random-access unzipper reads media directly from multi-gigabyte ZIP archives on demand using file slice handles without buffering entire archives in browser RAM.

Accessible Theme Engine

Five background themes (Dark, AMOLED for OLED screens, Midnight, Mocha, Light) and seven accent shades verified for WCAG AA contrast (4.5:1) across every surface.

Overview

When you request your data archives from messaging services like Instagram, Snapchat, or WhatsApp, you receive gigabytes of raw JSON files, fragmented text logs, and nested media folders. Existing viewer tools require uploading these sensitive conversations to remote third-party servers.

ChatViz solves this without compromising privacy. All parsing, unzipping, decrypting, and rendering executes 100% on the client. Outbound network communication is blocked at the browser level through a strict Content Security Policy.

Supported Export Formats

1. Instagram (message_*.json)

  • Mojibake UTF-8 Repair: Resolves Instagram’s longstanding export bug where Unicode text (emojis, accented characters) is encoded as broken Latin-1 byte escapes (e.g. \u00c3\u00a9 decoded to clean characters).
  • Multi-File Thread Stitching: Automatically merges split sequential files (message_1.json, message_2.json) into single chronological conversation threads.
  • Inline Reactions: Renders Instagram reaction notifications as compact interactive emoji pills overlaid on the target message bubble.

2. Snapchat (chat_history.json)

  • Ingests the full conversation tree rather than just the single largest thread.
  • Maps ephemeral media notices, text messages, and timestamped shared stories.

3. WhatsApp (.txt and .zip)

  • Zip64 Random-Access Reader: Opens multi-gigabyte WhatsApp .zip archives directly using range slices from the local File handle, streaming photos, videos, voice notes, and stickers on demand without exhausting device memory.
  • Universal Date & Time Parsing: Automatically identifies 12-hour/24-hour clocks and ambiguous month/day ordering based on entire log context.

Interface & Aesthetics

The interface is inspired by classic message bubbles and doodle aesthetics, featuring rounded corners, subtle transitions, and hand-drawn accents.

ChatViz landing screen with hand-drawn speech bubble doodles and drag-and-drop target
Landing screen · interactive doodled drop target, export guides, and immediate local file picker
Theme picker dropdown showing background themes and accent colour palettes
Theme engine · five contrast-checked backgrounds including OLED AMOLED and seven vibrant accents
ChatViz running on a phone viewport with touch-sized controls and safe area margins
Mobile experience · adaptive bottom controls
Passphrase configuration dialog for client-side encrypted IndexedDB storage
Encrypted vault · PBKDF2 & AES-256-GCM

Client-Side Pipeline Architecture

Client-Side Memory Pipeline

Dataflow & Cryptographic Architecture

Air Gap: connect-src 'none' (Zero Outbound Requests)
01Ingestion

Export Archives

Instagram JSON

message_*.json split logs, thread stitching & reaction maps

Snapchat JSON

chat_history.json full conversation tree and shared story media

WhatsApp ZIP / TXT

Raw text logs + media-packed archives with dynamic 12h/24h timestamp detection

02Execution

Web Worker

Inline blob: Worker

Offloads 100% of archive parsing and JSON decoding off the main UI thread

Zip64 Streaming Reader

Reads media slices directly from the File handle on demand without full RAM copies

Mojibake UTF-8 Repair

Corrects broken Instagram Latin-1 byte escapes into native Unicode emojis and accents

03Security

WebCrypto Vault

PBKDF2-SHA256

600,000 iterations stretch user passphrase with a cryptographically random 16-byte salt

AES-256-GCM

Authenticated symmetric encryption for conversation messages, metadata, and media blobs

HMAC Key Blinding

IndexedDB store keys and participant hashes are blinded against physical storage analysis

04Interface

Virtual UI & Storage

Encrypted IndexedDB

Multi-gigabyte persistence across sessions; master decryption key lives only in volatile RAM

@tanstack/react-virtual

Smoothly virtualizes 100,000+ messages at 60 fps with dynamic height estimation & sticky dates

Accessible Theme Engine

Five contrast-checked themes (Dark, AMOLED, Midnight, Mocha, Light) and seven accent shades

  • Dedicated Web Worker: File parsing and unzipping run off the main thread inside an inline blob: worker. Heavy multi-megabyte JSON trees are transformed into lightweight normalized schemas without freezing UI interaction.
  • HMAC-Blinded Database Keys: Chat IDs and participant names in IndexedDB are indexed through HMAC hashes derived from your master passphrase, preventing forensic inspection of database keys even if the browser disk storage is inspected.
  • Volatile Key Lifecycles: Passphrase stretching yields an AES-GCM encryption key that exists exclusively in memory. Pressing Lock, refreshing, or closing the tab drops the key reference.
  • Streaming Media Extraction: Rather than unzipping entire multi-gigabyte archives into RAM, the zip parser reads directory records from the end of the file and extracts individual image/audio blobs only when scrolled into view.

Cryptographic Security Model

ChatViz treats browser storage as untrusted and implements defense-in-depth:

Security Layer Implementation Details
Key Derivation PBKDF2-SHA256 with 600,000 iterations and a unique 16-byte cryptographic salt per vault.
Message Encryption AES-256-GCM authenticated encryption for message text, participant names, and media blobs.
Key Blind Hashing HMAC-SHA256 obscures search terms and primary keys inside IndexedDB stores.
Network Air Gap connect-src 'none', object-src 'none', form-action 'none', and frame-ancestors 'none'.
Link Defense External links require explicit confirmation dialogs and open with rel="noreferrer noopener".
Ephemeral Session “View without saving” mode keeps chats in transient memory and clears all data on tab close.

Technology Stack

Frontend & UI

  • Framework: React 19 / Vite 8
  • Styling: Tailwind CSS v4 with custom property tokens
  • Virtualization: @tanstack/react-virtual
  • Icons: lucide-react
  • Typography: Bricolage Grotesque (display headline), Inter (interface text)

Parsing & Cryptography

  • Off-Thread Processing: Dedicated Web Worker (src/workers/parseWorker.js)
  • Zip Extraction: fflate with random-access slice reader
  • Encryption: WebCrypto API (SubtleCrypto PBKDF2, AES-256-GCM, HMAC)
  • Local Storage: IndexedDB via idb

Hosting & Deployment

  • Platform: Cloudflare Workers Static Assets (wrangler.jsonc)
  • Static Delivery: Zero server-side runtime code; pre-compiled static bundle
  • Security Headers: Edge-enforced CSP, HSTS, frame-ancestors ‘none’, and referrer-policy via _headers

Live Demo & Local Development

ChatViz is hosted and accessible at chatviz.nicx.dev.

To run or build ChatViz locally:

git clone https://github.com/nicx17/chatviz.git
cd chatviz
npm install
npm run dev       # Start local development server
npm test          # Run vitest test suite
npm run lint      # Run eslint and code quality checks
npm run build     # Compile production bundle with CSP