36 3
Sign in to rate

Add note id

<10kB. Updated 2017-11-15.
The author has shared 19 other item(s).


This adds the nid (note id) to an empty field named "Note ID" when opening the add or edit note window. When the “Note ID” field is the first field, this automatically satisfies the rule that the first field has to be unique. That means the “real” fields with interesting content don’t have to be unique. (Personally, for synonyms i like to have the same content in the “Expression” or “Meaning” fields, and then put further information in note or disambiguation fields.) The note id field is also useful when editing the data outside of Anki (text export, edit, text import). With the add-on, Anki can reliably match the notes on reimport, even when the first "interesting" field changed. There is also a menu item that goes through the collection and fills all fields called "Note ID" with the nid. There is a manual page, too.


As add-ons are programs downloaded from the internet, they are potentially malicious. You should only download add-ons you trust.

To download this add-on, please copy and paste the following code into Anki 2.1:


If you were linked to this page from the internet, please open Anki on your computer, go to the Tools menu and then Add-ons>Browse & Install to paste in the code.

This add-on previously supported Anki 2.0. You can download the last version supporting 2.0 here. As Anki 2.0 has been discontinued, no support is available for this version.

All Anki 2.1.x Add-Ons


on 1599486136
This did not work for me: "This adds the nid (note id) to an empty field named "Note ID" when opening the add or edit note window."
When I opened an add window, nothing happened, my field "Note ID" was empty.

This worked for me: "There is also a menu item that goes through the collection and fills all fields called "Note ID" with the nid."
But with the main feature not working I disabled the add-on and moved my "Note ID" field to the bottom. I will leave it empty and would use the menu item to fill the "Note ID" field before exporting the notes.

My Anki Version is 2.1.32 (dee7d45d)

I am going to use "Note ID" field for identification of notes in a shared deck, so I could update notes later and the users could download my updates.

By the way I would not use "Note ID" for synonyms, because there are better ways to threat them. The best way is to always use example sentences to narrow down the possible answer by providing context, but if you use words without context, you can do it the following way:

Q1: the regular paid work that you do (syn: employment, occupation)
A1: job

Q2: the regular paid work that you do (syn: job, occupation)
A2: employment
on 1598740283
added "Note ID" section via 'Fields' for all my existing cards. Then downloaded this add on. Nothing happened.
on 1597158122
Doesn't work any more - when I used the menu option, helllla cards got negative numbers.

But beyond that also, every new card I create gets the same ID: -15000....000
on 1590931308
Works great, solves my card problem. Thanks
on 1586538851
Good add-on, works as expected as long as a field exists named "Note ID" before attempting to edit a card from the browser. As soon as the card is viewed in the browser and then advance to the next card the "Note ID" is automatically filled in.

Works with Anki v2.1.22 (0ecc189a) as of 4/10/20.
on 1583490067
It's very useful. Thank you. I hope you can develop a plug-in to get cid
on 1581859784
Conflict with extension "Pull from duolingo":
Will overwrite the unique note-id "Gid" (required by "Pull from duolingo") if "NoteIdFieldName" is set ot "Gid".
If "NoteIdFieldName" is something else, "Pull from duolingo" will not be able to obtain the latest new words.
on 1573804176
1. How to: Add a field called "Note ID" to the note template. Then go to Tools → Add note ids.

2. To make it work with frozen fields, use the modified add-on called "Ze Add note id" instead.
on 1569432900
This is GREAT!

But it would be perfect if the ID can be hidden to users (or make it optional).
on 1565783622
Do I have to create Note ID field first? I added the add-on but saw no option for automatically assign note ID.
on 1564502707
great addon

but is not compatible with Frozen field

solution is download Ze Add note id
on 1559810582
on 1524700800
This boi is essential for decks with lots of duplicate entries, saved my life doing dictionary work. omg.
on 1520208000
useful.i like it
on 1518134400
Thanks for writing this addon!
on 1517702400
This is a great addon, although it would be even better if it could hide the Note ID field!
on 1389916800
Great add on

Does exactly what it says it does. I needed this add on when developing a flashcard app for android. Needed some way to uniquely identify flashcards in my SQLite table so I could map 1:* relationships when exporting from anki.
on 1384041600
Thanks a bunch for writing this

This addon works excellent and allows me to more easily share decks with people. (For decks that have their content updated/modified from time to time).
on 1375315200
Great for managing collections

Implemented this when me and my girlfriend started learning Esperanto. Great for keeping our collections up-to-date.