# TootRedate > The media files in a Mastodon archive sit in numbered media_attachments folders with random names and no date. TootRedate reads outbox.json, matches each attachment to its file and writes the post date into each JPEG (EXIF) and MP4, and as the file date. Runs in your browser, nothing uploaded. Free for 25 files, $9 once for all. URL: https://tootredate.utilpop.com/ Guide: https://tootredate.utilpop.com/mastodon-archive-photo-dates Price: free for 25 files per run; $9 USD one-time for every file. ## Facts - Input: a Mastodon archive ("Request your archive") as .zip or .tar.gz, or the extracted folder. Needs outbox.json and media_attachments/. - Match: each attachment url in outbox.json to the file at the same media_attachments/ path. - Writes: the post published date (UTC). JPEG: EXIF DateTimeOriginal, DateTime, OffsetTimeOriginal. MP4: mvhd/tkhd/mdhd creation time. Other types: file date and name only. - It is the publication date, not the capture date. Files that already carry a date inside are left untouched. - Output: one ZIP, a folder per year, names like 2023-05-14_101500_original-name.jpg, unmatched/ folder, manifest.csv (file, date, post URL, alt text, status). - Runs in the browser; nothing is uploaded. Originals are not changed. - Tested on an archive from a test instance and a trimmed sample of a real account; both small. ## FAQ ### Why do the photos and videos in my Mastodon archive have no date? The archive keeps them under media_attachments/files/ in numbered folders, with random file names. Nothing in the name says when a file was posted, so photo apps file them under the day you extracted the archive. The date is in outbox.json, in the post each file was attached to. TootRedate joins the two. ### How does it know which post a file belongs to? By path, not by guessing. Each post in outbox.json lists its attachments with a url that ends in the same media_attachments/… path the file has inside the archive. TootRedate matches that path and takes the post’s published date. ### Which date does it write? Is it the date the photo was taken? No. It is the date the post was PUBLISHED, in UTC, as outbox.json gives it. It is not the capture date: the archive does not list one. If a JPEG already has an EXIF date inside, or an MP4 already has a creation date, the file is left byte for byte as it is and only renamed. ### Which file types get the date inside the file? JPEG (EXIF DateTimeOriginal, DateTime and OffsetTimeOriginal +00:00) and MP4 (creation time in mvhd, tkhd and mdhd). PNG, GIF, WebP and anything else are not rewritten: they get the dated file name and the file date in the new ZIP only. ### Does it take the .zip or the .tar.gz archive? Both, and also the extracted folder. Add the archive file exactly as your server gave it to you. ### What is in manifest.csv? One row per file: original path, new file name, date written, post date, post URL, alt text if the post had one, what was written, and a status. ### What about files no post points to? They are copied unchanged into a folder named unmatched and listed in manifest.csv. Attachments listed in outbox.json whose file is missing are listed too. ### How was it tested? Against an archive from a test Mastodon instance and a trimmed sample of a real account’s archive, both small. If your archive is laid out differently, the tool says so instead of guessing; write to support@cedanolabs.org. ### Is anything uploaded? No. The files are read and the new ZIP is built by JavaScript on this page, on your device. There is no Mastodon login. The only requests are for the page, cookieless page analytics, and the payment check if you buy, which sends a payment ID and never a file. ### Do I need Python or ExifTool? No. Nothing is installed. It runs in a current browser. The new ZIP is built in memory and holds up to 4 GB and 65,535 files; a .tar.gz archive is unpacked in memory, so for a very large one extract it and choose the folder. ### Does it change my original archive? No. The archive is only read. You get a new ZIP: a folder per year, files named like 2023-05-14_101500_original-name.jpg, each with its file date set. ### How does the $9 full version work? Free processes 25 files per run and shows the full report. The full version is a single $9 payment, no subscription, no account, and processes every file. It unlocks in the browser you pay from.