Documentation

Everything you can do with Pastyx

A fast, account-free markdown pastebin. This guide walks through every paste setting and every supported markdown feature — each with a live, rendered example you can copy.

01

Overview

Pastyx turns markdown into clean, shareable pages. Open the home page, write or paste your content in the editor, tweak the optional settings, and hit Create paste to get a permanent, SEO-friendly link — no sign-up, no ads.

Under the hood, your markdown is rendered with GitHub-Flavored Markdown plus a generous set of extensions (math, callouts, spoilers, footnotes, definition lists, emoji and more), then sanitized before it ever touches a browser.

02

Creating Pastes

The editor has three modes — Write, Preview and Split — so you can see the rendered output as you type. Use the toolbar buttons or keyboard shortcuts to format text, insert links, code, tables and more.

Below the editor, the action row exposes the paste settings (title, expiry, password, edit key and burn-after-read — all detailed in the next section). When you're happy, press Create paste and you'll be redirected to its URL, ready to share.

03

Paste Settings

Every setting is optional — a blank form still produces a valid paste. Here's exactly what each one does and when to reach for it.

Title & Author

Labels your paste and shapes its URL

The title is shown as the page heading and is used for the link preview (Open Graph) when you share the URL. If you provide one, it's also slugified into the paste ID — e.g. Release Notes/release-notes-aB3z. Leave it blank and the paste gets a short random ID.

The author is an optional byline shown under the title. If it looks like a Telegram handle, it's also emitted as a telegram:channel tag for richer link previews.

Expiry

Auto-delete after a set time

Choose how long the paste lives: Never (default) or a window from 10 minutes up to 1 year. Expired pastes are removed the next time anyone tries to open them, and the page shows an “expired” notice.

Tip: combine a short expiry with a password for time-boxed, private shares.

Password

Gate the content behind a secret

Set a password and visitors must enter it before any content is revealed. The content is never included in the initial page load — it's fetched only after the password is verified server-side, so protected pastes are also excluded from the raw endpoint and from search-engine indexing.

Passwords are hashed; they cannot be recovered if lost.

Edit Key

The only way to change a paste later

Pastes are immutable unless you set an edit key when creating them. Keep the key safe — visiting /edit/your-id and entering it lets you update the content, title, expiry, password and burn-after-read, or delete the paste entirely.

The view password (if any) is not required to edit — the edit key is separate and cannot be recovered.

Burn After Read

Self-destruct on first view

When enabled, the paste is permanently deleted the first time it's opened. Perfect for one-time secrets like credentials or invite links. The viewer sees the content once; any later visit returns “not found”.

04

Viewing & Sharing

Open a paste at /your-paste-id. The page shows the title, author, view count, expiry and rendered markdown, plus an action row to Copy the source, Share the link, open the Raw text, or jump to Edit. Password-protected pastes prompt for the password first.

Links unfurl nicely on social platforms and Telegram (with an Instant View-friendly body), and the first image in your markdown is automatically used as the preview image.

05

Editing Pastes

Click Edit on a paste or visit /edit/your-paste-id. You'll be asked for the edit key. Once verified, you can rewrite the content, change the title or expiry, set/clear the password, toggle burn-after-read, rotate the edit key, or delete the paste for good. There's no undo on delete, so be deliberate.

06

Markdown Reference

Pastyx speaks GitHub-Flavored Markdown plus the extensions below. Each example is rendered live by the exact pipeline your pastes use — what you see is what you'll get.

Text Formatting

Combine inline marks freely. Beyond standard bold/italic, Pastyx adds ++underline++, ==highlight==, superscript ^x^ and subscript ~x~.
Markdown
**bold**, _italic_, ++underline++,
~~strikethrough~~, ==highlight==,
E=mc^2^ (super), H~2~O (sub),
`inline code`
Rendered

Headings

Use one to six # characters. Headings get anchor IDs automatically so you can deep-link to a section.
Markdown
# Heading 1
## Heading 2
### Heading 3
#### Heading 4
Rendered

Lists & Tasks

Unordered (- / *), ordered (1.) and GitHub-style task lists (- [ ] / - [x]) are all supported, including nesting.
Markdown
- Bullet one
- Bullet two
  - Nested bullet

1. First
2. Second

- [x] Done item
- [ ] Todo item
Rendered
Standard [text](url) links and ![alt](url) images. To size an image, append =WxH after the URL (powered by markdown-it-imsize): =120x80 sets both, =120x width only, =x80 height only.
Markdown
[Visit Pastyx](https://pastyx.pages.dev)

![Logo](https://placehold.co/240x120/2563eb/ffffff?text=Pastyx)

Resize with =WxH:
![Sized](https://placehold.co/400x400/0d9488/ffffff?text=Resize =120x80)
Rendered

Code

Wrap inline code in backticks. Fenced blocks (```) are syntax-highlighted with markdown-it-highlightjs, and include line numbers, a language label and a one-click copy button.
Markdown
Inline `const x = 1` code.

```js
function greet(name) {
  return `Hello, ${name}!`;
}
```
Rendered

Math (KaTeX)

New: LaTeX math is rendered by KaTeX. Use $…$ for inline and $$…$$ for centered block equations. (On Telegram Instant View, math gracefully falls back to the raw LaTeX inside a code span.)
Markdown
Inline math: $E = mc^2$ and $\frac{a}{b}$.

Block math:

$$\int_{0}^{\infty} e^{-x^2}\,dx = \frac{\sqrt{\pi}}{2}$$
Rendered

Tables

Pipe tables with an optional alignment row (:--, :-:, --:). On small screens they scroll horizontally.
Markdown
| Feature | Supported |
| ------- | :-------: |
| Tables  | ✅ |
| Align   | ✅ |
Rendered

Quotes & Callouts

Blockquotes use >. Callout blocks use ::: color::: and support 16 colors (gray, green, blue, yellow, orange, red, purple, pink, cyan, teal, indigo, lime, amber, brown, black, white).
Markdown
> A normal blockquote.

::: blue
**Note:** callouts come in 16 colors.
:::

::: red
**Warning:** use them to draw attention.
:::
Rendered

Definitions & Footnotes

Definition lists use Term then : Definition. Footnotes use [^id] for the reference and [^id]: text for the note; Pastyx also supports abbreviation tooltips via *[ABBR]: Expansion.
Markdown
Markdown
:   A lightweight markup language.

Here is a footnote reference[^1].

[^1]: And here is the footnote body.
Rendered

Spoilers

Wrap text in ||…|| to hide it behind a click-to-reveal bar — great for spoilers, answers, or sensitive snippets inside otherwise public content.
Markdown
Plot twist: ||the cake is a lie||.

Click the blurred bar to reveal it.
Rendered

Emoji

Type :shortcode: to insert emoji (e.g. :rocket: → 🚀). Unicode emoji you paste directly work too.
Markdown
Ship it :rocket: :tada:
Looks good :+1: :fire:
Rendered

Fonts & Alignment

A few safe HTML helpers are allowed: <center>, <right> and <font name="…"> for a custom typeface. Everything is sanitized, so scripts and unsafe attributes are stripped.
Markdown
<center>Centered text</center>

<font name="Inter">Custom font face</font>

<right>Right-aligned</right>
Rendered
07

Keyboard Shortcuts

The editor supports the usual formatting shortcuts plus find & replace.

BoldCtrl / ⌘ + B
ItalicCtrl / ⌘ + I
UnderlineCtrl / ⌘ + U
StrikethroughCtrl / ⌘ + Shift + S
Insert linkCtrl / ⌘ + K
Find & replaceCtrl / ⌘ + F
Find & replaceCtrl / ⌘ + Shift + F
Toggle previewCtrl / ⌘ + /
UndoCtrl / ⌘ + Z
RedoCtrl / ⌘ + Shift + Z
Next matchEnter (in Find)
Previous matchShift + Enter (in Find)
Replace currentEnter (in Replace)
Close find / exit fullscreenEsc
08

API Reference

Pastyx exposes a REST API under /api. All endpoints return JSON unless noted; errors return { "error": "…" } with an appropriate status code.

POST /api/paste

Create a new paste.

http
POST /api/paste
Content-Type: application/json

Request Body

ParameterTypeRequiredDescription
contentstringYesThe paste content (max 1MB)
titlestringNoOptional title; slugified into the paste ID when present
authorstringNoOptional author name
expirystringNoOne of "never", "10min", "1hour", "1day", "1week", "1month", "1year" (default: "never")
passwordstringNoPassword to protect the paste
editKeystringNoSecret key for editing or deleting later
burnAfterReadbooleanNoDelete after first view (default: false)

Response

json
{
  "id": "demo",
  "title": "Demo",
  "author": "@PastyX",
  "expiresAt": null,
  "hasPassword": false,
  "hasEditKey": true,
  "url": "https://pastyx.pages.dev/demo"
}

GET /api/paste/:id

Fetch a paste and its content. Counts a view.

http
GET /api/paste/:id
GET /api/paste/:id?password=yourpassword

Query

ParameterTypeRequiredDescription
passwordstringNoRequired if the paste is password-protected

Response

json
{
  "id": "demo",
  "title": "Demo",
  "author": "@PastyX",
  "content": "console.log(\"Hello, World!\");",
  "expiresAt": "2024-01-22T12:00:00.000Z",
  "hasPassword": false,
  "hasEditKey": true,
  "views": 5,
  "createdAt": "2024-01-15T12:00:00.000Z",
  "updatedAt": "2024-01-15T12:00:00.000Z",
  "burnAfterRead": false
}

Error responses

json
// 404 — not found or expired
{ "error": "Paste not found" }

// 401 — password required / wrong password
{ "error": "Password required", "passwordRequired": true }
{ "error": "Invalid password", "passwordRequired": true }

PUT /api/paste/:id

Edit a paste. Requires the edit key (the view password is not needed to edit).

Request Body

ParameterTypeRequiredDescription
editKeystringYesThe edit key set when the paste was created
titlestringNoNew title
contentstringNoNew content
expirystringNoNew expiry keyword
passwordstringNoNew view password
newEditKeystringNoChange the edit key
burnAfterReadbooleanNoToggle burn-after-read

Response

json
{ "success": true, "id": "demo", "title": "Updated", "content": "new content" }

DELETE /api/paste/:id

Delete a paste. Requires the edit key.

json
// request
{ "editKey": "the-edit-key" }

// response
{ "success": true }

GET /api/paste/:id/raw

Get the raw content as text/plain. Password-protected pastes are not accessible here (returns 404). Response headers include X-Paste-Title (URL-encoded) and Cache-Control: no-cache.

http
GET /api/paste/demo/raw
09

FAQs

Is Pastyx free to use?

Yes — Pastyx is completely free. There are no usage limits, no accounts required, and no ads.

Do I need an account to create a paste?

No account is needed. Just paste your content and hit Create. Optionally set an edit key if you want to modify or delete the paste later.

How do I edit or delete a paste?

Set an Edit Key when creating the paste. Visit the paste URL, click Edit, enter your key, and you can update content or delete the paste permanently.

Can I password-protect a paste?

Yes. Enter a password in the Paste Settings before creating. Anyone who visits the URL will be prompted to enter the password before the content is revealed.

What is Burn After Read?

Enable Burn After Read to have the paste automatically deleted the first time it is viewed. It is useful for sharing sensitive one-time information.

Does Pastyx support LaTeX math?

Yes. Inline math with $…$ and block math with $$…$$ are rendered by KaTeX. See the Math section of the Markdown Reference.

Is there an API?

Yes — a full REST API is available. See the API Reference section.

How long are pastes stored?

By default, pastes never expire. You can set an expiry (10 minutes to 1 year) in the Paste Settings. Expired pastes are deleted when next accessed.

Is my data private?

Pastes are not listed publicly and are accessible only by their unique URL. Password-protected pastes add an extra layer of security.

What is the maximum paste size?

The maximum paste content size is 1MB.