MyDek file format v1
.mydek is UTF-8 JSON, MIME application/vnd.mydek+json. The same envelope may use .json. It is distinct from the native app's private checksum backup format.
{
"format": "MyDek", "version": 1,
"decks": [{"id": "UUID", "name": "Deck name"}],
"cards": [{"id": "UUID", "deckID": "deck UUID",
"question": "Plain text", "answer": "Plain text",
"box": 1, "reviews": 0, "due": "2026-11-20T12:00:00.000Z",
"flagged": false, "mediaIDs": []}],
"media": []
}IDs are UUID strings and unique within each list. Every card references an existing deck. Questions, answers and names must be nonempty strings. Box is an integer 1–5; reviews is a nonnegative integer; due is an ISO 8601 timestamp with time zone. Card text is plain text, including line breaks, never executable markup. Names may use :: to express Anki deck hierarchy; exports retain the full name.
Media entries contain id (UUID), name (string) and data (embedded base64 data URL). Supported types are image/png, image/jpeg, image/webp, image/gif, audio/mpeg, audio/wav and audio/ogg. Cards reference media by mediaIDs; referenced entries must exist. External media URLs are rejected. Browser exports preserve these entries. The current native importer accepts text-only files and rejects attachments explicitly.
Readers reject unknown versions, duplicate IDs, orphan cards, missing content and invalid schedules atomically. Imported decks receive fresh UUIDs, preserving all references, without replacing existing work. New cards start in Box 1 and are due immediately. Export preserves existing schedules and flags.
No encryption is implied: protect exports as you would the card contents. Retain your original file. Future incompatible changes require a new version; readers must not guess.