Tutorial & API Guide

Learn how to use PasteShare for sharing code snippets, text, and files with ease and security.

Getting Started

PasteShare is a free, fast, and secure pastebin service built on Cloudflare Workers. You can use it to share code snippets, text documents, and files with others quickly and easily.

1Basic Usage

  1. 1Paste your code or text in the editor
  2. 2Choose your programming language for syntax highlighting
  3. 3Set expiration time (optional)
  4. 4Add password protection (optional)
  5. 5Click "Create Paste" to generate a shareable link

API Documentation

Create a Paste via API

You can create pastes programmatically using our REST API:

curl 'https://as.al/api/create' \
  --data-raw '{
    "content": "console.log('Hello World!');",
    "language": "javascript",
    "expire": 3600,
    "isPrivate": false
  }' \
  --header 'Content-Type: application/json'

API Parameters

contentrequired

The text/code content to share

languageoptional

Programming language for syntax highlighting

expireoptional

Expiration time in seconds

isPrivateoptional

Whether to password protect the paste

share_passwordoptional

Custom password for private pastes

Supported Languages

PasteShare supports syntax highlighting for a wide variety of programming languages and file formats:

JavaScript
TypeScript
Python
Go
C/C++
Java
PHP
Ruby
Rust
Shell
JSON
YAML
Markdown
CSS
HTML
SQL

Open Source

Contribute to PasteShare

PasteShare is open source and available on GitHub. We welcome contributions, bug reports, feature requests, and feedback from the community. Help us make PasteShare even better!