- Home
- How-to Guides
- Import a CSV Into Anki
How to Import a CSV Into Anki (Without Breaking the Deck)
A CSV is the most common way to get a word list into Anki, and the most common way to get it in wrong: one long field, cards split mid-sentence, a header row studied as vocabulary. This guide walks the import dialog field by field, then shows the shortcut that skips it entirely.
Importing step by step
Get the file into a shape Anki can read
- Export from Google Sheets or Excel as CSV, or as tab-separated values. Tabs are the safer choice: your cards are far more likely to contain a comma than a tab.
- Put one card per row, with the front in the first column and the back in the second. Extra columns are fine and become extra fields later.
- Save as UTF-8. Excel's plain 'CSV' can write a regional encoding that turns accented and non-Latin characters into mojibake once the deck is in Anki.
- If a cell contains the separator, wrap the whole cell in double quotes. A spreadsheet export does this for you; a hand-typed file usually does not.
Open the import dialog
- Read the preview rather than the file name. If the preview shows one long column, the separator is wrong and nothing below matters yet.
- The preview is your last checkpoint: everything on this screen is reversible, everything after it lands in your collection.
- Importing never merges decks by itself. Whatever you select under Deck is where every note in this file goes.
Set the field separator
- Pick Tab for a TSV, Comma for a CSV, or Semicolon for exports from a spreadsheet configured for a European locale.
- Watch the preview as you change it. Correct means each row shows separate, sensible columns, not one blob and not columns that shift from row to row.
- Anki guesses the separator and is usually right, but a file with a single stray comma in the first line can push the guess the wrong way.
Choose the note type and the deck
- Basic gives you Front and Back. Basic (and reversed card) creates two cards per note, one in each direction, which doubles your daily reviews - choose it deliberately.
- If your file has more than two columns, either pick a note type that already has enough fields or create one first in Tools, Manage Note Types.
- Pick an existing deck or type a new name. Importing into a deck that already has cards is safe: it adds, it does not overwrite.
Map the columns to fields
- Assign each column to a field, or set it to Ignore. Columns you ignore never reach the collection.
- One column can be mapped to Tags instead of a field. Its values, separated by spaces, become native Anki tags - searchable and filterable, unlike a text field.
- If your first row is a header (Front, Back, Example), map it away or delete that row first, or you get a card that says 'Front' on the front.
Import, then verify
- Open the Browse window and check a handful of cards, especially ones with punctuation, quotes or non-Latin script.
- Fewer notes than rows almost always means duplicates were skipped, or rows were missing a first field.
- If it went wrong, do not fix cards one by one: use Edit, Undo Import right after the import, delete the deck, or filter by the tag you imported with and delete that selection.
What went wrong, and why
Almost every failed CSV import is one of six things. Find the symptom, and the cause is right there with it.
The field separator does not match the file. A file exported as CSV imported with Tab selected produces exactly this. Change the separator and watch the preview split into columns before you import.
An unquoted separator inside a cell. 'hola, buenos días' in a comma-separated file is two fields as far as Anki is concerned. Re-export as tab-separated, or make sure the exporting app quotes cells that contain a comma.
Anki does not detect header rows in every case. Delete the header line from the file, or map its columns so the row becomes harmless. A card reading 'Front / Back' is a header that got imported.
Two usual causes. Anki skips a note whose first field is empty, because that field is what identifies the note. And by default it skips notes whose first field duplicates one already in your collection - which is a feature until the day two different words share the same front.
The file is not UTF-8. Re-export choosing UTF-8 explicitly (in Excel, 'CSV UTF-8'), or open it in a plain text editor and save it as UTF-8. Anki itself handles every script correctly; the damage happens on export.
The 'Allow HTML in fields' box was off, so Anki escaped the markup and rendered it as text. Turn it on if your file contains intentional formatting, and leave it off if the tags came from a copy-paste out of a web page.
Skipping the dialog with a .apkg
Every problem above comes from the same root cause: a CSV is just text. It carries no note type, no field names and no tags, so Anki has to ask you to reconstruct all of that on import, and every answer is a chance to get it wrong.
An .apkg package carries the structure with it. It is a small database holding the notes, the note type that renders them and the tags already attached. You double-click it and the deck opens, fully formed - no separator to choose, no columns to map, no header row to worry about.
Our free CSV to Anki converter does that conversion in your browser. It detects the separator, shows you the parsed cards before you commit, and lets you point each column at Front, Back, Example, Notes or Tags. The file is never uploaded. If your source is a Quizlet export instead, use the Quizlet to Anki converter, which also understands the blank line Quizlet puts between cards.
And if the cards do not exist yet, skip the spreadsheet too: the Anki generator writes them from a prompt, with translations and example sentences, and hands you the same .apkg.
Duplicates, bulk edits and richer note types
The import dialog is also the most powerful bulk-editing tool Anki has. Used deliberately, it maintains a deck of thousands of cards from a spreadsheet; used carelessly, it flattens notes you meant to keep apart.
Anki compares the first field of the note, within the same note type, ignoring HTML. Nothing else is considered - not the back, not the tags, not the deck. Two notes with the same front in different decks still collide; the same front under two different note types does not. This is why 'Update existing notes when first field matches' is powerful and dangerous in equal measure: it can bring in a corrected translation for 400 words in one pass, and it can flatten a deliberate pair of homographs into a single note.
Set the import to update matching notes and you have a spreadsheet-driven editor for an existing deck. Export the deck as text, fix the translations in a spreadsheet where fixing 200 rows takes minutes, then import it back with the same note type and the same first field. Take a backup first (File, Export, include scheduling) - the update is not undoable once you close Anki.
A serious language deck rarely fits Front and Back. Create a note type with Word, Reading, Meaning, Example and Notes, then design the card template so the example only renders when it is present - wrap it in a conditional section so a card without an example does not show an empty label. Add fields before importing: adding them afterwards leaves every imported note with the new field blank.
A tag column costs nothing at import time and pays back later: filtered decks by tag, 'study only chapter 3' sessions, and bulk operations on a subset you can select in one search. Keep tags short and hierarchical (chapter::3, source::podcast) - Anki treats :: as a hierarchy separator and will group them in the sidebar.
A CSV carries no note type, no card template and no media, so every import repeats the mapping ritual and every field-mapping mistake is yours to make. A .apkg package carries all of it. If you are moving a deck between machines, sharing it with a study partner, or importing something with more than two fields, generate or convert to .apkg instead and double-click the file.
Premium access includes:
Frequently asked questions
TSV, unless you have a reason not to. Flashcard text contains commas constantly and tabs almost never, so a tab-separated file needs no quoting to survive the trip.
Not directly in AnkiMobile or AnkiDroid. Import on a desktop and sync, or convert the file to .apkg first: both mobile apps open a .apkg package.
No. An import adds notes. It only changes existing ones if you explicitly enable updating notes when the first field matches.
Put the example in its own column, use a note type that has a field for it, and map that column to that field. Do not glue the example onto the back with a line break - a separate field can be styled, searched and hidden per card type.
Yes, immediately after: Edit, Undo Import. Later, delete the deck, or search Browse for the tag you imported with and delete the selection. Take a backup before any import that updates existing notes.
Keep reading
Related guides that build on what you just read.