A web-based viewer for exploring your Twitter DM archive. It categorizes and displays messages and media in a clean, chat-like interface built with Svelte and Vite.
- Browse Twitter DMs by conversation
- Embedded support for images and videos
- Emoji reactions display
- Categorized media by sender
- Responsive layout with conversation list and chat view
- Node.js (v16+ recommended)
- Python 3 (for the media organizing script)
- A downloaded Twitter archive from Twitter's data page
Unzip your Twitter archive and locate the folder with:
direct-messages.jsdirect_messages_media/
Copy the categorize_media.py script to the root of your Twitter archive folder, then run:
python categorize_media.pyThis will:
- Parse
direct-messages.js - Move media from
direct_messages_media/tocategorized_media/organized bysenderId
Move the generated files to the project:
# From the archive root
mv categorized_media/ /path/to/twitter-chat-visualizer/public/
# Extract the JSON from direct-messages.js (or manually remove the first part of the first line until the equal sign)
node /path/to/twitter-chat-visualizer/scripts/extract-json.cjs
# Then move the result:
mv direct-messages.json /path/to/twitter-chat-visualizer/public/cd twitter-chat-visualizer
npm install
npm run devVisit: http://localhost:5173