Your Twitter (X) archive: how to download it and what's in it
To download your Twitter archive, open X and go to Settings → Your account → Download an archive of your data. X asks for your password and a code, and emails you when the zip is ready, which can take 24 hours or more.
The zip holds your posts in data/tweets.js, plus your likes, direct messages and media. Below: the steps, what is inside, and a free viewer that reads your tweets.js in your browser.
You see every tweet before we delete it. Nothing goes without your OK.
How to download your Twitter archive
- 1
Open the archive settings
On X, open Settings → Your account → Download an archive of your data.
- 2
Confirm it is you
X asks for your password and sends you a code. Enter both.
- 3
Request the archive
X starts to prepare a zip file with your data.
- 4
Wait for the email
This can take 24 hours or more. X emails you when the zip is ready.
- 5
Download the zip soon
Go back to the same settings page and download it. The download link expires after a few days.
- 6
Unzip it
Open the folder. Your posts are in data/tweets.js.
X can rename menus. If you do not see the option, look for "archive" in the X settings.
Look inside your archive
Pick your tweets.js and see your total posts, posts per year, tweets vs replies vs retweets, your oldest post and your most liked one. It is free. Nothing is uploaded: your browser reads the file.
Pick data/tweets.js from your unzipped archive, or drop it here. Big archives also have tweets-part1.js: pick all the parts together.
Nothing is uploaded. Your browser reads the file on this device.
What is inside the zip
The archive is a folder of files. Most of your data sits in the data folder. These are the parts people use most.
| File or folder | What it holds |
|---|---|
data/tweets.js | Your posts, replies and retweets, with dates and like counts |
tweets-part1.js | More of your posts, in big archives |
data/like.js | The posts you liked |
| Direct messages | Your private chats, in the data folder |
| Media folders | The photos and videos you posted |
X can change file names when it updates the archive.
How long the download link works
The download link expires after a few days. Download the zip soon after the email arrives. If the link is gone, request a new archive on the same settings page.
Keep your archive safe
The zip has more than your posts. Treat it like a private document.
- It contains your direct messages. Anyone with the zip can read them.
- Keep it on your own device or in storage only you can open.
- Do not upload the whole zip to a site. To delete posts, a tool needs only
tweets.js. - Delete old copies you no longer need, also from your downloads folder.
Next step: delete old tweets by date or delete all your tweets.
Questions
How do I download my Twitter archive?
On X, open Settings → Your account → Download an archive of your data. X asks for your password and a code, then prepares the zip. You get an email when it is ready, and you download it from the same page.
How long does the Twitter archive take?
It can take 24 hours or more. X sends you an email when the archive is ready to download.
Where are my tweets in the archive?
In the file data/tweets.js inside the zip. Big archives split it into more files: tweets-part1.js, tweets-part2.js and so on.
Is the archive viewer on this page safe?
Yes. Your browser reads the file on your device. Nothing is uploaded, and the viewer makes no network call. Close the tab and the data is gone from the page.
My download link does not work any more. What now?
The download link expires after a few days. Request a new archive on the same settings page, and download it soon after the email arrives.
Can I delete my tweets with the archive?
Yes. Sign in to erasemyposts with X and upload the same tweets.js in the app. Posts older than your newest 3,200 then show in your list, and you pick what goes. Packs start at $29.
More guides
Got your archive? Clean up your X.
You see every tweet before we delete it. Nothing goes without your OK.