Creating Anki Import Files (.txt and .csv)
Overview¶
Anki can import flashcards from plain text files where each line is one note, and fields are separated by a delimiter (like | or ,).
What you'll make
A file with two fields per line:
- Front (Question / Prompt)
- Back (Answer)
Rules Anki Uses¶
- One line = one card (note)
- Delimiter splits fields (Front vs Back)
- Lines starting with
#can configure import behavior (optional but handy)
Full file examples¶
Use this when you want a pipe delimiter (|).
Avoid trailing commas on the header lines
Write headers as #separator:pipe (not #separator:pipe,). Trailing commas can confuse the importer.
Editing the .csv in Excel (easy workflow)¶
- Put Front in column A and Back in column B.
- Export / Save As CSV (Comma delimited).
-
(Optional) Add the header lines at the very top:
-
#separator:comma #html:false
Importing into Anki¶
- In Anki, go to
File → Import - Select your
.txtor.csv - Confirm the delimiter matches:
.txtexample:|.csvexample:,- Import