Anki Markdown Notes

AnkiWeb addon 2141874715

Imports and exports Markdown notes as Anki cards, converting Q/A entries into basic or reversed cards and mapping folders to decks.
AI-generated summary; may contain mistakes.

card-creationimportexport

Open on AnkiWeb GitHub Find alternatives

AnkiWeb

Votes
1 (👍 0 · 👎 1)
Updated
2021-03-14
Anki versions
2.1.41~
License
MIT (from the GitHub repository)
Virus scan
No ClamAV match A match does not prove malware. No match does not prove that the code is safe.
Languages
Python
Description language
en

Maintenance

abandoned

  • Last update or commit: 2021-03-14 (2058 days before the snapshot).
  • Commits in the last year: 0.
  • Issues: 3 open, 7 closed.
  • Pull requests: 0 open, 1 merged.
  • Median first response: 142 hours (6 answered issues and pull requests).
  • Outside pull requests: 100% of 1 merged.

Will it work on my Anki?

Version branches
Min AnkiMax AnkiUpdated
2.1.02.1.41+2021-03-14
History across monthly snapshots

Loading…

Similar addons

Obsidian Sync (Differential)

Exports Anki notes differentially to Markdown in Obsidian, mirroring deck folders, syncing images/video/audio, generating index files, and linking cards back to Anki.

exportsync-integration

13 votes 77% approval 👍 13 · 👎 0 ⭐ 25 Anki 26.08.1~ Updated 2026-08-09
No-Sync Note Converter

Converts Anki notes between types without triggering a full sync, offering field mapping, presets, review-history preservation, deck/tag retention, browser and reviewer conversion, and one-step undo.

schedulingnote-managementcard-templatescloze

1 votes 21% approval 👍 1 · 👎 0 ⭐ 1 Anki 2.1.1~ Updated 2026-09-02

Description

⚠️⚠️Please version control your markdown notes and backup your Anki notes before attempting to import notes from markdown files using this add-on. Since only two built-in models are supported, this add-on might cause unexpected behavior. This has worked out well for me since Jan 2018 because I was starting from scratch and I only use the two supported models. Please raise issues here. ⚠️⚠️ This is an Anki add-on that extracts notes from a markdown file and imports it to Anki. This add-on is meant to be used when maintaining all notes using Markdown files only - any edits made from Anki will be lost the next time this add-on is used. Major advantages of doing so: - easily see all notes from each deck at the same place - easy to add notes in bulk into Anki when covering a lot of new material - maintain additional material that doesn't have to go into Anki along with Anki notes - version control the notes since they are now markdown files Only these two built-in models are supported for now - `Basic` and `Basic (and reversed card)` Media (images/audio) is not supported. Existing Notes To start using this add-on, first extract all existing notes into markdown by selecting “Tools -> Export to Markdown Notes”. You should see all the notes following the built in models in a “Notes” folder in the folder you chose. You can now follow the conventions below and choose to rearrange your notes along with their id comments. Starting from scratch Create a Notes folder wherever you want the notes to be and follow the below conventions. Then select “Tools -> Import from Markdown Notes” in the Anki desktop app to import them into Anki. Conventions The file structure of the Markdown files is shown below. All notes extracted from the root folder are added to the Default deck - in the below case, notes from random.md go to the Default deck. Everything in a sub-folder goes to a deck named after that subfolder - here notes from socket.md and files.md go into the python deck. Notes │ algorithms_md │ └───python │ │ socket_md │ │ files_md │ └───tools │ git_md │ tmux_md To create a basic card, enter the following anywhere in the Markdown file: """ Q: Question A: - Answer line 1 - Answer line 2 """ This creates a basic card with Question as the front of the card and """ Answer line 1 Answer line 2 """ as the back. Blank lines in the markdown file are considered the end of a Note. To create a basic and reversed card, use QA instead of Q above like so: """ QA: Question A: - Answer line 1 - Answer line 2 """ The code is hosted on this GitHub repo. Sample Notes are in the Notes folder.

README

Anki-Markdown-Notes

⚠️⚠️Please version control your markdown notes and backup your Anki notes before attempting to import notes from markdown files using this add-on. Since only two built-in models are supported, this add-on might cause unexpected behavior. This has worked out well for me since Jan 2018 because I was starting from scratch and I only use the two supported models. ⚠️⚠️

This is an Anki add-on that extracts notes from markdown files and imports them to Anki. This add-on is meant to be used when maintaining all notes using Markdown files only - any edits made from Anki will be lost the next time this add-on is used. Major advantages of doing so:

  • easily see all notes from each deck at the same place
  • easy to add notes in bulk into Anki when covering a lot of new material
  • maintain additional material that doesn't have to go into Anki along with Anki notes
  • version control the notes since they are now markdown files

Only these two built-in models are supported for now - Basic and Basic (and reversed card) Media (images/audio) is not supported.

Installation

To download and install directly from Ankiweb, please copy and paste the following code into the desktop program: 2141874715

Alternatively, open your add-ons folder by selecting "Tools -> Add-Ons -> Open Add-Ons Folder" and simply paste the anki-markdown.py file into it.

Usage

Existing Notes

To start using this add-on, first extract all existing notes into markdown by selecting "Tools -> Export to Markdown Notes". You should see all the notes following the built in models in a "Notes" folder in the folder you chose. You can now follow the conventions below and choose to rearrange your notes along with their id comments.

Starting from scratch

Create a Notes folder wherever you want the notes to be and follow the below conventions. Then select "Tools -> Import from Markdown Notes" in the Anki desktop app to import them into Anki.

Conventions

The file structure of the Markdown files is shown below.

  • All notes extracted from the root folder are added to the Default deck. In the below case, notes from random.md go to the Default deck.
  • Everything in a sub-folder goes to a deck named after that subfolder - here notes from socket.md and files.md go into the python deck.
  • The filename is set as a tag for each note in a file - here all notes from socket.md are assigned a tag 'socket'. The tag can be used used in the card templates as shown here.
Notes
│   algorithms.md
│
└───python
│   │   socket.md
│   │   files.md
│
└───tools
    │   git.md
    │   tmux.md

Currently there is support only for two types of notes - Basic and Basic (and reversed card). To create a basic card, enter the following anywhere in the Markdown file:

Q: Question
A: - Answer line 1
- Answer line 2

This creates a basic card with Question as the front of the card and

Answer line 1
Answer line 2

as the back.

Blank lines in the markdown file are considered the end of a Note.

To create a basic and reversed card, use QA instead of Q above like so:

QA: Question
A: - Answer line 1
- Answer line 2

Sample Notes are in the Notes folder.

Development

All the code is in the single anki-markdown.py file. Going through the docs first is highly recommended. In the markdown files, id comments are added as soon as a note is imported successfully into anki - this will ensure any changes to the note in the markdown file edits the same anki note.

This addon is shared on AnkiWeb using the instructions here.