When you export your Mastodon data, the archive contains files in ActivityPub JSON format. These files store your posts, follower lists, and account metadata in a structured way that machines can read. Many business users find the raw JSON confusing because it uses nested objects and unfamiliar property names like @context and actor. This article explains the structure of Mastodon export JSON files, shows you how to open and interpret each section, and gives you practical tips for finding specific data fields.
Key Takeaways: Understanding Mastodon ActivityPub JSON Exports
- Export page in Mastodon settings: Generates a ZIP archive containing JSON files for posts, followers, and account data.
- ActivityPub JSON structure: Uses
@contextfor schema definition,typefor object classification, andobjectfor nested content. - JSON viewer browser extension: Formats raw JSON with collapsible sections and syntax highlighting for easier reading.
What Is ActivityPub JSON in Mastodon Exports
Mastodon exports your data as a ZIP file that contains several JSON files. Each file follows the ActivityPub protocol, a W3C standard for decentralized social networking. The JSON files use a specific schema defined by ActivityPub, which includes properties like @context, type, actor, object, and published. The @context field points to the ActivityPub vocabulary, telling any parser how to interpret the data. The type field identifies whether the JSON object is a Note for a post, a Person for a user, or a Follow for a follower relationship.
The export archive contains separate JSON files for different data categories:
- outbox.json — Contains all your public posts. Each entry is an ActivityPub
Createactivity with an embeddedNoteobject. - following.json — Lists the accounts you follow. Each entry is a
Followactivity pointing to the target actor. - followers.json — Lists the accounts that follow you. Each entry is a
Followactivity from the follower actor. - likes.json — Contains your likes or favorites. Each entry is a
Likeactivity with the target object. - actor.json — Stores your own account profile data, including display name, summary, and icon URL.
Each JSON file is an array of ActivityPub objects. You can open any file in a text editor, but a JSON viewer makes the nested structure much easier to navigate.
How to Open and Read Mastodon Export JSON Files
Before you can read the JSON, you need to extract the export archive and choose a viewer. Follow these steps to access and interpret your Mastodon export data.
- Request your Mastodon export archive
Log in to your Mastodon instance. Go to Preferences > Import and Export > Export. Click the button labeled “Export your data.” Mastodon generates a ZIP file and offers it for download. Save the file to your computer. - Extract the ZIP archive
Right-click the downloaded ZIP file and select Extract All on Windows or use the Archive Utility on macOS. The extraction creates a folder named after your Mastodon account handle. Inside you will see the JSON files listed above. - Open a JSON file with a text editor or JSON viewer
Right-click any JSON file, choose Open With, and select a plain text editor such as Notepad on Windows or TextEdit on macOS. For a better experience, install a JSON viewer browser extension like JSON Viewer or JSON Formatter. Then drag the JSON file into your browser to see collapsible sections and color-coded syntax. - Identify the top-level array and objects
Each JSON file starts with an opening square bracket[and ends with a closing square bracket]. This means the file contains an array of objects. Each object is enclosed in curly braces{}and represents one ActivityPub activity. - Read the
typefield to understand what the object represents
Inside each object, locate thetypeproperty. For outbox.json, common types areCreateandAnnounce. For following.json and followers.json, the type isFollow. For likes.json, the type isLike. Thetypetells you what action the activity represents. - Find the
objectfield for the actual content
In outbox.json, eachCreateactivity contains anobjectfield. The value ofobjectis another JSON object with typeNote. Inside theNoteobject, look forcontentto see the post text,publishedfor the timestamp, andattachmentfor media files. - Locate the
actorfield to see who performed the action
Every activity has anactorproperty. The value is a URL pointing to the ActivityPub actor profile. For your own posts, the actor URL is your Mastodon profile URL. For followers, the actor URL is the follower profile URL. - Check the
publishedfield for timestamps
Activities and Note objects include apublishedfield with an ISO 8601 date string, such as2025-03-15T14:30:00Z. This tells you when the action occurred or when the post was created.
Common Issues When Reading Mastodon Export JSON
JSON file appears as a single line of text
When you open a JSON file in a basic text editor, the entire content may display as one long line. This happens because the export removes whitespace to reduce file size. Use a JSON viewer or a code editor like Visual Studio Code to automatically format the JSON with line breaks and indentation. In Visual Studio Code, press Shift+Alt+F to format the document.
Cannot find the post content in outbox.json
If you see a Create activity but the object field shows a URL instead of a nested object, the post content is not included in the export. Mastodon exports only the metadata and the URL reference for some older posts. To see the full content, open the URL in a browser. This limitation applies to posts that were created before the export feature was fully implemented on your instance.
Follower list shows URLs instead of display names
The followers.json file stores each follower as a Follow activity. The actor field contains the follower profile URL, not the display name. To get the display name, you must fetch the actor JSON from that URL. Mastodon exports do not include the full actor profile for each follower due to privacy and data size constraints.
JSON file fails to open or shows garbled characters
If the JSON file contains non-ASCII characters from posts in other languages, a plain text editor might display garbled text. Open the file with a UTF-8 compatible editor such as Notepad++ on Windows or BBEdit on macOS. In Notepad++, go to Encoding and select Encode in UTF-8 to display special characters correctly.
| Item | outbox.json | following.json |
|---|---|---|
| Top-level structure | Array of Activity objects | Array of Follow activities |
| Primary type value | Create, Announce, Like | Follow |
| Content location | object.content |
object is the target actor URL |
| Timestamp field | published on the Note |
published on the Follow activity |
| Media attachments | object.attachment |
Not applicable |
You can now open any Mastodon export JSON file and locate the key fields for posts, followers, and account data. Use a JSON viewer browser extension to collapse large arrays and focus on specific activities. For advanced analysis, try importing the JSON into a spreadsheet tool like Microsoft Excel using Power Query, which can parse nested JSON columns into rows.