96 0
Sign in to rate

Hierarchical Tags

<10kB. Updated 2014-04-29. Only supports Anki 2.0.x.


This addon adds hierarchical tags to the browser in Anki. To create hierarchies use double-colons in the tag names, for example "learning::anki" or "language::japanese". This addon is licensed under the same license as Anki itself (GNU Affero General Public License 3). Known Issues When clicking on a tag in the hierarchy, an asterisk is added to the search term. The effect of that is that all notes with that tag and all subtags are searched for. But a side-effect is, that all tags with the same prefix are matched. For example if you have a tag it and a tag italian, clicking on the tag it would also show content from italian. Let me know if this affects you and I'll try to work around this. Support The add-on was written by Patrice Neff. I try to monitor threads in the Anki Support forum. To be safe you may also want to open a ticket on the plugin's GitHub issues page.


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 the desktop program:


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.

Other Anki 2.0.x Add-Ons Ask a Question


on 1555738353
Thanks for sharing!
on 1555674502
It's a really great add-on. However, I can't use it because of the mentioned "side effect". I have a lot of tags that start with the same bunches of letters, and it's technically impossible to rename them the way to avoid the problem.
Anyway, thank you very much for your great job and I hope that one day you'll find a way to solve this issue and I can use this add-on too. =)
on 1554928601
on 1549738433
Very useful!
on 1544854457
I can organize tags with much more detail and ease
on 1543842014
My tags are very organized now. Thank you!
on 1541462265
on 1540312321
on 1539498186
Tags are a lot more useful now
on 1538626660
on 1538201015
awesome add on!
on 1537818501
Finally, some order to my tags. Thank you.
on 1537778005
Essential add-on because Anki is designed to be primarily organized via tags, which means we'll have a lot of tags, and this extension saves us from having an extremely long list of tags.
on 1534562321
very good
on 1533873625
the most useful add-on I've used
on 1533665978
Very good
on 1530638147
on 1529851001
on 1529448027
i love you
on 1529060848
This add-on made me have to scroll less which is never a bad thing!
on 1526860800
Really useful, I wanted something like folder structure for some of my tags, and it's exactly that!
on 1526342400
Quite handy plugin that allows more control over the tags, exactly what I was looking for. Thank you!
on 1525478400
Fantastic. Accomplishes exactly what it's supposed to.

Suggestion for improvement: It would be nice to have the nested tags displayed as such on the iOS (or, I imagine, Android) app. Currently, I must scroll through and select hundreds of full "XX:YY:ZZ" tags in the Custom Study review options; ideally I would be able to visually collapse them and select all of the cards under a selected layer as appropriate, much as sub-decks are collapsible on the main deck screen. (I acknowledge this is probably not feasible with the current version of Anki, and I thank and applaud you for creating and sharing this gem that has made organizing my cards so much easier).
on 1524700800
Cured of OCD, would 200% recommend.
on 1523836800
Does the job neatly.
on 1522886400
Hierarchies rule!
on 1519516800
I use this to tag things like individual textbook chapters. For example:


This addon makes it so much easier to sort out what I need to study!
on 1516320000
more easily to tag
on 1514160000
on 1513728000
good addon
on 1512777600
I've been using this addon this for one year, and it's very useful, thanks you
on 1484524800
Very nice

This is a really great addon, but it misses some kind of batch edit function. I mean, you can't simply rename a root tag, you have to do it manually for every subtag. I found a way to solve this but I've done little testing (anyways, it works) so:
- back up your collection
- open the collection.anki2 file in a SQLite editor
- execute the following commands on the database (while anki is closed):
UPDATE col SET tags = replace( tags, 'oldTag', 'newTag' ) WHERE tags LIKE '%oldTag%';
UPDATE notes SET tags = replace( tags, 'oldTag', 'newTag' ) WHERE tags LIKE '%oldTag%';
(replace oldTag and newTag with your tags)
- little testing was done (backup!)
- every ' and % is important, do not delete
- not working with accent characters (because of character coding)
- it will replace evrything containing the oldTag (example: replacing "it" with "asd" also alters "italian" to "asdalian") (if you know what you are doing you can edit the regExp part to avoid this)
- I'm just a random comment guy, I don't take any responsibility, but hope it helps someone ;)
on 1477440000

thanks :)
on 1474243200
So useful

Words are not enough to describe how useful this addon is! Thanks a lot for making this great addon.
on 1470441600
Excellent little addon

I mainly use Anki for language learning, and love to categorize via tags; this naturally allows lots and lots of tags to pile up (at time of writing, I'm at about 91 tags total). This addon lets me further categorize the tags so that I'm not looking at a gigantic list whenever I want to study by tag or check and see how many cards of a certain tag I have. The only thing you can't do that I wish you could is have the tag field for a new card auto-complete if you type in a subtag.

For example, if I've got the subtag language::japanese, and I want to add a new japanese card, I would need to start typing 'language' for the auto-complete to kick in, while it would be super handy for me to just be able to type 'japanese'. Anyways, it's just a minor nitpick in an otherwise great addon!
on 1469232000
Keep your Anki decks organized

"Hierarchical Tags" helps people who study several languages/domains with Anki. Thumbs up!
on 1467676800
Thank you!

This is a great add on! So much cleaner than having hundreds of individual tags!
on 1465516800

on 1452988800
Works great

Just installed and tested it. Works great. :)
on 1446163200
Powerful tool

The best adds-on for Anki, and most essential one as well. This gives you a great way to organize your cards into a beautiful structure.

Must have.
on 1411257600
This changed a lot the way I use tags.

Only it cannot change me. ;-) So it's a pity that there is no way to change multiple tags at once like we can change cards in the Browser.

Here is a patch to ignore case in the tags (works better with ASCII tags than non-ASCII ones): https://github.com/pneff/anki-hierarchical-tags/pull/2/files
on 1398556800
Very neat!

If you like the new collapsible decks, you may want to try this.

The separator can be changed in the file “hierarchical_tags.py”. (I use a hyphen.)

on 1398384000
Simple, nice, and easy.