Building a Privacy-First URL Shortener on Blockchain
Source: Dev.to
Why Traditional URL Shorteners Are a Privacy Nightmare
- When you click a bit.ly link, the service logs your IP, timestamp, and user agent.
- It sees the destination URL.
- It can track your browsing patterns.
- It may sell this data to advertisers.
- Even if you trust the shortener, its database can be hacked.
Solution: cryptly – a Privacy‑First URL Shortener
I built cryptly to solve this problem using blockchain and encryption.
Encryption (Client‑Side)
const encrypted = await crypto.subtle.encrypt(
{ name: "AES-GCM", iv: iv },
key,
urlBuffer
);
Blockchain Storage
- Encrypted URL stored on the Cronos blockchain.
- Immutable and decentralized.
- No centralized database to hack.
Decryption (Browser)
- Browser fetches the encrypted payload from the blockchain.
- Decrypts locally using the Web Crypto API.
- The server never sees the destination URL.
Tech Stack
- Cloudflare Workers – serverless, edge deployment.
- Web Crypto API – native browser encryption.
- Cronos blockchain – decentralized storage.
Privacy Benefits
- ✅ Server never sees destination URLs.
- ✅ No tracking, no analytics.
- ✅ No database to leak.
- ✅ Censorship‑resistant (blockchain).
Live Demo & Source
- Demo:
- Source:
Still in early stages but feedback is welcome!
privacy #blockchain #webdev #opensource