For a self-hosted pastebin, the strongest matches are privatebin/privatebin (PrivateBin is a zero-knowledge, self-hosted pastebin that encrypts content), vastsa/filecodebox (FileCodeBox is a self-hosted private pastebin and file-sharing service) and highlightjs/highlight.js (This is a syntax highlighting library, not a self‑hosted). isagalaev/highlight.js and googlearchive/code-prettify round out the shortlist. Each is ranked by relevance to your query, popularity and recent activity.
Open-source platforms for hosting private text and code snippet sharing services on your own infrastructure.
PrivateBin is a self-hosted, zero-knowledge text hosting service and secret sharing tool. It utilizes browser-based AES 256-bit encryption to ensure that data is encrypted on the client side before transmission, meaning the hosting server cannot read or recover the original content. The project distinguishes itself by using URL fragments to distribute decryption keys, preventing the secret key from ever being sent to the server. It supports the distribution of both encrypted text and files, which are compressed and encrypted locally prior to storage. The platform includes capabilities for an
PrivateBin is a zero-knowledge, self-hosted pastebin that encrypts content client-side using AES, supports syntax highlighting and expiration policies, and provides a JSON API, covering the core features you need.
FileCodeBox is a self-hosted service for anonymous file transfer and private content hosting. It functions as a secure distribution tool and private pastebin, allowing users to share files and text snippets through the use of unique extraction codes. The platform differentiates itself with flexible expiration logic, where shared content can be automatically invalidated based on a predefined clock time or a maximum number of downloads. It also provides direct-browser multimedia rendering to preview images, audio, and video files without requiring a full download. The system includes administr
FileCodeBox is a self-hosted private pastebin and file-sharing service that uses extraction codes and flexible expiration, and while it covers core pastebin needs like text snippet sharing and access controls, it does not explicitly mention syntax highlighting or client-side encryption.
Highlight.js is a syntax highlighting library that automatically detects and applies color-coded styling to source code blocks within web pages. It functions as a language-agnostic formatting engine, utilizing a modular processor that applies consistent visual themes to diverse programming languages based on their specific grammatical rules. By decoupling the core parsing logic from language-specific definitions, the library provides a unified execution environment that operates without requiring internal knowledge of the target language. The project is distinguished by its modular architectu
This is a syntax highlighting library, not a self‑hosted pastebin application — it can color code but provides no paste creation, storage, expiration, or self‑hosting features.
highlight.js is a JavaScript syntax highlighter and client-side code formatter that transforms plain text source code into highlighted HTML for web display. It provides syntax highlighting across a wide variety of programming languages. The library includes an automatic language detector that identifies the programming language of a code block to apply the correct highlighting rules without manual tagging. It is designed for web worker compatibility, allowing the highlighting process to run in background threads to prevent the browser interface from freezing during the processing of large vol
highlight.js is a syntax highlighting library, not a pastebin—it provides only one feature that a pastebin might use (code formatting), so it does not meet the core requirement of being a self-hostable application for sharing snippets with expiration, encryption, or an API.
Code-prettify is a browser-based tool and HTML syntax highlighter that adds visual formatting and line numbers to raw code blocks on web pages. It functions as a client-side code formatter and a customizable lexer library for defining language-specific highlighting rules. The system allows for the creation of custom lexers to provide syntax highlighting for proprietary or uncommon programming languages. Visual presentation is managed through custom code styling and the integration of external CSS stylesheets to define colors and fonts. The project provides automatic syntax highlighting and s
code-prettify is a client-side syntax highlighting library, not a self-hosted pastebin application—it lacks all core pastebin features such as snippet storage, expiration, and sharing URLs.
Chroma is a syntax highlighter written in Go that converts raw source code into colorized text or HTML. It identifies programming languages and tokens using language-specific lexers to produce highlighted output for various environments. The project utilizes a theme-driven colorization system that decouples token types from final colors through an intermediate style mapping layer. This allows for custom code theming by mapping specific token categories to foreground and background colors. The system covers language identification, terminal text formatting for ANSI-compatible viewers, and web
Chroma is a syntax-highlighting library, not a pastebin application—it only provides code colorization and lacks snippet storage, expiration, API, or self-hosting features you need.
CodeMirror is a browser-based code editor and extensible text editor framework. It functions as a programmable interface for rendering code and text with support for numerous programming languages, serving as a reusable component for web-based integrated development environments. The project provides a syntax highlighting engine that applies visual styles to text based on programming language rules. It includes a programming API and a CSS theming system to customize the editor's appearance and extend its functionality with custom behaviors. The framework covers capabilities for embedding tex
CodeMirror is a browser-based code editor framework and syntax highlighting engine, not a self-hostable pastebin application—it provides the editing component you might integrate into a pastebin, but lacks paste-specific features like expiration, encryption, or server-side storage.
ffsend is a command line client for the Firefox Send protocol, providing a secure file transfer tool for uploading and downloading encrypted files. It serves as a client-side encryption file share that ensures data is encrypted locally before being uploaded to a remote server. The tool is compatible with both public and private instances of the Send server, allowing users to redirect data transfers to self-hosted server deployments. It covers ephemeral file hosting with the ability to set expiration dates and download limits, as well as password protection for shared links. Additional capabi
ffsend is a command-line file transfer client for Firefox Send with encryption and expiration, but it is not a self-hosted pastebin application dedicated to text and code snippets, and it lacks syntax highlighting and raw text download features typical of a pastebin.
Yopass is a secure secret sharing platform used to share encrypted text and files via one-time expiring links. It utilizes client-side encryption to ensure that sensitive data is encrypted in the browser before transmission, preventing the server from seeing plain text. The platform differentiates itself through an integrated security auditing system that generates structured logs and triggers cryptographically signed webhooks when secrets are created, viewed, or expired. It also features an access control system based on OpenID Connect, allowing administrators to restrict secret creation and
Yopass is a self-hosted secret-sharing tool with client-side encryption and expiring links, but it lacks pastebin-specific features like syntax highlighting and is designed for secrets rather than code snippets, so it is a neighbouring category rather than a true pastebin.
CodeMirror 5 is a browser-based code editor and extensible UI component. It functions as a syntax highlighting engine and a programmable text surface, providing a professional coding experience embedded within web pages. The project is distinguished by its ability to act as a collaborative text editor, synchronizing document changes across multiple users in real time. It also includes a dedicated Vim emulation layer that implements modal keyboard interactions, motions, and operators. The system covers broad capability areas including language support for autocompletion and error analysis, co
CodeMirror is a browser-based code editor component that provides syntax highlighting and editing features, but it is not a self-hostable pastebin application; it would only be a small part of one's UI, not the full sharing and storage tool you need.
massCode is a local-first developer workspace application that combines a code snippet manager, a markdown knowledge base, and an HTTP client tool. It serves as a productivity suite for software engineers to consolidate reusable code fragments, technical documentation, and API collections within a single environment. The application distinguishes itself by integrating a developer utility suite for natural language calculations, sample data generation, and JSON visualization. It also includes visual project mapping capabilities, allowing users to create mind maps and sketch diagrams alongside
massCode is a local-first developer snippet manager and knowledge base, not a self-hostable web pastebin with sharing, expiration, or client-side encryption, so it does not fit this search.
Quill is a modular, web-based rich text editor designed for structured content authoring. It provides a comprehensive toolkit for building tailored editing experiences, allowing developers to manage document state, handle user input, and synchronize content through a predictable, serializable data model. The editor distinguishes itself through a custom document abstraction that maps the browser DOM to a structured tree of nodes, ensuring consistent behavior across different environments. It utilizes an operational change tracking system that represents all document modifications as a sequence
Quill is a modular rich text editor framework, not a self-hosted pastebin application — it provides editing capabilities you could use to build a pastebin, but it is not itself a ready-to-deploy snippet-sharing tool with expiration, encryption, or an API.
| Repository | Stars | Language | License | Last push |
|---|---|---|---|---|
| privatebin/privatebin | 8.4K | PHP | NOASSERTION | |
| vastsa/filecodebox | 8.3K | Python | LGPL-3.0 | |
| highlightjs/highlight.js | 24.8K | JavaScript | bsd-3-clause | |
| isagalaev/highlight.js | 24.9K | JavaScript | BSD-3-Clause | |
| googlearchive/code-prettify | 5.8K | JavaScript | Apache-2.0 | |
| alecthomas/chroma | 5K | Go | NOASSERTION | |
| codemirror/codemirror | 27.2K | JavaScript | MIT | |
| timvisee/ffsend | 7.4K | Rust | GPL-3.0 | |
| jhaals/yopass | 2.6K | TypeScript | apache-2.0 | |
| codemirror/codemirror5 | 27.2K | JavaScript | MIT |