Markdown Snippets: Compressed, encrypted, serverless, & private pastebin with a complimentary CLI.*
A high-compression Markdown sharing tool that lives entirely in the URL. No databases, no accounts, no server persistence. Your data is encrypted and stored only in the url so server has no knowledge and access to it.
Share beautiful, rendered documents with others safely and instantly.
- Generate link: Run
mdsnip docs.mdor use the Web Editor. - Compress & Encrypt: Content is optimized using DEFLATE and can be password-protected with AES-GCM.
- Share: Get an instant URL where the content is embedded in the hash fragment.
- View: Your recipient clicks the link and decompress/decrypts the content locally in their browser using WebAssembly.
The command-line companion for power users.
Download the latest binary for your platform from Releases.
# Example for Linux/macOS
tar -xzf mdsnip_vX.X.X_linux_amd64.tar.gz
sudo mv mdsnip /usr/local/bin/# Copy a shareable link to clipboard
mdsnip document.md | wl-copy
# Encrypted sharing (prompts for password)
mdsnip -e secret.md
# Create a link from piped content
cat Doc.md | mdsnip
# Decrypt and view an mdsnip URL in terminal
mdsnip "https://5hubham5ingh.github.io/mdsnip/#.compressed_data..."
# View shared link for the Markdown in terminal
wl-paste | mdsnipA minimalist, premium editor and renderer built with performance and privacy in mind.
- Zero-Storage: Your data never touches a server disk.
- WASM Engine: Blazing fast decompression and decryption via WebAssembly.
- Smart Outline: Automatic Table of Contents sidebar for easy navigation.
- Zen Mode: A distraction-free, full-screen writing experience.
- Secure Modals: Custom themed dialogs for password entry that respect browser security policies.
- Live Toggle: Effortlessly switch between WYSIWYG editing and clean preview.
- Keyboard driven: Access all features with keyboard shortcuts.
| Shortcut | Action |
|---|---|
Ctrl + Space |
Toggle between Edit & View mode |
Ctrl + Enter |
Share / Generate Link |
Ctrl + Shift + L |
Switch Theme (Light/Dark) |
Ctrl + Shift + Z |
Toggle Zen Mode |
Ctrl + Shift + S |
Toggle Sidebar/Outline |
Why does this exists?
Before this tool, I use to write documents in Markdown using Nvim. Sharing this would require following steps:
- Copy the Markdown content.
- Open browser.
- Open google docs.
- Create new document.
- Right click and paste as Markdown.
- Change document access permission.
- Copy the shareable URL.
- Paste it in messaging app like Teams.
Using this tool, now I follow these steps.
- Run
mdsnip document_file_name.md | wl-copy- Paste it in Teams.
Why not just paste the Markdown content directly in messaging app?
- It makes the chat history dirty and external document is preferable over it.
- The shareable link is only visible in single line as most chat app show only a portion of it from the start.
- It is much easier and quicker to search from links saved as bookmarks in the browser than open google docs and search them.
- The links are auto saved as browser history for easy recoverability.
What about the URL length limit?
- Server-side: Where limits are most restrictive, but irrelevant here as URL hashes (
#) stay on the client and never reach the server.- Chromium based browsers (Chrome/Edge/Brave): Very generous (~2,000,000 characters).
- Firefox: Effectively unlimited.
The project uses a unified build system for the CLI (Multi-platform Go) and the Web App (Go/WASM + Minification).
# Build all platforms + WASM
./build.sh
# Build only for your current system
./build.sh -1- Compression: flate (DEFLATE Level 9)
- Encryption: AES-GCM (256-bit)
- Encoding: Base64 Raw URL Encoding
- Frontend: Vanilla JS + OverType + WebAssembly
- Security: Local-only decryption. Passwords are never sent to any server.