Sharing a snippet

Turning playground code into a link, why signing in makes it permanent, what happens when somebody opens yours, and the one thing you cannot do afterwards.

View as .md

Share in the playground turns what is in the editor into a link anybody can open. No account needed, and the person opening it needs one even less.

The link carries the code, the language, and the input you had in the Input panel.

This is the whole difference, and it is worth knowing before you paste a link into something durable.

Signed outSigned in
The link lasts90 daysforever
Links you can create a day50200

The dialog tells you which you are getting. It shows an expiry date only when there is one - rather than showing a date to somebody whose link will never expire.

What somebody sees when they open yours#

The snippet loads into a playground with a quiet line saying the code belongs to somebody else.

That line matters more than it looks: without it a share link is indistinguishable from your own playground, and the visitor presses Reset expecting their own file back.

The runtime version captured when you shared is shown, not today's. A snippet shared before a language was updated can still say what its author actually ran.

Forking#

Fork copies the snippet into the visitor's own playground so they can edit and run it as their own.

It is the one action that writes to their drafts, so when they already have work in that language it asks first rather than overwriting it.

Reset#

On a shared snippet, Reset restores the author's code and their input - not a blank starter file. "Undo my edits" there means back to what you were sent, which is the only reading that makes sense when you are looking at somebody else's work.

Fork first if you intend to keep your changes.

What you cannot do afterwards#

Snippet or project?#

Use a snippetUse a project
One file
Several files, or a folder structure
Somebody should be able to run it in one click
You want to keep working on it
You want to take the share link down later

Sharing a project is covered in sharing a project, and it has the visibility controls a snippet does not.

Was this page helpful?

Last checked against the product on . Behaviour changes are listed in the changelog.