
Zero-knowledge encrypted pastebin. Your data is encrypted before it leaves your browser.
Your data is encrypted before it leaves your browser. We can't read it. No one can.
Traditional pastebins store your data in plaintext. Server admins, hackers, or anyone with database access can read everything you share.
CloakBin is different.
┌─────────────────────────────────────────────────────────────────┐
│ ZERO-KNOWLEDGE FLOW │
├─────────────────────────────────────────────────────────────────┤
│ │
│ YOUR BROWSER SERVER DATABASE │
│ ──────────── ────── ──────── │
│ │
│ "secret msg" │
│ │ │
│ ▼ │
│ ┌─────────┐ │
│ │ ENCRYPT │ AES-256-GCM │
│ │ locally │ (browser) │
│ └────┬────┘ │
│ │ │
│ ▼ │
│ "a3f8b2c1..." ───────► "a3f8b2c1..." ───► "a3f8b2c1..." │
│ (ciphertext) (ciphertext) (ciphertext) │
│ │
│ KEY stays in URL fragment (#) │
│ example.com/p/abc#KEY ◄── never sent to server │
│ │
└─────────────────────────────────────────────────────────────────┘
The encryption key lives in the URL fragment (#), which browsers never send to servers. Even if our database is compromised, attackers only get meaningless ciphertext.
| Component | What it sees |
|---|---|
| Your Browser | ✅ Plaintext (you control it) |
| Network/ISP | 🔒 Encrypted ciphertext only |
Cryptographic Details:
crypto.getRandomValues)Don't take our word for it — the guarantee is verifiable in your browser:
POST request that saves the paste and look at its request body. You'll see only ciphertext and a salt — never your plaintext, and never the encryption key.# (the URL fragment). By web standard, browsers never send the fragment to the server — it stays client-side.#fragment.Because the key only ever exists in the fragment and in your recipient's browser, the server (and its database, and anyone on the network) only ever sees encrypted blobs. There is no server-side code path that can read your content — even under subpoena, only ciphertext exists to hand over.
# Clone
git clone https://github.com/Ishannaik/CloakBin.git
cd CloakBin
# Install
pnpm install
# Configure
cp .env.example .env
# Edit .env with your MongoDB URI
# Run
pnpm dev
MONGODB_URI=mongodb://localhost:27017/cloakbin
ADMIN_USER=admin
ADMIN_PASS=your-secure-password
src/
├── lib/
│ ├── components/ # UI components
│ ├── db/ # Database adapters
│ └── crypto.ts # Encryption (AES-256-GCM, PBKDF2)
├── routes/
│ ├── +page.svelte # Create paste
│ ├── p/[id]/ # View paste
│ ├── api/ # REST endpoints
│ └── admin/ # Admin dashboard
└── app.html
CloakBin is fully open source. Deploy your own instance:
PRs welcome! Please:
GNU Affero General Public License v3.0 (AGPL-3.0) - see LICENSE
If you run a modified version of CloakBin as a network service, AGPL §13 requires you to offer the modified source to your users.
Your secrets deserve real privacy.
Made by Ishan Naik
| CloakBin Server | 🔒 Encrypted ciphertext only |
| Database | 🔒 Encrypted ciphertext only |
| URL Recipient | ✅ Plaintext (they have the key) |
| Layer | Technology |
|---|
| Framework | SvelteKit 2.0, Svelte 5 |
| Language | TypeScript |
| Styling | Tailwind CSS 4.0 |
| Database | MongoDB |
| Encryption | Web Crypto API |
| Editor | CodeMirror 6 |
| Hosting | Vercel |