When you block a large number of accounts on Mastodon, your blocks list can span multiple pages. The built-in export tool in Mastodon only exports the first page of your blocks list by default. This means you may lose entries if you try to migrate your blocks to another instance or create a backup. This article explains how to export your full Mastodon blocks list, including all pages, using your browser’s developer tools. You will learn the exact steps to capture every blocked account without missing any entries.
Key Takeaways: Exporting Blocks List with Pagination
- Preferences > Import and Export > Export > blocks.csv: This default export only includes the first page of your blocks list.
- Browser Developer Tools (F12) > Network tab: Use this to capture the full API response for your blocks list.
- API endpoint /api/v1/blocks?limit=80&max_id=: This endpoint returns up to 80 blocked accounts per page. You must loop through pages to get all entries.
Why Mastodon Blocks List Exports Only Show One Page
Mastodon uses pagination for all lists that can contain many items. The blocks list is no exception. When you use the standard export tool at Preferences > Import and Export > Export, Mastodon generates a CSV file. That CSV file contains only the first 80 blocked accounts by default. The export tool does not automatically page through the entire list. This is a limitation of the current Mastodon user interface, not a bug.
The API endpoint that serves the blocks list is /api/v1/blocks. By default, it returns 40 items per page. You can increase this to a maximum of 80 items per page using the limit parameter. To get the next page, you must send the max_id parameter, which is the ID of the last account on the current page. The standard export tool does not handle this pagination logic. To export all blocked accounts, you must either write a script that loops through the pages or manually capture each page using your browser’s developer tools.
Steps to Export Your Full Mastodon Blocks List
The method below uses the browser’s developer tools to capture the raw API response for each page of your blocks list. This approach works on any Mastodon instance and does not require any additional software. You will need a text editor to combine the results into a single CSV file.
- Open your Mastodon blocks page in your browser
Navigate to Preferences > Moderation > Blocks. This page shows your blocked accounts. Scroll to the bottom of the page to see the pagination buttons. - Open Developer Tools and switch to the Network tab
Press F12 on Windows or Cmd+Option+I on Mac. Click the Network tab. Check the box that says “Preserve log” so the log stays even after page reloads. - Reload the blocks page
Press F5 to reload the page. In the Network tab, you will see many requests. Look for a request that containsapi/v1/blocksin its name. Click that request. - View the Response tab of the API request
In the right panel, click the Response tab. You will see a JSON array of blocked accounts. Each object contains theid,acct, anddisplay_namefields. Copy the entire JSON response and paste it into a text editor. Save this asblocks_page1.json. - Find the max_id for the next page
In the same API request, click the Headers tab. Look for the Request URL. It will look likehttps://yourinstance.social/api/v1/blocks?limit=80. If the response includes aLinkheader, look for themax_idparameter in that header. If no Link header exists, find the lastidvalue in the JSON response you copied. That ID is yourmax_idfor the next page. - Construct the URL for the next page
In a new browser tab, type the following URL, replacingyourinstance.socialandmax_id_valuewith your instance domain and the max_id you found:https://yourinstance.social/api/v1/blocks?limit=80&max_id=max_id_value. Press Enter. - Capture the next page response
The browser will display the raw JSON response for the next page. Copy that JSON and save it asblocks_page2.json. Repeat steps 5 through 7 until the API returns an empty array[]. That means you have reached the last page. - Combine all JSON files into one CSV
Open each JSON file. Each file contains an array of objects. Extract theacctfield from each object. In Mastodon, theacctfield is the account handle (for example,@user@instance.social). Create a single CSV file with a header rowaccountand one row per blocked account. Save the file asfull_blocks.csv. - Import the CSV into another Mastodon instance
On your new instance, go to Preferences > Import and Export > Import. Under “Import type”, select “Blocking”. Upload yourfull_blocks.csvfile. Click Upload. Mastodon will process the import and block all accounts in the list.
What to Avoid When Exporting Blocks with Pagination
Using the Default Export Tool for Large Block Lists
The default export tool at Preferences > Import and Export > Export > blocks.csv only exports the first 80 entries. If you have more than 80 blocked accounts, this file is incomplete. Do not rely on this export for full backups or migrations. Always verify the number of rows in the CSV against the number shown on your blocks page.
Manually Copying from the Web Interface
Copying account names one by one from the blocks page is error-prone and time-consuming. The web interface only shows 40 accounts per page by default. If you have hundreds of blocked accounts, manual copying will take too long and you may miss entries. Use the API method described above instead.
Not Checking the Link Header
Some Mastodon instances include a Link header in the API response that contains the URL for the next page. If you ignore this header and manually guess the max_id, you might skip pages. Always check the Headers tab in Developer Tools for the Link header first. If it exists, use the max_id from that header instead of the last ID in the response.
Importing Duplicate Entries
If you accidentally export the same page twice, your CSV will contain duplicate account handles. Mastodon handles duplicates during import by skipping them, but it wastes processing time. Remove duplicates before importing. You can do this in a spreadsheet by selecting the account column and using the Remove Duplicates feature.
Manual Pagination vs Automated Script: Export Methods Compared
| Item | Manual Pagination (Browser DevTools) | Automated Script (Python, curl) |
|---|---|---|
| Setup time | No installation needed, works in any browser | Requires Python or curl installed and configured |
| Effort for 100+ blocks | Repeating steps for each page, 5-10 minutes | One-time script run, under 1 minute |
| Error risk | Higher if you miss a page or copy wrong data | Lower if script handles pagination correctly |
| Access token needed | No, uses your existing browser session | Yes, requires creating a Mastodon API access token |
This article explained how to export your full Mastodon blocks list using manual pagination with browser developer tools. You now know how to capture each page of the API response and combine the results into a complete CSV file. For users with more than 500 blocked accounts, consider writing a small script that uses the Mastodon API with an access token to automate the process. The key detail to remember is that the max_id parameter controls pagination and the default export only gives you the first 80 entries.