Building a Privacy-First URL Shortener on Blockchain
Description and use
A privacy‑first URL shortener that encrypts links client‑side and stores them on a blockchain, preventing server‑side tracking and data breaches.
Problem
Traditional URL shorteners log IPs, timestamps, user agents, track browsing patterns, and sell data, creating a privacy nightmare and central database vulnerability.
Outcome
A fully functional, privacy‑first URL shortener that stores only encrypted URLs on a blockchain, eliminating server‑side tracking and central data breaches.
Workflow
- 1. User enters a URL in the client UI.
- 2. Client generates a random IV and AES‑GCM key using Web Crypto API.
- 3. Client encrypts the URL buffer with the key and IV.
- 4. Client sends the encrypted payload to a Cloudflare Worker endpoint.
- 5. Worker writes the encrypted data to the Cronos blockchain via a smart contract or storage API.
- 6. Worker returns a short code to the user.
- 7. When the short code is accessed, the Worker fetches the encrypted payload from the blockchain.
- 8. The browser decrypts the payload locally with the stored key, revealing the original URL.
- 9. Browser redirects to the decrypted destination URL without exposing it to the server.
Evidence
Encrypted URL stored on Cronos blockchain
Server never sees destination URLs
- Record date: 2026-09-06T16:36:48.225Z