How does browser-native Anki .apkg packaging build SQLite decks offline?
A Web Worker compiles your parsed flashcards into a standard collection.anki2 database using 4096 bytes B-tree pages and a 100 bytes file header, then zips that binary alongside a JSON media manifest. Anki Desktop, AnkiDroid, and AnkiMobile open the resulting .apkg archive directly with zero cloud servers involved.
Rather than loading heavy WebAssembly binaries, the local serializer implements the SQLite 3 database file format specification in pure TypeScript. Each record encodes 1-to-9-byte Huffman varints inside leaf (0x0d) and interior (0x05) table pages, spilling payloads beyond 4061 bytes into linked overflow chains while populating Anki schema version 11 tables (col, notes, cards, revlog, and graves).
If your course material still sits inside unformatted slide decks or chapter handouts, you can first extract study cards from lecture PDFs before refining tags and note models here. The comparison table breaks down how all five export formats behave across study apps and paper workflows.
| Export button | File format & structure | Best target workflow | Card model & styling behavior |
|---|---|---|---|
| Download Anki deck (.apkg) | ZIP archive with collection.anki2 SQLite 3 + media |
One-click import on Anki Desktop, AnkiDroid, and AnkiMobile | Embeds Basic, Reversed, and Cloze models with .nightMode CSS |
| Export Anki .txt | UTF-8 tab-delimited text with #separator:tab headers |
Updating existing Anki 2.1.54+ note types or Git version control | Maps Front, Back, and Column 3 tags via metadata directives |
| Printable PDF | Vector 2-sided PDF on US Letter or A4 cardstock | Screen-free active recall sorting with dashed scissor guides | Mirrors back-page columns for accurate long-edge duplex printing |
| Save Excel (.xlsx) | Native OOXML spreadsheet (Front, Back, Tags, Note Type) |
Collaborative class deck editing in Excel or LibreOffice Calc | Preserves multi-word prompts, space-joined tags, and model labels |
| Save CSV | RFC 4180 UTF-8 comma-separated spreadsheet | Importing study pairs into spreadsheet databases or custom scripts | Quotes internal commas and line breaks cleanly across columns |
Importing CSV, Excel, Quizlet, and Markdown study lists cleanly
Copy-pasting vocabulary tables or Markdown lecture notes into Anki’s manual editor one card at a time slows exam preparation to a crawl. Dropping a .csv, .tsv, .xlsx, .txt, or .md file up to 25 MB (25,000,000 bytes) into Study notes, CSV, or Quizlet export parses your entire list immediately and updates the live Notes, Cloze, and Total Cards counters.
Parsing Quizlet tabs, double colons, and multi-column Excel sheets
The input parser accepts tab-separated Quizlet exports, Markdown Term :: Definition lines, spaced pipe columns (Front | Back | tag), and multi-line Q: / A: blocks. When you open an .xlsx or .csv spreadsheet conforming to RFC 4180 quoting rules, Column A maps to the card front, Column B maps to the back, and Column C attaches per-note tags while header rows like Front and Back are skipped.
Medical and biology learners who pair text definitions with visual anatomy plates can also build masked anatomy diagram occlusion cards for spatial recall. Combining concise concept decks with masked organelle or nerve charts keeps every card focused on a single retrieval target.
When to export Anki 2.1.54+ UTF-8 .txt headers instead of .apkg
Sometimes advanced Anki users prefer importing plain text into a custom note template they already maintain in their collection. Clicking Export Anki .txt prepends five directives defined in the Anki 2.1.54+ text file import headers guide, including #separator:tab, #html:true, #deck:, #notetype:, and #tags column:3.
Because those metadata lines sit at the top of the UTF-8 file, Anki 2.1.54 and newer pre-select the exact target deck, HTML line-break handling, and tag column automatically. You avoid mis-mapped fields and garbled accented characters common in legacy CSV imports.
Configuring Basic, Reversed, and Cloze note models with MathJax
Picking the right Note model controls how many active-recall cards Anki schedules from each source line. Leaving Auto-detect (Basic + Cloze {{c1::…}}) selected routes standard term-definition pairs to FreeToolsDock Basic (1 card per note), while Basic and Reversed (2 cards per note) builds both forward (Front -> Back) and reverse (Back -> Front) templates for foreign-language vocabulary.
Turning bracketed Markdown phrases into numbered Cloze cards
In Cloze Deletion mode (or whenever {{c1::...}} syntax appears in Auto-detect), the engine inspects ordinals c1 through c99 and generates one distinct review card per ordinal number. For example, a note containing both {{c1::Photosynthesis}} and {{c2::chemical glucose}} increments Notes by 1 and Total Cards by 2.
Checking Turn [bracketed terms] into {{c1::cloze}} lets you write fast Markdown study sentences using ordinary square brackets such as [Oxidative phosphorylation] occurs across the [inner mitochondrial membrane]. Numeric references like [1] or [14] are ignored so academic citations never turn into blanked prompts.
Rewriting inline and display LaTeX delimiters for Anki MathJax
Physics, chemistry, and computer science notes routinely wrap formulas in $V = IR$ or $$\nabla \cdot E = \rho / \varepsilon_0$$ syntax. As detailed in the Anki MathJax equation rendering documentation, Anki renders \( ... \) for inline math and \[ ... \] for centered display equations out of the box without external TeX installations.
Keeping Convert LaTeX $...$ to Anki MathJax \(...\) checked translates both delimiter styles while escaping surrounding <, >, and & characters safely into HTML entities. Students who prefer annotating slides on paper during lectures can pair their equation decks with slide handouts ready for class notes before reviewing key theorems on AnkiDroid.
Tip: Click Load sample above the editor to inspect how basic definitions, pipe-delimited subject tags, inline
$Na^+$ions, and multi-ordinal{{c1::...}}Cloze prompts preview side by side before opening your own spreadsheet.
Organizing subdeck hierarchies, tags, and SHA-1 duplicate checksums
Large semester collections become hard to review when hundreds of ungrouped cards land inside Anki’s Default deck. Consistent subdeck naming, sanitized tags, and deterministic field checksums keep daily review queues manageable across months of study.
Structuring nested subdecks with double-colon names and clean tags
Decades of spaced repetition interval scheduling research show that interleaved daily reviews work best when learners group related courses under a clear parent deck while tagging granular lecture topics. Entering STEM::Organic Chemistry::Alkenes in Anki deck name (use :: for subdecks) builds that exact nested tree upon import.
Any keywords typed into Global tags (optional) merge with per-row tags from pipe delimiters (| physiology) or spreadsheet Column C. Spaces inside multi-word tags convert to underscores automatically because Anki treats spaces as tag boundaries inside notes.tags.
Preventing duplicate notes via SHA-1 sort-field checksums
Inside collection.anki2, every note stores its fields joined by the ASCII Unit Separator byte (0x1f) alongside a plain-text sort field (sfld) stripped of HTML and Cloze braces. The serializer computes an unsigned 32 bits big-endian prefix of the SHA-1 digest over that sort field and writes it into notes.csum alongside a deterministic 10-character GUID.
When you add new rows to your CSV next week and re-import, Anki uses those guid and csum values to spot existing prompts rather than duplicating cards whose scheduling history you have already built. Instructors who also run live class warm-ups from the same vocabulary spreadsheet can reformat vocab decks for classroom quiz games for Kahoot, Blooket, or Gimkit in one tab.