Href Pager documentation

Learn how to craft pager links manually, validate them, and share them with confidence—even without the hosted encoder UI.

How pager links are structured

Every HREF Pager URL has two independent payloads:

When a checksum is included in the metadata, it is calculated from the literal #data fragment string (normally the first 10 characters of a SHA-256 hash). The viewer inflates both payloads in the browser, validates the checksum when present, and renders the Markdown with hostile content stripped.

Create a link manually

  1. Write your Markdown and save it as UTF-8 text. Compress the bytes with raw DEFLATE, then encode using URL-safe Base64 (replace + with -, / with _, and trim any trailing =). This becomes the #data= fragment.
  2. Build a metadata object. At minimum include { "v": 1 }. Add title, author, email, and date only when you have values. If you plan to ship a checksum, compute a short hash (10 characters by default) from the literal fragment string produced in step 1 and store it under "h".
  3. If the metadata object still only contains v, you can omit ?m= entirely. Otherwise, UTF-8 encode the JSON, compress with raw DEFLATE, Base64URL encode the result, and place it in ?m=<payload>.
  4. Assemble the final URL: https://your-host/index.html, append the metadata query string (when not empty), and finish with #data=<payload>. Add ?edit=1 if you want the encoder to load with the content prefilled for editing.

Example layout: https://example.com/index.html?m=<metadata>#data=<markdown>

Popular tooling includes pako for compression and the Web Crypto API (crypto.subtle.digest) for hashing. Make sure you call encodeURIComponent if you embed the final link inside another context.

Prompt an LLM to produce pager links

Share this prompt with your favorite model when you want it to emit a ready-to-open link:

Compress the metadata JSON and Markdown below separately using raw DEFLATE, then encode each with URL-safe Base64.
Return a link in the format https://hrefpager.app/index.html?m=<metadata>#data=<markdown> with no line breaks.
Do not include explanations—only the final URL, and ensure the metadata hash matches the #data fragment.
Metadata to encode:
{ "v": 1, "title": "...", "author": "...", "email": "...", "date": "...", "h": "short hash of the #data fragment" }
Markdown to encode:
<your content here>

Verifying a link

Back to the encoder