GUIDEWhy Mastodon archive media has no date

The photos and videos in your Mastodon archive, back on the day you posted them.

A Mastodon archive hands you every photo and video in numbered media_attachments/ folders with random file names and no date. The date is in outbox.json. TootRedate matches each attachment to its file and writes the post date into the file itself (EXIF in JPEG, creation date in MP4) and as the file date, right in your browser.

  • Nothing uploaded, no Mastodon login
  • No Python, no ExifTool, no command line
  • Your original archive is not changed

At a glance

What TootRedate does and doesn’t do

  • Works withThe archive from Mastodon’s “Request your archive”: outbox.json and the media_attachments/ folder. The .zip or .tar.gz file as downloaded, or the extracted folder.
  • RestoresThe date each file was posted, read from outbox.json. Written into each JPEG (EXIF DateTimeOriginal) and MP4 (creation time), into the file name, and set as the file date in the new ZIP.
  • Reportmanifest.csv: file, date, post URL, alt text and status for every file.
  • Free25 files per run, with the full report. Full: $9 one-time, every file.
  • PrivacyNothing is uploaded. No Mastodon login. Your posts and media stay on your device.
  • Doesn’tKnow when a photo was taken: it writes the date the post was published, in UTC. A file that already carries a date inside is respected and left untouched. PNG, GIF, WebP and other types get the file date and name only.
Writes the dates read by
  • apps that read EXIF dates
  • MP4/MOV creation time
  • file dates
  • manifest.csv
by path

each file is matched to its post by the attachment path in outbox.json, not by a guess from dates

How the match works
0 bytes

of your posts and media sent to any server

How it works
25

files redated free per run, with the full report of your archive

Try it
$9

once, every file, no subscription

Pricing

The problem

Years of posted photos, with no date on them.

The archive is yours, but the media arrives cut off from the posts it belongs to.

Nothing in the file says when

The files sit in paths like media_attachments/files/109/215/002/…/original/133931bba7cb42da.jpg. Photo apps file them under the day you extracted the archive.

The date is in outbox.json

Each post lists its attachments with the path of the file and a published date. No photo app reads it.

Joining them is a script

The usual advice is ExifTool plus a Python script you write yourself. That works, if you want to write and debug it.

How it works

Three steps. No Python, no ExifTool, no command line.

  1. Step 1

    Request your archive

    In Mastodon: Preferences, Import and export, Request your archive. Guide

  2. Step 2

    Add it here

    The archive file or the extracted folder. TootRedate reads outbox.json and matches each file in media_attachments/ to its post.

  3. Step 3

    Download the redated ZIP

    A folder per year, files named 2023-05-14_101500_original-name.jpg, dates written in, an unmatched/ folder and manifest.csv.

Redate

Open your Mastodon archive

Everything runs on this page. Your posts and media never leave your device.

Drop your Mastodon archive (.zip or .tar.gz) or the extracted folder here

It must include outbox.json and the media_attachments/ folder. Nothing is uploaded.

The date written is the date the post was published (UTC), not the date the photo was taken. A file that already has a date inside is left as it is.

Free: 25 files per run and the full report. Unlock every file for $9.

Standard metadata

Written where photo apps already look.

No sidecar files, no special tags. TootRedate writes the same date fields a camera or phone writes, so apps that read EXIF dates can use them.

  • JPEG: EXIF DateTimeOriginal + DateTimeThe post date in UTC, with OffsetTimeOriginal +00:00. A photo that already has a date inside is left exactly as it is.
  • MP4/MOV: creation timeWritten into the mvhd, tkhd and mdhd atoms. Same length, nothing re-encoded. A video that already has a date is left as it is.
  • Everything else: file date and namePNG, GIF, WebP and other types are not rewritten. They get the dated file name and the file date in the new ZIP.
Terminal · check a redated photo
$ exiftool -DateTimeOriginal -OffsetTimeOriginal 2023-05-14_101500_133931bba7cb42da.jpg
  Date/Time Original   : 2023:05:14 10:15:00
  Offset Time Original : +00:00
manifest.csv
New file, Date written (UTC), Post URL, Alt text, Written, Status
2023/2023-05-14_101500_133931bba7cb42da.jpg, 2023-05-14 10:15:00, https://example.social/@you/1104…, Sunset at the pier, EXIF date, ok
2023/2023-05-14_101500_5ca1a84b30ea04da.png, 2023-05-14 10:15:00, https://example.social/@you/1104…, , file date and name only, not a JPEG or MP4
unmatched/9f2c41d07be35a18.mp4, , , , nothing: copied unchanged, no post points to this file

What you get back

Every posted photo and video on its day.

The archive lists each attachment with the path of its file, inside a post that has a date. TootRedate joins them file by file.

Matched by path

Each file in media_attachments/ is matched to the attachment in outbox.json that has the same path. Never by the download date.

Date inside the file

Writes the post date into each JPEG (EXIF) and MP4/MOV (creation time), not just a file date that changes when the file is copied.

Named by date

Files like 2023/2023-05-14_101500_133931bba7cb42da.jpg instead of a random name in numbered folders. A folder per year.

The whole archive in one batch

Reads the .zip or .tar.gz without unpacking it first, or the extracted folder.

Private by design

There is no upload step and no Mastodon login. Your posts are read and the files rewritten in this browser tab only.

A report of what did not match

manifest.csv lists every file: date, post URL, alt text, what was written and its status. Files with no post go to unmatched/, untouched.

Compared

Three ways to deal with the media of a Mastodon archive.

The free routes are good tools. ExifTool with your own script can do everything here and more; archive viewers such as MARL are for reading your posts. TootRedate is for getting the post date into the files without writing a script.

FeatureTootRedateExifTool + your own Python scriptMARL and other Mastodon archive viewers
What it is forPutting the post date into the archive’s media filesWriting any metadata into any file; the usual advice for this jobReading and searching the posts of your archive
CostFree for 25 files, $9 once for allFreeFree
Joins outbox.json with the media filesYes, automatically, by pathYou write and debug the join yourselfShows posts with their media; does not change the files
Writes the date into the filesJPEG (EXIF) and MP4; other types get file date and nameYes, any field you script, more file typesNo
What you installNothingExifTool and PythonNothing (runs in the browser)
Your original filesOnly read; you get a new ZIPDepends on the options you passNot changed
Files leave your deviceNeverNeverNo (runs in the browser)

Pricing

Free for 25 files. $9 once for all of them.

Start free

Free

$0

Redate 25 files per run and see the full report of everything in your archive.

Redate my Mastodon media
  • Full report: every file and post found
  • 25 files with the post date written
  • Year folders and manifest.csv
  • No account

ONE-TIME

TootRedate Full

$9 USD

one-time · every file · any number of archives

Unlock every file, $9
  • Every file in your Mastodon archive
  • Thousands of files in one run
  • Run it again on future archives
  • No subscription
Secure checkout by Stripe. The full version unlocks in the browser you pay from. Questions: support@cedanolabs.org.

FAQ

Questions about Mastodon archive media dates

Want the long version? Read the guide.

Read the guide
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.

Put your posted photos and videos back on their days.

Add your Mastodon archive and get every file back with its post date. The first 25 files are free.