# How do I convert my X archive to CSV or JSON?

> Open your archive ZIP in TweetArchive and use Export: posts become a CSV (ID, UTC date, type, text with expanded links, reply info, thread root, likes, reposts, media files) or clean JSON, and DMs export the same way. It all runs in your browser, and IDs are kept as text so spreadsheets don’t round them.

## Step by step

1. **Open the archive ZIP.** TweetArchive parses tweets.js (all parts) and the DM files.
2. **Go to Export.** Pick Posts CSV/JSON or Messages CSV/JSON.
3. **Open in a spreadsheet.** The CSV is UTF-8 with a BOM, so Excel shows emoji and accents correctly.
4. **Unlock Pro for the full file.** The free preview exports a 25-post sample.

Open the tool: https://tweetarchive.fyi/#app (runs in your browser; the ZIP is not uploaded; free preview, $19 one-time for everything).

## Honest limitations

- There is no official public specification of the archive format that we could read; TweetArchive follows what several independent parsers document and discovers file names instead of assuming one layout.
- Some archives omit @usernames for DM partners; those people appear as a numeric user ID.
- TweetArchive is not affiliated with X Corp. and does not log in to X for you.
- Spreadsheets may still convert long IDs to numbers if you re-save; import the ID column as text.

## FAQ

### Will t.co links be expanded?

Yes, when the archive includes the expanded URL for the link.

### Are threads marked?

Yes, each post has a type (post, reply, repost, thread_start, thread_reply) and a thread root ID.

### Can I export DMs too?

Yes, with conversation ID, message ID, sender, UTC time, and text.

### Is SQLite export available?

Not yet. CSV and JSON are available today.

## Related

- [How to download your official X archive](https://tweetarchive.fyi/download-x-archive.md)
- [Privacy](https://tweetarchive.fyi/privacy/)

## Sources

- [The Verge: How to download an archive of your Twitter data (updated Nov 14, 2022)](https://www.theverge.com/23453703/twitter-archive-download-how-to-tweets)
- [Ars Technica: How to download a backup copy of your Twitter data (Oct 28, 2022)](https://arstechnica.com/information-technology/2022/10/how-to-download-a-backup-copy-of-your-twitter-data-or-deactivate-your-account/)
- [twitter-archive-parser by Tim Hutton (GitHub)](https://github.com/timhutton/twitter-archive-parser)
- [alkihis/twitter-archive-reader: file structures](https://github.com/alkihis/twitter-archive-reader)

TweetArchive is an independent tool made by Cedano Labs LLC. It is not affiliated with, endorsed by, or sponsored by X Corp. “X” and “Twitter” are trademarks of X Corp., used here only to describe the archive format the tool reads. TweetArchive is not a forensic lab or a legal service, and its exports are not certified evidence.
