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.

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

  1. 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.

  2. 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.

  3. 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 Dockerfile and Makefile.

  • 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 .env files, 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.py keeps 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?
Most languages you’ll meet: JavaScript and TypeScript, Python, Go, Rust, Java, Kotlin, Swift, C and C++, C#, Ruby, PHP, shell, SQL, YAML, TOML, Terraform and more. The extension decides the language.
Can I link to specific lines?
Yes. Line ranges are linkable, so the link opens with the lines you chose highlighted.
Will anyone run my code?
No. Source files are displayed, never executed. Only HTML pages and .jsx or .tsx components run, because that’s what they’re for.
Can my agent share a diff before I merge?
Yes. Ask it to save 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?
Without an account a link lasts 1 hour; keep it with a free account and it lasts 30 days from the upload. Then the file is deleted.

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.