Importing Anki decks to your iPhone: how .apkg works
What's inside an .apkg, where to find good decks, what comes along with the import and what doesn't, and how to open them in AnkiMobile or checkst.
You found a deck someone built with a lot of care, or you want to move your own cards from your laptop to your iPhone. Technically it is a single file. In practice there are three places where things go wrong: the wrong file type, missing media, and someone else's learning progress messing up your schedule. Here is everything you need to know so your import works on the first try.
.apkg or .colpkg: The Extension Decides
Anki knows two package formats, and people confuse them exactly once.
- .apkg (Anki Deck Package): one deck including subdecks. On import, its contents are added to your existing collection. That is almost always what you want.
- .colpkg (Anki Collection Package): the entire collection with all decks and the complete scheduling. According to the Anki manual, on import the existing cards are deleted and replaced. Existing media files remain in place.
There is one more trap: older Anki versions saved collection packages as collection.apkg. Despite the extension, that is a whole collection and not a normal deck. If a file has this name, treat it with corresponding caution.
What is inside a deck package
According to the Anki manual, a package contains decks, notes, note types and cards. The note type is the important part: it defines which fields exist and which cards are generated from a note. Its templates determine how the front and back look, written in HTML and styled with CSS. The card templates therefore come along with the note type. That is why a well-built deck looks the same on your iPhone as it did for its creator.
Two things, however, are optional, and this is where most problems happen:
- Media. Images, audio and other local files are only included in the package if “Include Media” was enabled during export. The .apkg extension does not tell you whether the images are inside.
- Learning progress. Review history and scheduling only come along if “Include Scheduling Information” was ticked. Without that box you start from zero. Deck options can also optionally be included.
And now the part many people do not know: for someone else's decks you usually do not want their learning progress. The Anki manual generally advises against adopting other people's intervals and history, because they can lead to unexpected intervals. The person who built the deck may have known half the anatomy in their sleep. You may not. Anki Desktop has offered the option “Import any learning progress” on import since version 23.10.
With your own decks it is the reverse: if you move from your laptop to your iPhone, you naturally want to keep your learning state. Then both boxes belong ticked on export, media and scheduling.
Where to find good decks
There is no independently verified ranking of the most popular sources. These three starting points are nevertheless the best known:
- AnkiWeb Shared Decks is the official directory of shared decks, with categories and search. You can go there directly from AnkiMobile.
- The AnKing is the best-known provider for medicine and exam preparation, with the AnKing Step Deck and the MCAT Deck. Important: according to the provider, the decks are distributed and updated via AnkiHub. A permanently free, current .apkg direct download is not documented. So follow the route the provider describes.
- Reddit r/Anki is good for questions and recommendations. A post with many upvotes is not a quality seal for a deck, however.
And then there is, of course, the most productive source of all: your classmates who are a semester ahead. Just ask.
Importing into AnkiMobile
The official AnkiMobile manual describes the route for decks from the AnkiWeb directory as follows:
- Tap “Add/Export” at the bottom left, then “Shared Deck List”.
- Choose or search a category, tap the deck, scroll down, “Download”.
- Safari downloads the file. In Safari, open the download arrow, then “Downloads”, and tap the file.
- If asked, choose “Open in Anki”. After the import the deck is ready to study.
For files from other sources, i.e. mail, messenger or another website: tap the file, choose “Open in” or “Share” and select the app. If you have already saved the file, according to Apple you will find it in the Files app in the Downloads folder. There you can tap it, or press and hold it and send it to the app via “Share”.
Importing into checkst
The route is the same, only the destination is different. checkst is registered on the iPhone as an app for .apkg files:
- Tap the .apkg in Safari, Mail, a messenger or the Files app.
- Choose checkst via “Share” or “Open in”. Alternatively, within checkst itself, select the file from “Files” using the import.
- At the end you see how many notes, cards and media files arrived. If media shows a zero even though the deck has images, “Include Media” was not active during export.
checkst takes over the note types and templates from the package and displays Basic, Cloze, typing and image occlusion cards as they are set up in the deck, including formulas and furigana. If your learning progress is in the package, checkst keeps it by default, and FSRS continues scheduling from there. For someone else's deck with someone else's history, you reset the learning progress on import, then you start with new cards.
checkst can also open a .colpkg, i.e. an entire Anki collection. Unlike in Anki, it does not replace anything there: the decks from the collection are added alongside your existing ones. For everyday use, individual .apkg files are still cleaner, because you only take along what you actually want to learn.
What does not come along: add-ons and scripts
These are the limits that apply to any iPhone app, not just a specific one.
Desktop add-ons do not run on the iPhone. Anki developer Damien Elmes confirmed this in the official forum for AnkiMobile. If a deck depends on an add-on running while you study, you get the cards but not the add-on functionality. AnkiHub writes the same about its own features. The cards remain studyable; the extras are missing.
JavaScript in card templates is a grey area. Anki generally allows it but offers no support and no guarantee of functionality. Because templates are displayed differently on different devices, the manual says: test on every client. The blanket statement “JavaScript does not work on the iPhone” is not accurate. “It may work, it may not” fits better.
Newer package formats: when an import fails
Behind the same .apkg extension, different internal formats can be hiding. Anki's source code distinguishes collection.anki2, collection.anki21 and collection.anki21b, the modern format with zstd compression. An app must explicitly support each of these variants. checkst reads all three, including the zstd-compressed anki21b.
When things were introduced is often told incorrectly. The release notes describe, for version 2.1.50, an optional new format for collection packages and a new .apkg implementation only for 2.1.52, initially behind a feature switch. “All .apkg files have been zstd-compressed since 2.1.50” is therefore not documented.
The practical solution when an app refuses to open a deck: re-export it in Anki Desktop and enable “Support older Anki versions (slower/larger files)”. The file becomes larger and the export slower, but it can then be read by more programs.
The checklist for your next export
- .apkg, not .colpkg, if you want to pass on or move a deck.
- Tick Include Media, otherwise images and audio are missing.
- Tick Include Scheduling Information only for your own decks.
- If there are problems: enable Support older Anki versions and export again.
- After the import, briefly check the number of media files and look at a handful of cards.
That way, moving from your laptop to your iPhone takes about as long as reading this checklist. And the deck you got from your study group looks afterwards exactly as it does for them. Only your learning progress is yours.
Frequently asked questions
What is the difference between .apkg and .colpkg?
An .apkg is a single deck including subdecks and is added to your collection. A .colpkg is the complete collection, and according to the Anki manual its import replaces the existing cards. In checkst, a .colpkg is added instead. For individual decks you still use .apkg.
Do images and audio come along on import?
Only if they were packed in during export. Anki only puts media into the file if “Include Media” is enabled. If images are missing after the import, the cause is usually the export.
Should I adopt the learning progress of someone else's deck?
Usually not. The Anki manual generally advises against adopting other people's intervals and review history, because they can lead to strange intervals. With your own deck, on the other hand, that is exactly what you want.
Do add-ons and AnkiHub features work on the iPhone?
No. According to Anki developer Damien Elmes, desktop add-ons do not run in AnkiMobile, and AnkiHub itself notes that features requiring its add-on are not directly available there. You can still study the cards themselves.
Can I import an .apkg deck directly into AnkiWeb?
No. AnkiWeb is a download source, but not an importer for .apkg files. For that you need an app on your computer or smartphone.
Sources
- Anki manual: Exportingdocs.ankiweb.net
- Anki manual: Packaged Decksdocs.ankiweb.net
- Anki manual: Card Templatesdocs.ankiweb.net
- Anki manual: Styling & HTML (Javascript)docs.ankiweb.net
- Anki manual: Sharing Decks Privatelydocs.ankiweb.net
- AnkiMobile manual: Shared Decksdocs.ankiweb.net
- AnkiWeb Shared Decksankiweb.net
- Apple: Find downloads on your iPhone or iPadsupport.apple.com
- The AnKingtheanking.com
- Reddit: r/Ankireddit.com
- Anki forum: Add-ons on iPad (answer by Damien Elmes)forums.ankiweb.net
- AnkiHub support: How do updates work?community.ankihub.net
- Anki: Release notes 2.1.50–59changes.ankiweb.net
- Anki source code: package/meta.rsgithub.com