Code Share
What is a Code Share?
Code Share creates a shareable link for a snippet without storing it on any server. The code is compressed and encoded directly into the URL, so whoever opens the link sees exactly what you shared. There is no account, no database and nothing to expire or be deleted later.
How to use it
- Paste your code and choose the language for syntax highlighting.
- Generate the link.
- Send the link in chat, an issue or an email. Opening it shows the snippet.
How it works
The text is compressed with a deflate-style algorithm and encoded with a URL-safe alphabet, then placed in the URL, typically after the # fragment. Browsers do not send the fragment to the server when loading a page, so the code is decoded entirely in the recipient's browser.
Advantages over a pastebin
- Privacy: no copy of your code sits on a third-party server.
- Permanence: the link works as long as the page exists, because the content is in the link.
- No sign-up and nothing to clean up.
Limitations
- URL length. Most browsers handle very long URLs, but chat apps, email clients and link shorteners may truncate them. Keep snippets to a few hundred lines.
- Anyone with the link can read the code. The content is encoded, not encrypted. Do not share secrets, API keys or credentials this way.
- Links cannot be edited. Changing the code produces a new link.
Frequently Asked Questions
Where is my code stored?
Nowhere on a server. It is compressed into the link itself and decoded in the browser of whoever opens it.
Is the shared code encrypted?
No, only compressed and encoded. Anyone with the link can read it, so never share secrets this way.
Why does my link not work in some apps?
Very long URLs can be truncated by chat or email apps. Share smaller snippets or use a file for large code.
Do links expire?
No. The content is inside the link, so it works as long as the tool is available.