# Tinypaste
Tiny public Markdown pastebin.
- Rendered Markdown, Mermaid as zoomable SVG via [Pele](https://pele.run), LaTeX math
- No account. No token.
- Works from any shell, script, or agent.
- Runs on Cloudflare's free plan: a Worker, with pastes in a D1 database.
- RaggioProietto palette: coral accents, hairline borders, Inter and JetBrains Mono, light and dark from your system setting
Most paste tools are cluttered editing environments that require an account or token and don't render Markdown, Mermaid, and LaTeX all in one. This one is for quickly sharing: paste Markdown, get a short public URL, move on.
Example: https://tnypst.xyz/6XvGcED
## API
POST Markdown. The default response is the short URL. A paste can be up to 128 KiB of UTF-8; a larger one gets HTTP 413. Posting Markdown that is already on tinypaste returns that paste's URL, with HTTP 200 instead of 201. Pastes stay out of search engines.
```sh
curl -X POST https://tnypst.xyz/api/pastes \
-H "Content-Type: text/plain" \
--data-binary '# hello'
```
```sh
curl -X POST https://tnypst.xyz/api/pastes \
-H "Content-Type: application/json" \
-H "Accept: application/json" \
-d '{"markdown":"# hello\n\n- one\n- two"}'
```
```sh
curl -X POST https://tnypst.xyz/api/pastes \
-H "Content-Type: text/markdown" \
--data-binary @README.md
```
## Deploy your own
Deploy it to your own Cloudflare account; it fits the free plan. Pages render in the browser, so the Worker only stores and serves Markdown. Setup, settings and limits are in [DEPLOY.md](https://github.com/martinopiaggi/tinypaste/blob/main/DEPLOY.md).
## Raycast
Easy to integrate with existing tools. Here's the script to use it with [Raycast](https://www.raycast.com).

```pwsh
#!/usr/bin/env pwsh
$content = Get-Clipboard -Raw
if ([string]::IsNullOrEmpty($content)) {
Write-Output "Clipboard is empty"
exit 1
}
try {
$url = Invoke-RestMethod -Uri "https://tnypst.xyz/api/pastes" `
-Method Post `
-ContentType "text/plain" `
-Body $content
} catch {
Write-Output "Failed: $_"
exit 1
}
Set-Clipboard -Value $url
Write-Output "Copied: $url"
```
## Legal
The instance at https://tnypst.xyz is live and free. Do not paste secrets, private data, illegal material, or content you do not have the right to publish. Pastes are public.