Note Codes

approved

by Ezhik

Reference your notes from anywhere with simple 4-character codes.

34 stars1,321 downloadsUpdated 7mo agoMPL-2.0
View on GitHub

Note Codes

This plugin assigns 4-character codes to every note in your Obsidian vault.

You can use these to quickly reference the notes in your vault from other places, such as hand-written notes.

These note codes are displayed in the status bar on desktop and in the note metadata sidebar on phones and tablets. You can click on the code to instantly open the note code search, or right click on it to see additional options for copying the current note's code.

The Search for Note Codes action will let you look up note codes in a quick switcher.

Note code in the status bar Note code search

There is a protocol handler for quickly opening notes by their note codes:

obsidian://note-codes/open?code=XX-XX

Command Palette Actions

  • Search for note codes: Opens the search modal to find notes by their codes
  • Copy note code: Copies the current note's code to clipboard
  • Copy note code URL: Copies the obsidian://note-codes/open URL for the current note

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.

For plugin developers

Search results and similarity scores are powered by semantic analysis of your plugin's README. If your plugin isn't appearing for searches you'd expect, try updating your README to clearly describe your plugin's purpose, features, and use cases.