About Hookmark’s file links (with hook://file/ URLs)

One of Hookmark’s most important features is its ability to create adaptive, robust links to files. Traditional file:// links are brittle: if you rename or move a file, any file:// links to it break.

By contrast, when you create a hook://file/ link with Hookmark, you can move or rename the target file and the link will still work. Hookmark tracks these links in its database, which is why we say they are robust and dynamic. Hookmark also has an algorithm that can resolve file links shared with you by other users.


hook://file/ links are like aliases—but much more robust

If you are familiar with Finder aliases, you may notice a similarity. When you create an alias to a file, you can rename or move that file around on the same volume and the alias will still work. With hook://file/ links, it’s as if the user has a link to an alias.

However, hook://file/ links are much more robust than Finder aliases. Finder aliases cannot be shared, and they fail when files are moved across volumes. Aliases also fail in other situations in which hook://file/ links continue to work.


Anatomy of hook://file/ links

Hookmark file links contain a hook://file/ URL (also called an address). Here’s an example of a hook://file/ URL—one that points to your /Applications folder:

hook://file/IZanR7vxV?p=Lw==&n=Applications

If you click that link, it will open the folder.

A hook://file/ URL has five main parts:

  1. Scheme: hook
    This tells macOS to send the link to Hookmark. (The scheme is hook rather than hookmark because Hook was the original name of Hookmark.)

  2. Sub-scheme: file
    This tells Hookmark that the URL refers to a file. (Hookmark also supports other sub-schemes, such as mail and photos. See Principles That Determine the URL Scheme Returned by Copy Link for a Given App.)

  3. ID
    In the example above, the ID is IZanR7vxV. This allows Hookmark to look up information about the link in its database, such as what it is hooked to (“hooked” means bidirectionally linked).

  4. p= (path)
    This is an encoded key–value pair that contains path information. In the example above, the value is p=Lw==. The path is encoded so that when you share hook://file/ links pointing into a cloud-shared folder (such as Dropbox, iCloud, or Sync) or a version-control working copy (e.g., Git or SVN), you don’t necessarily reveal parent folders that are outside the shared scope.

  5. n= (name)
    This is the encoded name of the file or folder—the terminal node of the path. In the example above, the name is Applications.

The encoded path and name allow Hookmark to resolve hook://file/ links even when they are not yet in its database. This information is central to link sharing.


Sharing links

Hookmark allows you to share both hook://file/ links and their universal equivalents (`https://hookmark.net/hm/hook/file/…`) with others.

You can try this yourself by clicking either of these links:

Both will open the /Applications folder on your Mac. In effect, this folder has been “shared” with you via a link.

This is especially useful for sharing links to files located in cloud-shared folders (such as Dropbox, iCloud, or Sync) or in checked-out version-control repositories (e.g., Git or SVN). As long as the file name remains the same, the shared hook://file/ link will continue to work.

If Hookmark finds multiple files with the same name, it uses the encoded path information to narrow down the candidates. If multiple matches still remain, Hookmark presents a dialog asking the user to choose the correct file. Once that choice is made, Hookmark creates a local database entry to track the file.

In other words, even if a shared file is moved to a different shared folder, as long as the recipient has access to that file, the hook://file/ link will still work.

hook:// links are free to open

You can start sharing links today. Send a friend a hook://file/ link to a file that is in iCloud, Dropbox, a GIT repository, wherever. As long as they have access to the same file, the link will work for them.

The recipient does not need to pay for Hookmark to use any hook:// link, including hook://file/ links and hook://email/. Opening links is one of many features exposed in the Lite (free) tier of Hookmark.


Importing Hookmark’s database

Hookmark lets you export and import your Hookmark database. When you import a database, all file-link IDs are regenerated. Hookmark then relies on the pathname and name encoded in the hook://file/ URLs to resolve the files locally, using Spotlight to locate them.


Universal Hookmark file links

Hookmark includes two commands: Copy As Universal Link and Copy As Universal Markdown Link. When you use these commands on files, the resulting links have a slightly different structure from custom hook://file/ links, but they preserve the same essential information.

For example, a universal link to the /Applications folder looks like this:

https://hookmark.net/hm/hook/file/IZanR7vxV?p=Lw==&n=Applications

If your browser or app doesn’t support custom URL schemes, use this universal form instead.

Universal links are described here.

Hookmark files

Hookmark hook://file/ links should not be confused with Hookmark files.. A Hookmark file is a file on the Finder that contains a link (a raw URL or a Markdown link). That link can be a link to anything such as:

  • https://
  • OmniFocus://
  • x-devonthink-item
  • hook://file/

i.e., hook://file/ links are simply one of many schemes that can be contained in Hookmark files.

Why this matters

Robust file linking isn’t just a technical nicety—it fundamentally changes how you work. When links don’t break, you stop worrying about where files live and start focusing on what they mean and how they relate to each other. That’s the difference between managing files and managing knowledge.

Hookmark’s hook://file/ links are designed for real-world workflows: evolving projects, refactored folders, shared repositories, cloud sync, collaboration, and long-lived archives. They let you confidently connect files to emails, tasks, notes, research papers, and web resources—knowing those connections will still work weeks, months, or years later.

This is why Hookmark isn’t just a bookmarking tool or a convenience utility. It’s infrastructure for ubiquitous linking on macOS: a reliable foundation for building, revisiting, and sharing meaningful context across your work.

Winterfest sale is on! Save 25% off Hookmark.