Skip to content

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 (|).

#separator:pipe
#html:false
Inheritance|Testing Inheritance answer
Some other concept|Some other answer

Use this for easy editing in Excel / Google Sheets (standard comma-separated).

#separator:comma
#html:false
Inheritance,Testing Inheritance answer
Some other concept,Some other answer

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)

  1. Put Front in column A and Back in column B.
  2. Export / Save As CSV (Comma delimited).
  3. (Optional) Add the header lines at the very top:

  4. #separator:comma

  5. #html:false

Importing into Anki

  1. In Anki, go to File → Import
  2. Select your .txt or .csv
  3. Confirm the delimiter matches:
  4. .txt example: |
  5. .csv example: ,
  6. Import