Keep the goal narrow
Share one task-specific artifact: Readable snippets with language-aware highlighting and raw links.
A useful code paste preserves exact whitespace while giving the reader enough context to understand, run, or review the snippet. It is best for one focused artifact, not a substitute for a multi-file repository.
Use these three checks before you turn share code into a link for another person.
Share one task-specific artifact: Readable snippets with language-aware highlighting and raw links.
Recommended first step: Select the exact language mode
Before upload: Review the share code checklist below to replace live values while preserving the context a recipient needs.
Share code tip: How to share code online adds this format-specific context: Build a focused, formatted example that a reviewer can reproduce.
A well-scoped share code artifact preserves the task-specific context below and can expire when that task ends.
Reduce the problem to one runnable snippet, then add the runtime version, exact command, expected result, and actual result.
Share the relevant function or diff with a stable line reference while the durable change remains in version control.
Use an expiring unlisted link for a bounded exercise, and remove company data, private test fixtures, and hidden credentials.
Do not paste repository secrets, proprietary modules you cannot distribute, or a multi-file project that needs build assets. Use a repository or approved review system for those.
For share code, a made-up but representative example is safer than a production export. Expiration can end future access to the source link, but it cannot recall a recipient’s copy.
Compare privacy controls →For a private share code artifact, encrypted mode applies AES-GCM in the browser before upload. Its key stays after # in the share URL and outside the normal server request.
Understand client-side encryption →Practical answers about the access, retention, and context choices for share code.
No. It changes only how tokens are displayed. The raw view preserves the submitted text.
Use a repository when the example needs multiple files, dependencies, version history, tests, or ongoing collaboration.