Download your X data archive, step by step
The exact path to request, download and open your X data archive on web, iPhone and Android, what the files inside mean, and how to fix the common problems.
By Karim · Published
Your X data archive is the official export of your account. X is the one that gives it to you, it's free, and it's the most complete copy of your own activity you can get. Whenever someone asks us how to save "everything" from their account, our first answer is always the same: request the archive. A downloader like ours is only useful for filling specific gaps afterwards.
This guide covers the request, the download, what's inside, and what to do when it doesn't go smoothly. X redesigns its settings from time to time, so if a menu name below has changed, look for the closest match. The overall flow has been stable for years.
Before you start
Make sure you have:
- Access to the email address or phone number on the account. X sends a verification code before it lets you request the archive, and it sends the "your archive is ready" message there too.
- Your password. If you signed up with Google or Apple sign-in and never set a password, you may need to set one first via the password reset flow.
- A computer for the download if possible. Archives for active accounts with lots of media can be several gigabytes. Phones can handle it, but browsing and backing up the files is far easier on a laptop or desktop.
- Patience. Preparing the archive isn't instant. X says it can take 24 hours or longer.
Step 1: Open the archive setting
On the web (x.com)
- Click More in the left sidebar (the circle with three dots).
- Choose Settings and privacy.
- Open Your account.
- Click Download an archive of your data.
On iPhone or Android
- Tap your profile picture to open the side menu.
- Tap Settings and privacy → Your account.
- Tap Download an archive of your data.
On mobile, X sometimes opens the page in an in-app browser. That's normal.
Step 2: Verify your identity
X asks you to confirm your password, then sends a code to your email or phone. Enter it on the page. This step matters: the archive includes your direct messages and account details, so X wants to be sure it's you.
If the code doesn't arrive, wait a minute and check spam folders before requesting another. Requesting several codes quickly sometimes delays all of them.
Step 3: Request the archive
Press Request archive. The button changes to show that a request is in progress. You don't need to keep the page open. X prepares the archive in the background and notifies you in the app and by email when it's ready.
Don't make changes like changing your username or deactivating while you wait. Keep the account as it is until you have the file safely downloaded.
Step 4: Download the ZIP
When the notification arrives, go back to the same page (Settings and privacy → Your account → Download an archive of your data). You'll see a Download archive button. You may be asked to verify again.
The download is a ZIP file. Large archives may come in several parts. Two things to know:
- The link doesn't last forever. X makes the archive available for a limited time, so download it soon after you get the email.
- Download over Wi-Fi to a device with room to spare. You'll need space for the ZIP and, later, the unzipped copy.
When the download finishes, check that the file size looks plausible. A ZIP of a few kilobytes for an account with hundreds of videos means something went wrong; try downloading again.
Step 5: Open and understand what's inside
Unzip the file. On Windows, right-click → Extract All. On a Mac, double-click it. On iPhone, tap the ZIP in the Files app and it expands into a folder.
Inside you'll find roughly this structure (exact names can change between versions):
- `Your archive.html`: open this in a browser for a friendly, offline view of your account, with tabs for posts, likes, messages and more. It reads the data files locally; nothing is uploaded.
- `data/`: the raw data. Most files are JavaScript files containing JSON, for example your posts, account details, followers, following, likes, direct messages and ad-related information.
- Media folders inside `data/`: images and videos you attached to posts, plus media from direct messages, each in their own folder (a post media folder usually has a name like
tweets_media). - `assets/`: the code that makes the HTML viewer work.
Making sense of the data files
If you open one of the data files in a text editor, you'll see it starts with something like window.YTD.tweets.part0 = [ followed by a long block of JSON. That prefix is there so the HTML viewer can load the file. If you want to use the data in a spreadsheet or script, delete everything before the first [ and save it as .json. Most JSON tools and spreadsheet importers can handle it from there.
Media filenames usually combine the post id with a media id. That's useful: the post id is the long number at the end of a post URL (x.com/username/status/1234567890…), so you can always match a file back to its post.
Step 6: Store it safely
Your archive contains private information: direct messages, email address, phone number, login history and inferred interests. Treat it like a passport scan:
- Keep the original ZIP untouched in a safe place (encrypted drive or a private cloud folder).
- Don't upload it to shared drives or send it to anyone you wouldn't show your DMs to.
- If you're giving part of it to someone (an editor, a researcher), export only the files they need.
Troubleshooting
The "Request archive" button is greyed out. Usually a request is already in progress, or you requested one recently and X limits how often you can do it. Look for an earlier email. If you never requested one, try another device or browser. Ad blockers and strict privacy extensions sometimes break settings pages.
I never got the code. Confirm the email or phone in Your account → Account information is current. Check spam. If you've lost access to both, you'll need to go through X's account-access help flow before you can request an archive.
The download link says it expired. Request a new archive. There's no way to revive an expired one.
The ZIP won't open or says it's corrupted. The download was probably interrupted. Download it again on a stable connection. On Windows, very long file paths can cause extraction errors; extract to a short path like C:\x-archive.
`Your archive.html` shows a blank page. Make sure you opened it from the fully extracted folder, not from inside the ZIP preview. Keep the data and assets folders next to it, since the viewer needs them.
Some videos are missing or low quality. In our experience the archive doesn't always contain the highest-quality version, and live broadcast replays may not be in it. Our guide to backing up your videos before deleting your account explains how to fill these gaps for your own public posts.
My account is suspended or locked. X's help center has a separate process for requesting data from accounts you can't log into normally. Start from X's privacy or data request forms.
What the archive is good for
- A personal backup before leaving the platform or changing how you use it.
- Checking what X knows about you. The ad and personalization files can be eye-opening, and reviewing them is part of your data-protection rights in many countries.
- Moving your writing elsewhere. Your posts in JSON can be imported into a personal site or blog with some scripting.
- Records for your own work, for example proof of when you first published something. See our guide on archiving posts as evidence for preserving other people's public posts properly.
Responsible use
The archive is yours, but it also contains other people: their messages to you, their replies, their media in your DMs. Being in your archive doesn't make their content yours to publish. If you build something public from your archive, like a website of your old posts, stick to what you wrote and posted, and leave private conversations private.
Step by step on your device
Related guides
- Back up your own X videos before deleting your account
- Archiving X posts as evidence for journalism and research
- iPhone downloads: Files vs Photos, and how to move videos between them