← Back to all guides
Guide

Export Twitter/X Data: Tweets, DMs, Likes & Bookmarks (2026)

Updated Sep 28, 2026

X hands you an archive with real gaps in it. Deleted tweets are not in there. DMs with suspended accounts are not in there. Media gets downscaled. Worth knowing before you treat the download as your record of what happened, and worth doing before you assume X will be there in a few years.

Export at a glance

Request method
In-product settings
Delivery time
Hours to days
Archive format
JSON, ZIP
Sensitivity
Medium: communications, purchase records
Primary use
Backup: preserve a copy for yourself

Archive file map

Top-level structure of the export. Each entry is a file or directory with its format badge and what it contains.

tweets.jsJSON
Your posts and replies, wrapped in a window.YTD.tweets.part0 assignment
likes.jsJSON
Posts you liked, same wrapper format
bookmarks.jsJSON
Posts you saved
direct_messages.jsJSON
DM history, or a direct-messages/ folder per conversation on older accounts
account.jsJSON
Profile and account metadata
lists/JSON
Lists you created or followed
ad-engagement-events.jsJSON
Every ad you interacted with
ad-impressions.jsJSON
Every ad shown to you
personalization.jsJSON
Inferred interests X uses for ad targeting
manifest.jsJSON
Index of everything in the archive

Requesting the archive

  1. Open X in a browser. Settings and privacy > Your account > Download an archive of your data.
  2. Re-enter your password and confirm by email or SMS.
  3. Choose the date range. The full history is the default and the one you want.
  4. Confirm the request.
  5. Wait for the email. Small accounts are often ready in minutes; bigger ones can take days.
  6. Download the ZIP as soon as it arrives.

The feature is unreliable, so do it early

X has had long stretches where the archive request simply never completed. Reports of requests sitting for weeks without a link are common, and the confirmation email itself is unreliable enough that people have been locked out of the flow entirely.

The practical advice is not to schedule this for the week before you might need it. If X is going to be part of your history, take the copy now, while it works, and take another one in six months.

Why the files end in .js

Most of the archive is JavaScript, not JSON. The first line of tweets.js looks something like window.YTD.tweets.part0 = [...], which is a variable assignment wrapping a JSON array.

X does this so you can drop the file into a browser and read it without a parser. It is a reasonable idea and it means your archive is slightly awkward to work with, which is a trade-off you only notice once you need the data.

Turning the .js files into something readable

  1. Open a terminal in the folder with the archive.
  2. Run: sed 's/window.YTD.tweets.part0 = //' tweets.js > tweets.json
  3. Change the variable name to match the file. likes.js is window.YTD.likes.part0, bookmarks.js is window.YTD.bookmarks.part0.
  4. You now have valid JSON. Open it in a text editor, or feed it to jq, or load it in Python.
  5. The archive usually has an index.html as well. Double-clicking that gives you a browsable version without any of this.

What is in the archive

  • tweets.js: your posts and replies
  • likes.js: everything you liked
  • bookmarks.js: everything you saved
  • direct_messages.js, or a direct-messages/ folder of per-conversation files on older accounts
  • account.js: profile and account metadata
  • lists/: lists you made or followed
  • ad-engagement-events.js: ads you interacted with
  • ad-impressions.js: ads you were shown, whether you engaged or not
  • personalization.js: the interests X has inferred about you for ad targeting
  • manifest.js: the index of the whole thing

What it does not include

  • Tweets you deleted before the export. There is no trash and no undo period; the archive is a snapshot of what existed at the moment you asked for it.
  • Likes and bookmarks you removed.
  • DMs with accounts that have since been suspended. Your half of the conversation is still gone.
  • DMs you deleted yourself.
  • Full-resolution media. Images and video in the ZIP are often downscaled, and the originals are not included at any size.
  • Suspended users from your follower and following lists.
  • Your X Premium or Blue billing history. That sits with whoever you paid, which is Apple, Google or a card provider, and it is a separate export entirely.
  • Circles and Communities posts, at least in any consistent way. Coverage of newer features is patchy.

After the download

  • Put it in a folder named for the date, twitter-2026-09.
  • Strip the .js wrappers now, while you remember. Doing it in a year when you need it is a worse afternoon.
  • This archive has your DMs in it. Keep it somewhere encrypted and off-site: ProtonDrive or pCloud.
  • Set a reminder for six months out and do it again.

If you are thinking about deleting your account

Export first, delete second, and wait until the link actually works before you delete anything. TechCrunch covered this while people were leaving X in bulk, and the practical point stands: once the account is gone, the archive cannot be retrieved.

There is no version of the order that is safe to get wrong.

Quick version

If you want the short checklist instead of the full guide, use the service page.

Related guides

FAQ

Does the export include my direct messages?

Yes. They are in direct_messages.js, or in a direct-messages/ folder with one JSON file per conversation on older accounts. DMs with suspended accounts are excluded.

Are deleted tweets in the archive?

No. The archive is a snapshot of what existed when you requested it. Anything you deleted beforehand is not recoverable through this, or through anything else.

How do I convert tweets.js to JSON?

Strip the assignment: sed 's/window.YTD.tweets.part0 = //' tweets.js > tweets.json. Swap the variable name for likes.js and bookmarks.js. Or just open the index.html in the archive, which is readable as-is.

Why are some of my DMs missing?

Either the other account has been suspended, or you deleted the conversation. X keeps DMs server-side until the relevant deletion happens on both ends, so a one-sided delete is not the full story.

Is the media the original quality?

Usually not. The archive carries downscaled versions. Originals are sometimes still reachable from the individual post URL, but they are not in the ZIP.

How long does the archive take?

Minutes on a small account, days on a large one. X publishes no fixed deadline, and if it has not arrived after a few days, re-request rather than wait.

Does downloading delete anything?

No. It makes a copy and changes nothing about your account.

Does the archive include my ad data?

Yes, and more of it than you might want. ad-impressions.js is every ad you were shown, ad-engagement-events.js is every one you clicked or replied to, and personalization.js is the list of interests X built to target you with.

Can I export a single tweet or conversation?

No, the official export is account-wide. For one post, the permalink still works. For one conversation, you would be scrolling and screenshotting, which is not a backup but is what you have.

Can I get my X Premium payment history from this?

No. That is with your payment provider. Apple, Google and card issuers all have their own data exports, and for subscriptions that one is usually the only record.

Last verified: Sep 28, 2026. Steps checked against help.x.com. Report an outdated step →

About the author

Charles runs Digital Takeout Day, a twice-yearly reminder (May 8 and November 8) to download and back up your data from every online service you use.

Every guide is cross-checked against the platform's own export documentation and re-verified before each Takeout Day.

Read the full bio, editorial policy, and contact →