How to Export Discord Chat History — Complete Guide (2026)
Want to archive your Discord server channels or DMs, search through old conversations, or analyze your chat history? DiscordChatExporter is the go-to open-source tool for the job. Here's exactly how to use it to export your messages as JSON for ChatPeek.
Export Discord Chat with DiscordChatExporter
- 1Download DiscordChatExporter from the GitHub releases page. Choose the version for your operating system (Windows, Mac, or Linux).
- 2Get your Discord user token: open Discord Desktop → press Ctrl+Shift+I to open DevTools → go to the Network tab → perform any action (e.g. switch channels) → find any request with an "Authorization" header → copy its value.
- 3Open DiscordChatExporter → paste your token into the token field → click the key icon to authenticate.
- 4Browse your servers and DMs in DiscordChatExporter and select the channel or DM you want to export.
- 5In the export settings, choose JSON as the export format to ensure compatibility with ChatPeek.
- 6Click "Export" and choose a folder on your computer to save the file.
- 7Drag and drop the resulting .json file onto ChatPeek to view and analyze your Discord conversation.
Getting Your Token Safely
Your Discord token is like a password — it grants full access to your account. Keep it safe:
Do
Copy and paste your token only into trusted tools like DiscordChatExporter. After exporting, close the DevTools window. Never store your token in plain text files.
Don't
Never share your token with other people, paste it into websites, or include it in screenshots. If you suspect your token is compromised, change your Discord password immediately to invalidate it.
DMs vs Server Channels
DiscordChatExporter works the same way for both direct messages and server channels. Once authenticated, you'll see a list of all your DMs and the servers you're in. Select whichever you want — the export process is identical.
Direct Messages
All your DMs appear under the "Direct Messages" section. Select a conversation and export as JSON to get all messages, timestamps, and reactions.
Server Channels
Any server you're a member of appears in the list. Select a specific text channel to export. You can only export channels you have read access to.
What DiscordChatExporter Includes
The JSON export contains everything ChatPeek needs to give you a rich, searchable view of your Discord conversation history.
- 💬 All messages with timestamps and author names
- 😄 Reactions and their counts
- 🔗 Attachment references (links to uploaded files)
- 📎 Embed metadata (linked content previews)
- 🤖 Bot messages (flagged separately by ChatPeek)
- 🔒 100% private — processed locally in your browser
Frequently Asked Questions
Is DiscordChatExporter safe to use?
Yes. DiscordChatExporter is a well-known open-source tool maintained on GitHub with thousands of stars and a large community. It only reads your messages using your own token and does not send data to any third-party server. As with any tool, keep your token private and only use it on trusted devices.
Can I export deleted messages?
No, DiscordChatExporter can only export messages that are currently visible in the channel or DM. Messages that have been deleted by you, the other person, or a moderator are no longer accessible and will not appear in the export.
Does it export attachments and images?
DiscordChatExporter can optionally download media files (images, videos, attachments) alongside the JSON export. In JSON-only mode, the export contains references (URLs) to attachments rather than the files themselves. ChatPeek reads the message content and metadata from the JSON.
Can I export bot messages?
Yes, bot messages are included in the export just like regular messages. ChatPeek will flag bot messages separately so you can easily distinguish them from human messages in your analysis.