>_$ ./<SlavBin{0x1337}/>
A simple, free, and open-source pastebin for your text files.
SlavBin is an open source pastebin service. You can find the source code on Github.
✨ Features
Syntax Highlighting: Pastes are automatically highlighted for a wide variety of programming languages, with line numbers for readability.
Password Protection: Secure your pastes with a password. Only those with the password can view the content.
Expiring Pastes: Set an expiration date for your pastes. They will be automatically deleted after the specified time.
CLI Support: Easily create pastes from your terminal using `curl` or other tools.
Dark Mode: A comfortable, dark theme for your eyes.
⏳ Document Lifetime
You have control over how long your pastes are stored. By default, all documents are set to expire after 30 days. For more temporary pastes, you can choose shorter expiration periods of 1 day or 7 days. Once a paste expires, it is permanently and irretrievably deleted from our servers.
🛡️ Privacy
Your privacy is paramount. SlavBin is designed to be a simple and anonymous service. We do not require you to create an account, and we do not collect or store any personal information, such as your IP address, browser details, or any other identifying data. Your pastes are your own.
🔐 Security
While SlavBin provides tools like password protection and expiring links, it should be treated as a public pastebin. We cannot guarantee that your documents will not be discovered by others. Therefore, we strongly advise against storing any sensitive information, such as passwords, API keys, or personal data.
🚀 API Usage
You can create a new document by sending a POST request to the /api/document endpoint. The API accepts both application/x-www-form-urlencoded (form-data) and application/json content types.
Using Form Data
The following examples use the `curl` command to create pastes with form data.
Basic Paste
curl -X POST -d "content=Hello from form-data" https://slavbin.ftp.sh/api/documentWith Password
curl -X POST -d "content=This is a secret paste" -d "password=supersecret" https://slavbin.ftp.sh/api/documentWith Expiration
You can set `expires` to `1d`, `7d`, or `30d`.
curl -X POST -d "content=This will expire in 1 day" -d "expires=1d" https://slavbin.ftp.sh/api/documentWith Password and Expiration
curl -X POST -d "content=Secret expiring paste" -d "password=supersecret" -d "expires=7d" https://slavbin.ftp.sh/api/documentUsing JSON
The following examples use the `curl` command to create pastes with JSON data.
Basic Paste
curl -X POST -H "Content-Type: application/json" -d '{"content":"Hello from JSON"}' https://slavbin.ftp.sh/api/documentWith Password
curl -X POST -H "Content-Type: application/json" -d '{"content":"This is a secret paste","password":"supersecret"}' https://slavbin.ftp.sh/api/documentWith Expiration
curl -X POST -H "Content-Type: application/json" -d '{"content":"This will expire in 1 day","expires":"1d"}' https://slavbin.ftp.sh/api/documentWith Password and Expiration
curl -X POST -H "Content-Type: application/json" -d '{"content":"Secret expiring paste","password":"supersecret","expires":"7d"}' https://slavbin.ftp.sh/api/documentFrom a File
This is the recommended method for uploading files.
Basic Upload
curl -X POST --data-urlencode "content@Dockerfile" https://slavbin.ftp.sh/api/documentWith Password and Expiration
curl -X POST --data-urlencode "content@Dockerfile" -d "password=supersecret" -d "expires=7d" https://slavbin.ftp.sh/api/documentTo upload a file's content as JSON, you need to read the file and embed its content into the JSON payload. Here's an example using shell commands: content=$(cat Dockerfile | jq -sR .) && curl -X POST -H "Content-Type: application/json" -d "{\"content\":$content}" https://slavbin.ftp.sh/api/document
Example Response
A successful request will return the following JSON response:
{
"ok": true,
"message": "succesfully created document",
"data": {
"url": "https://slavbin.ftp.sh/some-random-slug",
"length": 123,
"date": "2025-09-29T12:10:00Z",
"expire_at": "2025-09-30T12:10:00Z"
}
}Get a Document
To retrieve a document's content, you can use the `/api/document` endpoint with the document's slug as the `key` query parameter.
curl "https://slavbin.ftp.sh/api/document?key=<your-document-slug>"Get Raw Content
To get the raw content of a paste for piping or redirection.
Public Paste
curl https://slavbin.ftp.sh/raw/some-random-slugPassword-Protected Paste
curl "https://slavbin.ftp.sh/raw/some-random-slug?password=supersecret"