Export a Discord chat with DiscordChatExporter
Discord's official data package only contains your own messages. DiscordChatExporter (DCE) is a free, open-source tool that can export everyone's messages in a channel or DM to a JSON file you can upload to Chat Recap.
Last updated: 2026-12-04
Read this first: the token and Discord's rules. DCE needs a Discord token to read messages. Using your personal (user) account token this way is against Discord's Terms of Service and can get your account banned. Discord states: "Automating normal user accounts (generally called "self-bots") outside of the OAuth2/bot API is forbidden, and can result in an account termination if found." DCE's own documentation says the same. Chat Recap will never ask you for a token, and we do not explain how to extract a user token. Never paste your token into any website, including this one. If you want a risk-free route, use the official data package (your own messages only).
DCE is a third-party project, not made by Discord or by us. It is open source (MIT). At the time of writing its status is "maintenance" and the latest release is 2.48. See the project page.
Step 1: Decide how to authenticate
- Bot token (compliant, but limited). Works only in servers where you can add a bot to the server, and only for channels that bot can see. It cannot export personal DMs or group DMs. See "The bot-token route" below.
- User token (against Discord's Terms of Service). The only way DCE can read your DMs. We do not recommend it and do not show how to get one. If you decide to do it anyway, that is your own risk; read DCE's own page first: Token and IDs.
- Neither? Use the official data package. It only has your own messages, but it is allowed and safe.
The bot-token route
This follows the "How to export with a bot token" section of DCE's token documentation. Check that page if Discord's screens have changed.
- Go to the Discord Developer Portal and click New Application.
- Invite the bot to your server using
https://discord.com/oauth2/authorize?scope=bot&permissions=66560&client_id=YOUR_APP_ID, replacingYOUR_APP_IDwith your application's ID. (The permissions value 66560 is View Channels plus Read Message History.) You need permission to add bots to that server. - Open the Bot tab, find Privileged Gateway Intents, and enable Message Content Intent. Without it DCE stops with "Provided bot account is missing the MESSAGE_CONTENT privileged intent."
- On the Bot tab, use Reset Token and copy the bot token. It is shown only once. Keep it secret: anyone who has it controls your bot.
Step 2: Download DiscordChatExporter
Always download from the official GitHub releases page. You do not need to install .NET: the release builds include what they need.
GUI (desktop app, easiest on Windows)
- Download
DiscordChatExporter.win-x64.zip(most Windows PCs). UseDiscordChatExporter.win-arm64.zipon an ARM PC, orDiscordChatExporter.win-x86.zipon a 32-bit PC. - The same GUI is also published for other systems:
DiscordChatExporter.osx-arm64.zip(Apple Silicon Mac),DiscordChatExporter.osx-x64.zip(Intel Mac),DiscordChatExporter.linux-x64.zipand otherlinux-*files. On macOS an unsigned app may be blocked at first launch; DCE explains what to do in Using the GUI. We recommend the CLI on macOS and Linux. - Extract the zip, then run
DiscordChatExporter.exe.
CLI (macOS, Linux, Windows)
- Download the file that matches your system:
DiscordChatExporter.Cli.osx-arm64.zip(Apple Silicon Mac),DiscordChatExporter.Cli.osx-x64.zip(Intel Mac),DiscordChatExporter.Cli.linux-x64.zip(most Linux PCs and servers),DiscordChatExporter.Cli.linux-arm64.zip, orDiscordChatExporter.Cli.win-x64.zip. Other variants are on the releases page. - Extract it into a folder and open a terminal in that folder.
- Full CLI reference: Using the CLI.
Docker (CLI only)
- Pull the official image:
docker pull tyrrrz/discordchatexporter:stable. Thestabletag is the latest release; avoidlatest, which follows every commit. - More in Docker.
Step 3a: Export with the GUI
- Start DCE. In the box at the top, enter your token and press Enter (or click the arrow). Where to get a token: see DCE's token page and the warning above. In the settings, turn Persist token off on a shared computer.
- Your DMs and servers appear on the left. Pick the DM or channel you want (hold Ctrl or Shift to select several, or double-click to export directly), then click the export button.
- In the export dialog set Export format to JSON.
- Optional: set a date range with the after and before fields. The time defaults to 00:00, so the end day itself is not included; pick the day after if you want it.
- Leave the partition limit empty and leave Download assets off. We only need the text.
- Choose where to save and click Export. When it is done, find the
.jsonfile in the output folder.
Step 3b: Export with the CLI
Replace TOKEN with your bot token and CHANNEL_ID with the channel's ID. On Windows cmd, drop the leading ./.
./DiscordChatExporter.Cli export -t "TOKEN" -c CHANNEL_ID -f Json -o "chat.json"- Use `-f Json`. The default format is HTML, which we cannot read.
- Channel ID: in Discord open Settings, Advanced and switch on Developer Mode, then right-click the channel and choose Copy Channel ID.
- For a DM, the channel ID is not the person's user ID. If you choose to export DMs, the CLI command
dmlists your DM channels with their IDs, or use the GUI, which lists DMs by name. - Date range (optional): add
--after 2026-01-01and/or--before 2026-12-01. A date or a message ID both work. - Do not use
-p/--partition, and do not add--media: we only need one text file. - The token can also be supplied through the
DISCORD_TOKENenvironment variable instead of-t.
Docker version
docker run --rm -v "$PWD:/out" tyrrrz/discordchatexporter:stable export -t TOKEN -c CHANNEL_ID -f JsonThe container runs as user 1000 (add --user $(id -u):$(id -g) if you get permission errors), and on SELinux systems the volume needs :z. See Docker.
Step 4: Upload the .json to Chat Recap
- You should have one
.jsonfile (DCE names it likeGuild - Channel [id].json). The name does not matter. - Drop that .json file onto the Chat Recap upload area. Only the JSON is needed, not any media folder. It is read in your browser and never uploaded.
- If DCE split the export into several parts, re-export without partitioning so you have a single file.
Troubleshooting
- Empty or stopped export with a bot: enable Message Content Intent (see the bot route above) and make sure the bot can see the channel.
- The export is HTML, not JSON: you did not choose the format. Re-run with
-f Json, or pick JSON in the GUI. - More help: DCE Troubleshooting and Getting started.