Support any character in filenames with percent encoding

Some characters aren’t supported in file names (e.g. “:”), hence in note titles. The proposal is to support them by using percent encoding.

Use case or problem

I’d really like to use characters such as “:” in note titles but I can’t.

Proposed solution

Support any character in file names by using percent encoding for commonly unsupported characters (“:”, “/”, "", “?”, “%”…).

  • Platform specific character constraints on filename wouldn’t leak as constraints on note titles
  • It would be transparent to users as they would only see decoded titles in the UI.
  • Even if users look at actual file names, percent encoding is used for URLs so it should be familiar to them.

We could have several options:

  1. enable/disable: if disabled, platform constraints on filenames apply
  2. encode spaces: percent encode spaces (e.g. space becomes %20) even if they are supported in filenames. Not having spaces is useful for scripting.
  3. encode non ascii: encode every non ascii character. Best compatibility across systems

Current workaround (optional)

Currently I’m using aliases for real note names. So I have:

  • actual filename: short version of the title without the special chars
  • alias: the real title of the note
  • h1: the real title once again

Now that we have the “inline title” feature, I’d like to have a single source of truth for the title and to remove the alias and h1 (less extra work, good!). The most convenient way would be to still use file names by allowing all characters into them.

Note that it isn’t at odd with this other top proposal:

We could still support a “title” metadata to override using the filename as note title source, e.g. for users using ids as file names.

Related feature requests (optional)


Another bold idea is to only use percent encoding for filenames and to make filenames completely invisible in the Obsidian UI. Apps like Notion adopt similar ideas so there is no restriction on file titles.

1 Like