about portablink

portablink is a tool to create self-contained web pages in a link. Use portablink to share portable prose, decentralised documents, pocket prototypes, and more!

📴 Offline: Links work even without an internet connection. 🗜 Compact: Links are compressed using the format best for your content.
🔒 Private: Create and view links without tracking. Nothing is stored on servers. 🔑 Secure: Content can't be accessed without the link.
🪙 Immutable: Links don't change and can't be tampered with. Always backward-compatible. 🏠 Self-hostable: Simply get the portablink portable link into your bookmarks ;)

examples

Hint: To open a portable link, use the context menu to open the link in a new tab. Or drag the link itself into your tab bar!

Generating examples…

  1. portable poetry
  2. tiny tic-tac-toe
  3. fluid simulation

how it works

portabl.ink works by using data URLs. Within a data URL, the tool bundles both the compressed data and the instructions needed to decompress and bootstrap that data. This produces a self-contained, compressed document in a single portable link.

Code is on GitHub↗.

Read the article↗ for a detailed write-up.


limitations

Much of a portable link's limitations come from being a data URL, which can sometimes make links tricky to use. The following lists some issues and their workarounds:

  1. Links can get lengthy – It's recommended to save links as bookmarks instead.
  2. Browsers block navigation to these links – Explicitly opening the links in a new tab can work.
  3. Some email apps strip these links. Some apps don't accept these at all (ex. link in bio).

The best way to use a portable link is to paste it into the browser's address bar.


library

The core link bundling function can be used as a library.

import pack from "https://portabl.ink/pack.js", or download pack.js.

// example_usage.js
import pack from "./pack.js";

async function copyLink(element) {
const url = await pack(element.innerHTML);
navigator.clipboard.writeText(url);
}

More on GitHub↗.


why?

for fun


related tools

Similar projects include itty.bitty, meml.ink, selfedit, and SingleFile.