Self-hosted service
Tyrrrz/DiscordChatExporter avatar
Tyrrrz/DiscordChatExporter

DiscordChatExporter: exporting Discord history to HTML, TXT, CSV and JSON

Saves Discord chat logs to a file

12,103 stars1,028 forksC#MIT

At a glance

What is it?
DiscordChatExporter is a cross-platform GUI and CLI tool that writes Discord channel history to self-contained files. It is a solid fit for one-off archival and audit work, but its own README warns that automating a user account breaks Discord's terms of service.
Who is it for?
Adopt DiscordChatExporter when you need a portable archive of a channel you can legitimately read, and prefer a bot token for server channels because the README states that automating user accounts is against Discord's terms of service and may get the account banned.
Can I use it commercially?
Yes. MIT is a permissive licence: you can use, modify and sell software built on it, as long as you keep its copyright and licence notices.
Is it still maintained?
Yes. The repository last received commits 28 days ago.
What is it written in?
Mainly C#, according to GitHub's language statistics.

Answers come from the project's GitHub data, last synced on September 29, 2026, and from our analysis. They are not legal advice.

Editorial analysis

What DiscordChatExporter is for, and who actually needs it

The problem is that Discord keeps history and you do not. Messages live behind an account, a channel permission check and a client that is not built for reading years of text. DiscordChatExporter takes that history and writes it to a file you own. The README describes it as an application that exports message history from any Discord channel to a file, covering direct messages, group messages and server channels, with support for Discord's markdown dialect, attachments, embeds and emoji.

The audience is narrower than the download count suggests. Community moderators who need to preserve a channel before deleting it, researchers who need a citable transcript, and anyone migrating off a server all fit. So does a person who wants their own direct messages in a format that survives an account loss. It is a poor fit for someone who wants a live dashboard of server activity; the README points to separate projects for that, including Chat Analytics for analyzing chat patterns and DiscordChatExporter-frontend as a viewer for exports.

How the export pipeline works: token, channel, formatter

The repository splits into DiscordChatExporter.Core, DiscordChatExporter.Cli and DiscordChatExporter.Gui, with a Dockerfile and an entrypoint script at the top level. Core holds the Discord API access and the output formatters; the CLI and GUI are two front ends over it. That layout is why the same flags and formats appear in both interfaces.

Authentication is the first gate. The README lists authentication via either a user or a bot token. A bot token only reaches channels where the bot has been invited and granted access; a user token reaches whatever the account can see, which is exactly the path the README warns about. After authentication the tool resolves the target channel, walks its message history, and renders each message through the selected formatter. The README lists HTML (dark and light), TXT, CSV and JSON as output formats, and describes the exports as self-contained and viewable offline, which matters for attachments and embeds that would otherwise be fetched at read time.

The option surface is where the tool earns its place: file partitioning, date ranges and message filtering are all listed as export options. Those four knobs cover most real archival jobs, because a busy channel rarely fits in one file and a legal or research request rarely wants the whole history.

Installing DiscordChatExporter and running a first export

There is no package manager install for the core project. The README directs you to the releases page and tells you to pick the archive matching your interface: `DiscordChatExporter.*.zip` for the graphical app, `DiscordChatExporter.Cli.*.zip` for the command line. Community-maintained packages exist for Scoop, WinGet, AUR and Nix, but the README notes they are published independently and may lag the latest release.

On macOS the GUI needs one extra step before it will launch, because the downloaded app is quarantined:

bash
xattr -rd com.apple.quarantine DiscordChatExporter.app

If you would rather not manage an archive, the CLI ships as a container image. The README gives the pull command:

bash
docker pull tyrrrz/discordchatexporter

Once you have the CLI, a first export needs a token and a channel. The README does not print a full command line in the excerpt available here, so treat the binary's own help output as the source for exact flag names before you script anything. The shape of the job is: authenticate with a bot token, name the channel, choose a format, and write to a path. The README's warning applies from the first run, and it is explicit: automating user accounts is against Discord's terms of service and may result in a ban, and where possible you should use a bot to export chat logs from accessible channels. For a server channel, that means creating a bot, inviting it, granting it read access, and exporting only what it can see.

The ban risk, the missing scheduler and other limits

The most important limitation is stated by the project itself. A user token export can get the account banned. This is not a hypothetical edge case buried in an issue tracker; it is a warning block in the README, and it reframes the tool. If your archive depends on a personal account, you are accepting account risk for it. A bot token removes that risk but also removes reach: the bot sees only channels it was invited to.

The second limit is operational. Nothing in the README describes a scheduler, a state file that tracks how far the last export went, or an incremental mode. Date ranges and message filtering let you approximate an incremental run by hand, but you are the one choosing the window and remembering what you already wrote. There is no documented rollback either, so a bad run means re-exporting rather than undoing.

The third is packaging. Because the core project distributes through release archives, keeping a fleet of machines on the same version is manual work unless you use Docker. The README's own note that community packages may not be up to date with the latest release is a fair description of the trade-off: convenience now, version drift later.

Finally, the project's own status badge reads maintenance. Combined with a last push on 2026-09-01 and a 2.48 release on 2026-08-27, that points to a tool that is kept working rather than one being reshaped. Plan for stability, not for new export formats arriving on request.

DiscordChatExporter versus a bot that logs to a database

The obvious alternative is not another exporter but a different architecture: run a bot that listens to gateway events and appends every message to a database as it arrives. The difference is when the data is captured. DiscordChatExporter reads history after the fact, so it can export a channel that existed long before you cared about it. A logging bot only sees what happens after it joins, and it needs to stay online to be useful. If your need is a channel that is about to be deleted, or a server you are leaving, the exporter is the only one of the two that can help.

The reverse case is just as clear. If you want searchable, queryable, always-current records across hundreds of channels, a database-backed logger is the better shape, and DiscordChatExporter becomes a backfill tool you run once. The README also names two projects built on top of its output, Chat Analytics and DiscordChatExporter-frontend, which suggests the intended pattern: export to files, then analyze or browse them with something else rather than extending the exporter itself.

Maintenance, upgrades and the MIT licence

The repository is not archived, and the last push was on 2026-09-01. Releases have been reasonably regular through 2026: 2.47.2 on 2026-06-04, 2.47.3 on 2026-06-26, and 2.48 on 2026-08-27. The status badge in the README reads maintenance, which is the honest label for that cadence. Expect fixes and format maintenance rather than a changing feature set.

Upgrade cost is low if you use the release archives: replace the folder and you are done, though you should re-check the macOS quarantine step after each download. Docker users get a version tag pull. Users on Scoop, WinGet, AUR or Nix inherit whatever the community maintainer has published, and the README explicitly warns that this may lag the latest release, so pin and verify rather than assume.

The project is MIT licensed, which is permissive and places few obligations on how you use or redistribute the tool. Note that the README's terms of use section asks for agreement with statements about Russia's invasion of Ukraine; that is a request attached to the project, not a licence term, and it does not change what the MIT licence permits. This is a description of the repository, not legal advice; read License.txt and the terms page yourself if the distinction matters to your organization.

Editorial conclusion

Adopt DiscordChatExporter when you need a portable archive of a channel you can legitimately read, and prefer a bot token for server channels because the README states that automating user accounts is against Discord's terms of service and may get the account banned. Do not adopt it as a continuous, unattended mirror of every channel you can reach: the README documents no scheduler, no incremental state file and no rollback, and it describes the project as being at maintenance status. Before committing, run a single channel export with a bot token, confirm the output format opens offline, and check whether the community packages you rely on are current with 2.48.

Frequently asked questions

How does DiscordChatExporter work?

It authenticates to Discord with either a user or a bot token, reads the message history of a direct message, group message or server channel, and renders it through one of its output formatters. The README lists HTML (dark and light), TXT, CSV and JSON, and describes the results as self-contained exports that can be viewed offline.

Is DiscordChatExporter safe to use?

The README states that while the tool allows it, automating user accounts is against Discord's terms of service and may result in a ban, and that you should use a bot to export chat logs from accessible channels where possible. A bot token only reaches channels the bot has been invited to, which is the safer path.

How can I export my Discord chat history?

Download the GUI or CLI archive from the releases page, or pull the Docker image for the CLI, then authenticate with a token and export the target channel to one of the supported formats. The README warns to prefer a bot token for channels it can access.

How do I install DiscordChatExporter?

The README points to the releases page, where you pick DiscordChatExporter.*.zip for the GUI or DiscordChatExporter.Cli.*.zip for the CLI. The CLI is also available as the Docker image tyrrrz/discordchatexporter, and community-maintained packages exist for Scoop, WinGet, AUR and Nix, though the README notes those may not always be up to date with the latest release.

How do I use DiscordChatExporter on macOS?

Download the archive for your interface, and for the GUI version remove the quarantine attribute first with xattr -rd com.apple.quarantine DiscordChatExporter.app, as the README instructs. The CLI also runs from the Docker image if you prefer not to manage the app bundle.

Official sources

  1. License: MIT
  2. Project website
  3. README
  4. Releases
  5. Tyrrrz/DiscordChatExporter on GitHub
Add this badge to your README

If you maintain this project, the badge below links readers to this analysis and shows its maintenance status from the daily GitHub snapshot. Paste the markdown into your README; add ?metric=license or ?metric=stars to the image URL for a different field.

Add this badge to your README

markdown
[![Hysen Labs](https://hysenlabs.com/badge/tyrrrz-discordchatexporter.svg)](https://hysenlabs.com/projects/tyrrrz-discordchatexporter)