101 6
Sign in to rate

Hierarchical Tags

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


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.


The add-on author has not uploaded a version of this add-on compatible with Anki 2.1. Old add-ons for Anki 2.0 can be downloaded from the archive.

All Anki 2.1.x Add-Ons


on 1667491543
New Anki: Obsolete, simply name tags with "MasterTag::SubTag" to create built in hierarchical tags (double colon as separator).
Old Anki: super
on 1660814282
A really useful, good working tool.
on 1646200933
Thanks!! This help me a lot.
on 1622609075
This is outdated and unmaintained hence why no download button, please go to the new version https://ankiweb.net/shared/info/594329229
on 1621953493
it has no code to dowload
on 1619605122
No link or code to install it. Seems unsupported.
on 1613220648
on 1600746863
how it work
on 1582030777
Works! Thanks...
on 1575431055
great thank you
on 1574201194
thank you :D
on 1570199813
Thank you
on 1567426638
I am unable to add this Tag.it says Download failed. Traceback etc.
on 1567072509
Not supported with newer Anki versions
on 1563975883
As of now, it seems like the author of this add-on abandoned it, and it is not maintained anymore.
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 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 1509667200
on 1505174400
on 1504483200
on 1504310400
on 1504224000
on 1504137600
on 1503532800
on 1503187200
on 1500768000
on 1498176000
on 1497484800
on 1495238400
on 1493424000
on 1492473600
on 1492041600
on 1491609600
on 1489881600
on 1489881600
on 1487808000
on 1487548800
on 1487116800
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 1482883200
on 1479686400
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 1468022400
on 1467676800
Thank you!

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

on 1459728000
on 1459382400
on 1458172800
on 1457049600
on 1454112000
on 1453680000
on 1452988800
on 1452988800
Works great

Just installed and tested it. Works great. :)
on 1452902400
on 1449619200
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 1442361600
on 1440979200
on 1437609600
on 1437609600
on 1434758400
on 1433289600
on 1431129600
on 1430265600
on 1428537600
on 1428451200
on 1426896000
on 1426464000
on 1424390400
on 1413331200
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 1409184000
on 1406246400
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.