Codepad guides

Share code with the right kind of link.

Paste a snippet, choose its language, and send a link. Keep related files together and decide whether your recipient should edit alongside you or just view the saved code.

Send an editable snippet

  1. Create a pad and add code. You can also type directly into the homepage editor and choose share this pad.
  2. Choose the language. The language picker controls syntax highlighting. Add file tabs if the example needs more than one file.
  3. Open share and copy the edit link. A recipient who opens that URL can edit the pad. No account is required.

Use an edit link when a colleague should help fix a function, revise a SQL query, or write examples. The collaborative-editing guide walks through a JavaScript example.

Send a read-only link

  1. As the pad creator, open share and select read-only link.
  2. Copy the separate read-only URL and send that URL to your reader.
  3. Open it in another browser to check the saved files before sharing it more widely.
Codepad’s share menu showing separate editable and read-only links for an example pad.
The share menu in an example session. Generating a read-only link does not disable the edit link.

Read-only describes the reader’s permissions. It does not lock the original pad or freeze a permanent version. The read-only page loads the latest saved snapshot when opened or refreshed, so later edits may appear there too.

If you need a fixed version for a review, keep a separate copy in your own files or version control. The read-only view also offers a copy action.

Choose a link for the task

TaskUseWhat to expect
Work on a snippet togetherEdit linkAnyone with the link can edit the shared files.
Let someone read or copy codeRead-only linkReaders see a saved version and cannot edit through that link.
Share during a presentationQR code in the share menuThe QR code opens the edit link. Use it when audience editing is intended.
Show code inside another pageEmbed URLA read-only display of the first saved file. Your own page controls its size.

Embed a snippet

Use the pad ID from an edit URL in the form /pad/PAD_ID. Replace PAD_ID in this example with that ID. It is different from an editable slug or read-only token.

<iframe
  src="https://codepad.pro/embed/PAD_ID"
  title="Code example"
  width="100%"
  height="360"
  loading="lazy"
></iframe>

Embeds show the first saved file without file tabs. Check that the intended snippet appears before publishing the containing page. Embedding code makes it available to that page’s visitors.

Understand what a link shares

Shared code is accessible to people who have its link. Private notes are separate and are not included in the edit link, read-only page, or embed. Keep credentials and other sensitive material out of shared snippets.

Owned pads and notes depend on your browser’s identity cookie. Read the storage and access information for the limits of anonymous access and saving.