Skip to content

How to Export a Discord Chat to JSON (2026 Guide)

Discord has no export button. Here's how to export any DM or channel to JSON with DiscordChatExporter, the real ToS risks, and how to turn the file into a PDF record you can prepare for filing.

By Sami Ullah· Founder

Discord is the odd one out among major chat platforms: there is no export button anywhere in the app. WhatsApp puts an export option inside every conversation ([here's how that works](/blog/how-to-export-whatsapp-chat)), Telegram builds JSON export into its desktop client, and Meta at least gives you a Download Your Information page. Discord gives you nothing per-chat. If a Discord DM or server channel is evidence in your dispute - harassment, a broken agreement, a payment argument - the only practical way to get it out in a structured, machine-readable form is a third-party tool. This guide walks through the one that actually works, is honest about the account risk involved, and shows how to turn the result into a durable PDF record.

Read this before step one: the token trade-off

Exporting a private DM requires your user token, and automating a user account - which is what DiscordChatExporter technically does - violates Discord's Terms of Service. Discord can suspend or ban accounts for it. This is not a footnote risk; it is the central trade-off of the whole process, so decide with eyes open before step one.

In practice, the risk calculus looks like this. For a one-off export of your own conversation for a personal archive or a legal matter, the practical risk is low - the tool reads messages at a human-ish pace and enforcement has historically focused on spam and self-bots. But 'low' is not 'zero', and Discord's ToS is unambiguous. If the account is critical to you - it runs your community, holds Nitro purchases, or is tied to your business - weigh whether losing it would hurt more than the export helps. If the conversation lives in a server you administer, there is a fully ToS-compliant path using a bot token instead (covered in the alternatives section), but a bot cannot read a private one-to-one DM. For DMs, the user token is the only route, and that is simply the honest state of things.

The file you're aiming for

The target is a single JSON file per conversation, produced by DiscordChatExporter - an open-source tool by Tyrrrz, MIT-licensed; use the current release (check the GitHub releases page for the latest). The file is named something like 'direct-messages - Name [123456789].json' and contains every message with its sender, timestamp, edits, replies, reactions, and attachment references. If you enable media download, an assets folder sits next to it with the actual images and files. That JSON is exactly what wachattopdf.com's Discord importer reads - drop it in at [/upload](/upload) and the raw machine format becomes a readable, paginated record; [how it works](/how-it-works) shows what happens to the file along the way.

One thing this file is not: it is not the same as Discord's official 'Request all of my data' package. That ZIP also contains messages.json files, but they are structured for account-history compliance, arrive after a wait of up to 30 days, and cover your whole account rather than one clean conversation. It has its uses (more on that below), but it is not the file you upload.

Discord chat to a PDF record1Get the toolDiscordChat-Exporter (Tyrrrz)2Copy your tokenbrowser DevTools,Network tab3Export as JSONone DM per file,assets saved4Verify the fileopen once - checksenders + times5Convert itone timelineat /uploadUser-token exports break Discord’s ToS - read the risk section first.

The export, start to finish

Get the tool

  1. Download DiscordChatExporter from the official releases page at github.com/Tyrrrz/DiscordChatExporter/releases. Take the GUI build (the release named DiscordChatExporter.zip), not the .Cli variant - for a one-off legal export, point-and-click beats the terminal. The standard build bundles its own runtime, so you normally do not need to install .NET separately.
  2. Unzip it to a folder you can find again. On Windows, run DiscordChatExporter.exe. On Linux, run the DiscordChatExporter binary. On macOS, the app will refuse to open until you clear the quarantine flag: open Terminal and run 'xattr -cr' on the app first.
  3. Verify you are on the real thing. There are forks and browser extensions calling themselves 'Discord chat exporter' - some are abandoned, some are worse. The canonical repository is github.com/Tyrrrz/DiscordChatExporter and nothing else.

Copy your token (use a browser, not the desktop app)

  1. Open Discord in a web browser and log in. This matters: the reliable token method works in a browser session, and people routinely fail by trying it inside the Electron desktop client.
  2. Open Developer Tools with Ctrl+Shift+I (Cmd+Option+I on macOS), click the Network tab, then reload the page with F5.
  3. Type 'messages' into the request filter box. Click any request that appears, look through its Headers, and find the one named 'authorization:'. Right-click its value and copy it. That string is your user token. (The tool's own Token-and-IDs guide also documents a Console-tab script if the Network route gives you trouble.)

Your token is a password. It grants full access to your account - anyone holding it can read your messages and act as you. Paste it into DiscordChatExporter and nowhere else, never share it, and delete it from any notes file or clipboard manager once the export is done. If you ever suspect it leaked, change your Discord password, which invalidates the token.

Run the export

  1. Launch the DiscordChatExporter GUI, paste the token into the text box at the top, and press Enter. The left side fills with your Direct Messages, and the sidebar lists your servers. If nothing loads, the token was copied incorrectly or belongs to the wrong account - go back and recopy it.
  2. Select the exact conversation you need. Click the specific DM or channel. You can Ctrl- or Shift-click to grab several at once, but for a legal record, resist that: export one conversation per file so each resulting PDF maps cleanly to one relationship. Do not export an entire server when the case turns on one thread.
  3. Click the export button and, in the settings dialog, set Export format to JSON. The dropdown also offers HTML Dark, HTML Light, TXT and CSV - the HTML looks nicer to a human, but wachattopdf.com needs the JSON, and only JSON preserves the full message structure for parsing. Set the Output path to a folder you can find.
  4. Set the evidence options (next section), then click Export and let it run. Long conversations with media can take a while - the tool paces itself deliberately.

The settings that decide whether the export is still usable next year

  • Download assets: turn this ON if images, files, or voice notes are part of your evidence. Without it, attachments exist in the JSON only as Discord CDN links - and those links expire. An export that looks complete today can be full of dead image URLs by the time a hearing happens. Enable 'Reuse assets' alongside it to skip re-downloading duplicates.
  • Date range: if the dispute concerns a specific period, bound the export to it. A scoped export is easier to review, faster to produce, and avoids dragging in months of irrelevant chatter that you would otherwise need to redact.
  • UTC normalization: enable it in settings so every timestamp lands in one consistent zone. Discord users span time zones, and a record with internally inconsistent times is exactly the kind of thing an opposing party picks at.

After the export finishes, open the JSON once in a text editor or browser before doing anything else. Confirm it contains the senders, messages, and timestamps you expect and is not empty or cut off. Thirty seconds of checking now beats discovering a truncated file when it matters.

Mistakes that cost people their evidence

  • Hunting for the token in the desktop app - use a browser session; the Network-tab method is where it reliably works.
  • Exporting a whole server in one file when the case needs one DM - one conversation per file keeps the record clean.
  • Picking HTML because it looks better - HTML, TXT, and CSV will not import correctly; only the JSON will.
  • Uploading messages.json from the official data package - different structure, different purpose, may not parse.
  • Skipping 'Download assets', then finding months later that the incriminating image is a dead CDN link.
  • Leaving the token saved in the app or sitting in a notes file after finishing - it stays live account access until you remove it or change your password.

A desktop-only reality

DiscordChatExporter runs on Windows, macOS, and Linux - it is a desktop tool, full stop. There is no reliable way to do any of this from a phone: no mobile app exposes messages in a usable form, and browser-extension 'exporters' on mobile are a dead end. If your Discord life happens entirely on mobile, you will need to borrow time on a computer; your account and its full history are available from any machine you log into, so nothing is lost by switching devices for the export.

Other routes: bot token, official request, and the CLI

Bot token (ToS-safe, servers only)

If the conversation lives in a server you administer, you can stay entirely inside Discord's rules. Create an application in the Discord Developer Portal, enable the Message Content Intent, copy the bot token, invite the bot to your server, and then use DiscordChatExporter exactly as above with the bot token instead of a user token. This is the clean path when it applies. Its hard limit: a bot can only see channels in servers it has been invited to. It cannot read a private DM between two ordinary users, which is where most disputes live.

The official data request (slow, whole-account, wrong shape)

Settings > Data & Privacy > Request all of my data (tick 'include messages from servers') is the fully compliant route. Be realistic about what it delivers: a whole-account ZIP that can take up to 30 days to arrive, with messages.json files organized for compliance rather than reading. It is a legitimate fallback record and worth requesting in parallel if your timeline allows, but it is not the per-conversation JSON that the importer targets - do not upload files from this package expecting them to parse.

The CLI, for repeat exports

Power users can use DiscordChatExporter.Cli instead of the GUI: 'DiscordChatExporter.Cli exportdm --token <TOKEN> --format Json --media --reuse-media --output <folder>' exports a DM from the terminal, and 'exportchannel' handles server channels. Same output, same ToS caveat with a user token - useful mainly if you need to export many conversations or script the process.

Before you close the laptop: three Discord-specific loose ends

A finished export is not quite a finished job on Discord, because three things in that JSON quietly work against you over time. First, attachments: every image and file reference points at Discord's CDN, and those URLs expire on a rolling basis - if you skipped 'Download assets', re-export with it enabled while the links still resolve, because in a few months they won't. Second, time: the JSON's timestamps are in UTC, and a conversation between people in different time zones reads very differently at '02:14' than at '21:14 the previous evening' - whatever record you build has to present one consistent, explained timeline, not a mix. Third, the token: it is still live account access sitting in the tool and possibly your clipboard history - clear it, and if you want certainty, change your Discord password, which invalidates every issued token.

The first two problems are exactly what converting the JSON promptly is for. Upload it at [/upload](/upload) and wachattopdf.com's Discord importer lays the full message structure out as a paginated PDF on one consistent timeline, with your downloaded attachments preserved in the record rather than left as links that rot - so it holds up better long after the CDN URLs die. Usernames, numbers, and bystander details you would rather not circulate can be stripped with [PII redaction](/blog/pii-redaction-chat-export) before anything is generated, and if you are cautious about where a sensitive export travels, [where your file actually gets processed](/blog/process-whatsapp-export-browser-vs-server) is worth two minutes - the same principles apply to a Discord JSON as to any chat export.

One legal reality check: being able to export a conversation does not automatically make it lawful to use as evidence in your jurisdiction. Consent and recording laws vary, and admissibility is a question for a lawyer, not a software tool. The export gives you a preserved, verifiable record - what you may do with it is a separate question worth asking a professional.

Convert your Discord JSON to a PDF record

Convert Your Chat Free

Frequently Asked Questions

Does Discord have a built-in way to export a chat?
No. Discord has no per-conversation export anywhere in its apps - not on desktop, not on mobile. The only official option is the account-wide 'Request all of my data' package, which takes up to 30 days and is structured for compliance, not for reading one conversation. For a usable per-chat file, the third-party DiscordChatExporter tool is the only practical route.
Can I get banned for using DiscordChatExporter?
It is possible. Exporting a DM requires your user token, and automating a user account violates Discord's Terms of Service, which allows Discord to suspend or ban the account. In practice, one-off personal exports carry low practical risk, but the risk is real and you should weigh it - especially if the account matters to you. Exporting a server channel with a bot token is the ToS-compliant alternative, but bots cannot read private DMs.
Can I export Discord messages from my phone?
No. DiscordChatExporter is a desktop tool for Windows, macOS, and Linux, and there is no reliable mobile export path. Your full message history is available from any computer you log into, so borrow a machine for the export - nothing is tied to your phone.
Can I upload messages.json from Discord's official data package instead?
No - it is a different file in a different shape. The data-request package organizes messages for account-history compliance, split across the whole account, and it is not the per-conversation JSON that wachattopdf.com's Discord importer targets. Upload the JSON produced by DiscordChatExporter instead.
Which DiscordChatExporter format should I choose - JSON or HTML?
JSON. The HTML formats look nicer in a browser, but they cannot be imported. JSON preserves the full message structure - senders, timestamps, edits, replies, attachments - which is what gets parsed into a paginated, Bates-numbered PDF at /upload.
Is a Discord chat export admissible in court?
That depends on your jurisdiction and how the record was made - consent and recording laws vary, and admissibility is ultimately a lawyer's question. What you can control is integrity: a structured export with consistent UTC timestamps, locally saved attachments, a SHA-256 hash of the source file, and a certificate of authenticity is far more defensible than screenshots.

Related Articles