Mastodon does not have a built-in button to export a single conversation thread as a text file or PDF. When you need to save a specific discussion for offline reading, records, or sharing outside the fediverse, the standard account data export includes all posts, not just one thread. This article explains the manual methods to capture and preserve a single Mastodon thread using browser features, text tools, and third-party services. You will learn the exact steps to export a thread in plain text, HTML, or PDF format without losing the structure of replies.
Key Takeaways: Exporting a Mastodon Conversation Thread
- Print to PDF via browser: Use Ctrl+P in Chrome or Firefox to save the thread page as a PDF file with all visible replies.
- Copy text with thread context: Select all text on the thread page and paste into a document editor to preserve the conversation order.
- Use the Mastodon API for JSON export: Access the thread JSON data through the API endpoint for a machine-readable archive.
Why Mastodon Does Not Offer a Single-Thread Export
Mastodon’s data export feature, located in Preferences > Import and Export > Request your archive, generates a CSV file containing every toot and direct message from your account. This bulk export is designed for account migration or full data backup, not for isolating a single conversation. The platform treats threads as a series of interconnected statuses stored across the federated network. Because a thread can include replies from users on different instances, Mastodon cannot guarantee a complete local copy of the entire conversation tree without fetching data from multiple servers.
The public thread page you see in your browser is assembled in real time by the Mastodon web client. It requests each status and its replies from the instance’s API. This means the thread exists as a dynamic view, not a static file you can download. To export a single thread, you must capture that assembled view using tools your browser already provides or by calling the API directly.
What a Thread Export Contains
A thread export should include the original post, all visible replies in chronological order, usernames of participants, timestamps, and the instance of each user. Media attachments such as images or videos cannot be embedded in a plain text export. If you need the media files, you must download them separately by right-clicking each image and selecting Save Image As.
Steps to Export a Mastodon Thread Using Browser Print to PDF
The simplest method to export a single thread is to use the browser’s Print to PDF feature. This preserves the visual layout including usernames, timestamps, and the order of replies. Follow these steps exactly.
- Open the thread in your browser
Navigate to the Mastodon instance where the thread is hosted. Click the original post to view the full conversation. The URL should end with the status ID number, for examplehttps://mastodon.social/@username/109876543210987654. - Expand all replies
Scroll through the thread and click any Show more or Load more links to reveal all replies. Mastodon collapses long threads by default. If you do not expand them, the PDF will only capture the first few responses. - Open the Print dialog
Press Ctrl+P on Windows or Cmd+P on Mac. In the Print dialog, select Save as PDF or Microsoft Print to PDF as the destination printer. - Adjust page settings for readability
Set the layout to Portrait. Under More settings, change Margins to Minimum to fit more content on each page. Disable Headers and footers if you do not want the URL and page number at the top and bottom. - Save the PDF file
Click Save and choose a file name and location. The PDF now contains the entire visible thread as it appeared in the browser window.
Steps to Export a Mastodon Thread as Plain Text
If you need editable text without formatting, copy the thread content and paste it into a document editor. This method works well for archiving the conversation in a lightweight format.
- Open the thread and expand all replies
Same as the PDF method. Ensure every reply is visible before copying. - Select all visible content
Click anywhere on the thread page. Press Ctrl+A to select everything on the page. If your selection includes sidebar elements, you can manually drag to select only the thread area. - Copy and paste into a text editor
Press Ctrl+C, then open Notepad, TextEdit, or any plain text editor. Press Ctrl+V to paste. The text will include usernames, timestamps, and post content. Hyperlinks will appear as plain URLs. - Clean up the text
Remove any extra page elements that were copied, such as navigation menus or user profile cards. Save the file as a .txt document.
Steps to Export a Mastodon Thread Using the API
For users who need a structured JSON file, the Mastodon API provides a direct way to fetch the thread data. This method is best for developers or advanced users who want to process the conversation programmatically.
- Find the status ID of the original post
Look at the thread URL. The status ID is the last segment of the path, for example109876543210987654inhttps://mastodon.social/@username/109876543210987654. - Construct the API URL for the status context
Open a new browser tab and enter the following URL, replacinginstanceandstatus_idwith your values:https://instance/api/v1/statuses/status_id/context. For example:https://mastodon.social/api/v1/statuses/109876543210987654/context. - View the JSON response
The browser displays a JSON object containing two arrays:ancestorsanddescendants. Thedescendantsarray holds all replies in order. You can copy this JSON and save it as a .json file. - Format the JSON for readability
Paste the JSON into a code editor or an online JSON formatter to make it easier to read. Each status object includes the account name, content, created_at timestamp, and media_attachments.
Common Issues When Exporting a Mastodon Thread
PDF Cuts Off Replies After the First Page
If the PDF only contains the first few replies, you likely did not expand all Load more sections before printing. Scroll to the bottom of the thread and click every Show more link. Some instances load replies dynamically as you scroll. Keep scrolling until no more replies appear.
Copied Text Includes Unwanted Page Elements
When using Ctrl+A, the selection may include the Mastodon sidebar, user profile card, and footer. To avoid this, use the browser’s element inspector to select only the thread container. Right-click the first post, select Inspect, find the div with class .thread or .status__wrapper, then right-click that element and choose Copy > Copy element. Paste into a text editor and remove HTML tags using a find-and-replace operation.
API Returns an Empty Descendants Array
The API endpoint /context only returns replies that the instance knows about. If replies come from a remote instance that is not federated with the original instance, they may not appear in the JSON. This is a limitation of Mastodon’s federation model. The browser view may show those replies because it fetches them directly from the remote instance, but the API does not always aggregate them.
Export Methods Comparison: PDF vs Plain Text vs API
| Item | PDF Export | Plain Text Export | API JSON Export |
|---|---|---|---|
| Output format | PDF file with visual layout | Plain text .txt file | Structured JSON file |
| Preserves usernames and timestamps | Yes | Yes | Yes |
| Preserves media attachments | No (only alt text if visible) | No (only image URLs) | Yes (media_attachments array with URLs) |
| Editable after export | Limited (requires PDF editor) | Fully editable | Requires code editor |
| Requires browser | Yes | Yes | Yes |
| Requires API knowledge | No | No | Yes |
You can now export any Mastodon conversation thread using the method that matches your needs. For quick offline reading, use the PDF export with Ctrl+P and expand all replies first. For archival in a lightweight format, copy the thread text into a plain text document. If you need the thread data for analysis or automation, use the API endpoint /api/v1/statuses/{id}/context to retrieve the JSON response. Remember that media files must be downloaded separately by right-clicking each image or video and choosing Save As.