Code · .js, .mjs, .cjs
Share source code as a link
Share code online as a clean, syntax-highlighted page with line numbers, linkable line ranges and copy. Cleaner than a paste, quicker than a repo.
Drop a source file
Python, TypeScript, Go, SQL, YAML and dozens more
By uploading you agree to the Terms and Acceptable Use.
- Free
- Up to 50 MB
- No signup to share
- Keep links 30 days with a free account
Code that reads like code
Pasting code into chat mangles indentation, and a repository is overkill for one script. Upload the file and anyshare highlights it for its language, picked from the extension, numbers every line and gives readers a copy button.
Point at the part that matters: line ranges are linkable, so you can send a link straight to the function you’re asking about. ?raw returns the plain file for curl or wget.
Diffs and patches (.diff, .patch) work too, which makes it easy to show a reviewer what your agent changed before you merge it. Logs (.log) open on a readable page that keeps their terminal colors.
When it’s shared
How shared code looks
Syntax-highlighted source with line numbers, linkable line ranges and copy.
- Highlighting picked from the extension
- Line numbers and line-range links
- Copy and raw view
- Diffs and logs readable too
How to
Share code in three steps
- Step 1:
Drop the file or folder
One script, or a whole folder: without an index.html, a folder becomes a browsable tree where every file opens highlighted.
- Step 2:
Link to the right lines
Open the page and link to the line range you want to discuss, so the reader lands right on it.
- Step 3:
Send it with your question
Paste it into the issue, the review or the chat. Readers don’t need a GitHub account.
The details
Code details
Dozens of languages
.js, .mjs, .cjs, .ts, .mts, .cts, .py, .rb, .go, .rs, .java, .kt and many more, plus files named
DockerfileandMakefile.Displayed, never executed
Source files are shown, not run. The exceptions are HTML pages and single-file React components, which are meant to run.
Secrets stay home
The CLI and the local MCP server refuse
.envfiles, private keys and similar files, and skip them when sharing a folder.Update the same link
Iterating on a fix?
npx @anyshare/cli update <slug> fix.pykeeps the URL, so your earlier message still points at the latest code.
Other ways
Compared with the usual tools
- Pastebin
- Fast for text snippets, with expiry options and many languages. Pastes are text only, so a folder, an image or a rendered page needs another tool. Compare.
- GitHub Gist
- Versioned, forkable and open to comments, tied to a GitHub account. The better choice when people should fork or discuss the code. Compare.
FAQ
Questions, answered.
Which languages are highlighted?
Can I link to specific lines?
Will anyone run my code?
Can my agent share a diff before I merge?
git diff to a .diff file and share it with anyshare. Reviewers get a readable page without checking out the branch.How long does a code link last?
Your next link is one drop away.
No signup, no setup. Drop it above and share it in seconds. Links last 1 hour; keep them 30 days with a free account.





