b0x.nz

Shorten. Share. Disappear.

2–32 chars · letters, numbers, hyphens, underscores
Preview interstitial Show a 5-second countdown before redirecting visitors
Link to my browser Lets you manage this link from "My Links"
Enter a shortened link to reveal its destination without visiting it
public No auth required owner Requires X-Owner-Hash + X-Fingerprint headers admin Requires Authorization: Bearer <ADMIN_KEY> ⏱ Public + owner endpoints: 25 req/hour · 100 req/day per IP  ·  Admin endpoints: unlimited
POST /api/shorten public
Shorten a URL. Optionally set a custom slug, expiry, preview mode, and link ownership to your browser fingerprint.
curl -X POST https://YOURDOMAIN/api/shorten \
  -H 'Content-Type: application/json' \
  -d '{
    "url": "https://example.com/long-path",
    "customSlug": "my-link",
    "expiryDays": 30,
    "preview": false
  }'
POST /api/shorten owner
Shorten and link to your browser. Include both owner headers so the link appears in My Links. Your hash is shown in the My Links tab after creating a first link via the UI.
curl -X POST https://YOURDOMAIN/api/shorten \
  -H 'Content-Type: application/json' \
  -H 'X-Fingerprint: "YOUR_RAW_FINGERPRINT"' \
  -H 'X-Owner-Hash: YOUR_OWNER_HASH' \
  -d '{
    "url": "https://example.com/long-path"
  }'
POST /api/lookup public
Retrieve metadata for a single slug. Returns destination URL, access count, expiry, and preview mode. Private fields (creator IP, UA, full access log) are only returned to the owner or admin.
curl -X POST https://YOURDOMAIN/api/lookup \
  -H 'Content-Type: application/json' \
  -d '{ "slug": "ab3x" }'
POST /api/lookup public
Batch lookup up to 50 slugs in a single request. Returns a results array and a notFound array for any slugs that don't exist.
curl -X POST https://YOURDOMAIN/api/lookup \
  -H 'Content-Type: application/json' \
  -d '{ "slugs": ["ab3x", "yz9q", "my-link"] }'
GET /api/mylinks owner
List all links owned by your browser. Returns slug, destination, access count, and a redacted access log (datetime, country, browser/OS — no IP addresses).
PATCH /api/mylinks owner
Toggle preview mode on one of your own links.
DELETE /api/mylinks owner
Delete one of your own links. You can only delete links you own.
GET /api/admin admin
List all shortened links with full metadata including creator IP, full user-agent, and complete access logs.
curl https://YOURDOMAIN/api/admin \
  -H 'Authorization: Bearer YOUR_ADMIN_KEY'
DELETE /api/admin admin
Delete a single link by slug.
curl -X DELETE https://YOURDOMAIN/api/admin \
  -H 'Authorization: Bearer YOUR_ADMIN_KEY' \
  -H 'Content-Type: application/json' \
  -d '{ "slug": "ab3x" }'
DELETE /api/admin admin
Delete multiple links in a single request. Pass an array of slugs — all are validated first, then deleted in parallel. Maximum 500 slugs per call.
curl -X DELETE https://YOURDOMAIN/api/admin \
  -H 'Authorization: Bearer YOUR_ADMIN_KEY' \
  -H 'Content-Type: application/json' \
  -d '{ "slugs": ["ab3x", "yz9q", "my-link"] }'
DELETE /api/admin admin
⚠ Permanently purge every link in the database. Irreversible.
curl -X DELETE https://YOURDOMAIN/api/admin \
  -H 'Authorization: Bearer YOUR_ADMIN_KEY' \
  -H 'Content-Type: application/json' \
  -d '{ "purgeAll": true }'

Frequently asked questions

Do I need an account to shorten a link?

No. b0x.nz uses a device key stored in your browser instead of accounts. That key lets you view, edit, and delete the links you created from the My Links tab, without signing up or logging in.

How long do shortened links last?

You choose an expiry when you create a link: 30, 60, 90, 180, or 365 days. After that, the link is automatically removed.

Are shortened links checked for malware or phishing?

Yes. Destination URLs are checked against Google Safe Browsing when a link is created, and every stored link is automatically rescanned daily; links that are later flagged are deactivated.

Can I see where a short link goes before clicking it?

Yes — use the Preview URL tab to look up a short link's destination without visiting it. Link creators can also turn on a preview interstitial that shows the destination with a short countdown before redirecting.

Is b0x.nz open source?

Yes, it's MIT-licensed and free to self-host on Cloudflare Pages, Workers, and KV.