Get the cards, text and media files out of an Anki .apkg — Step-by-step guide
Anki’s .apkg deck files keep their pictures and sounds inside a ZIP as numbered files, with the real names in a JSON map. ApkgBridge reads the package in your browser and gives you a CSV with one row per note, with plain text and the original HTML, plus every media file under its real name, byte for byte. Nothing is uploaded.
What the sample produces
The sample is a legacy Anki package written without Anki: a SQLite collection, a media map and numbered binary files that contain 0x00 and 0xFF bytes. ApkgBridge writes each note as a CSV row, keeps the HTML in its own columns and copies each media file byte for byte under its real name. A note that points at ghost.jpg, which is not in the package, is flagged instead of exported as a broken link. The check reads the same database with Python’s sqlite3 and compares every field.
- Rows in the CSV
- 7, one per note
- Media files kept
- 4, with their real names
- Flagged
- ghost.jpg is not in the package
How to use it
- In Anki, open the deck, choose Export, pick “Anki Deck Package (*.apkg)”, tick “Include media” and “Support older Anki versions”, then save the file.
- Drop the .apkg here. The preview counts the notes, the media files and any reference to a file that is missing from the package. Nothing is uploaded.
- Download the CSV and the media ZIP. Import the CSV into Anki or a spreadsheet; the media folder keeps the file names that the HTML references.
Supported files
Reads the legacy .apkg format: a SQLite collection (collection.anki2) and a JSON media map. Packages from recent Anki versions store the collection with zstd compression; this tool reports them and asks you to export again with “Support older Anki versions” ticked, instead of guessing. Plain-text columns drop the HTML formatting, so bold, italic and layout are kept in the front_html and back_html columns. Notes with more than two fields put the extra fields in back. Cards, decks, scheduling and review history are not exported. Every media file in the package is extracted, including ones no note uses. Up to 512 MB per package, read in browser memory. The reader does not repair damaged databases.