Obsidian Note Codes

🦔 🦔 🦔

Obsidian with the Note Code plugin on the bottom right showing the code for a note about hedgehogs.
Obsidian with the Note Code plugin on the bottom right showing the code for a note about hedgehogs.

I made a little plugin for Obsidian: Note Codes.

It will assign a 4-character code to every note in your Obsidian vault. Those codes let you quickly reference notes in your vault from other places such as hand-written notes.

Click here to try it out.

To make things nicer, there's also a protocol handler, so something like obsidian://note-codes/open?code=XX-XX will open the note with the code XX-XX.

I tried to make these codes look nice even if they are handwritten. They're just four characters and some of the similar-looking ones are removed (though the plugin is smart enough to know that AA-0A is the same as AA-OA.

As usual, it's all open source: https://github.com/SilverEzhik/obsidian-note-codes

What's in a note code?

Note codes are generated based on a note's name and path, meaning that the note code will change if you rename your note.

Each note code consists of 4 alphanumeric characters. For clarity, O, I, L, and U are excluded from the codes, but this plugin will automatically handle these correctly - so OI-LU will automatically be treated as 01-1V when searching. Same with the missing dash or lowercase letters.

Note codes are generated by SHA-256-hashing the note's path in the vault, then taking the first 20 bits of the hash and encoding them using Douglas Crockford's Base32 encoding scheme.

32^4 = 1,048,576, which is hopefully enough.

🦔 🦔 🦔

Discuss on MastodonDiscuss on Bluesky