Code sharing guide
How to share code online without losing readability
Sending code is easy. Sending it in a form that is still readable, copyable and useful to both people and tools takes a little more structure. A paste gives the snippet a stable page and keeps the code separate from the conversation around it.
Use a dedicated code-sharing link when formatting matters
Chat apps and issue trackers are convenient, but long snippets can become hard to scan. A dedicated paste keeps indentation intact, avoids accidental formatting changes and gives the recipient one URL they can reopen later. It also keeps the surrounding discussion shorter.
Choose the correct language for syntax highlighting
Syntax highlighting makes structure visible at a glance. Keywords, strings, comments and punctuation become easier to distinguish, which helps when reviewing a bug report, configuration file or small implementation example. Wklejka uses syntax-aware rendering for supported languages and can also display Markdown.
Pick visibility before you send the URL
Public is appropriate for snippets you are comfortable making discoverable. Unlisted is better for link-only sharing. Password-protected pastes add a shared secret, while private pastes are tied to account access. The safest default is to use the narrowest visibility that still supports the people who need the snippet.
Read the private code sharing guide →Use raw text for tools and automation
A rendered paste page is made for people. Raw output is made for tools. A raw route can be fetched by curl, a script or another program without scraping the surrounding HTML. This is useful for quick configuration sharing and automation, provided the paste visibility allows raw access.
curl https://refil.cc/r/your-paste-idGive the snippet enough context
A descriptive title and the right language often matter more than adding lots of explanation. If the snippet depends on a framework version, environment variable or specific error, include that context in the surrounding conversation or a short comment in the paste. Avoid sharing credentials, tokens or secrets in any paste unless the system and visibility model are explicitly designed for that use.
Use the API when code sharing becomes part of a workflow
If pastes are created by bots or tools, manual copy-and-paste becomes the bottleneck. Wklejka provides a versioned REST API for account-scoped paste and folder operations, with documented authentication and rate-limit behavior.
Open API documentation →Share a snippet now
Create the paste, select its language and visibility, then send the generated link. Public snippets can appear in Explore; restricted modes stay out of public discovery.
FAQ
What is the easiest way to share a code snippet online?
Create a paste, choose the programming language and visibility, then send the generated URL. For scripts and command-line tools, use a raw link when the paste allows it.
Should code snippets be public or unlisted?
Use public only when discovery and search indexing are appropriate. Use unlisted when you want link-only sharing, and use protected or private modes when access needs to be narrower.
Why use a paste instead of sending code in chat?
A paste keeps indentation, syntax highlighting, a stable URL and raw text access intact, which is useful when chat formatting or message length makes code harder to review.