{ Base85 Encoder/Decoder }

// encode & decode text with dense base85 representation

Encode and decode text using Base85 (Ascii85) for compact binary transport. Free, browser-based, no sign-up. Supports RFC 1924 and Ascii85 variants.

VARIANT: Wraps output in <~...~>, uses printable ASCII 33–117
Plain text to encode, or Base85 string to decode

Ready to encode or decode

Ascii85 is ~25% more compact than Base64

HOW TO USE

  1. 01
    Paste your input

    Enter plain text to encode, or a Base85 string to decode in the input field.

  2. 02
    Choose variant

    Select Ascii85 (Adobe) for the classic <~...~> format, or RFC 1924 for an alphanumeric-friendly charset.

  3. 03
    Click Encode or Decode

    Copy the result with one click, or swap input/output to reverse the operation.

FEATURES

Ascii85 / Adobe RFC 1924 Size Stats Swap I/O Browser-based

USE CASES

  • 🔧 Embedding binary data in PostScript / PDF
  • 🔧 Compact transport of binary payloads in text protocols
  • 🔧 Git-bundle and patch diff headers (RFC 1924)
  • 🔧 Obfuscating short strings without encryption
  • 🔧 Learning encoding schemes and comparing with Base64

WHAT IS BASE85?

Base85 (also called Ascii85) is a binary-to-text encoding that represents binary data using 85 printable ASCII characters. Every 4 bytes of binary become 5 ASCII characters — about 25% more efficient than Base64's 33% overhead.

RELATED TOOLS

FREQUENTLY ASKED QUESTIONS

What is the difference between Ascii85 and Base64?

Both encode binary data as text, but Ascii85 uses 85 printable characters instead of 64, achieving roughly 25% size overhead compared to Base64's 33%. Ascii85 encodes 4 bytes into 5 characters; Base64 encodes 3 bytes into 4 characters.

What is the <~ ~> wrapper in Ascii85?

The <~ and ~> delimiters are part of the Adobe Ascii85 specification. They mark the start and end of an encoded block, making it easy to identify Base85 data within a larger document like PostScript or PDF.

What is RFC 1924 Base85?

RFC 1924 is an April Fools' RFC that defined a Base85 variant for encoding IPv6 addresses. It uses a different character set: 0–9, A–Z, a–z, and a set of symbols — avoiding characters problematic in shells and URLs.

Is Base85 safe to use in HTML or JSON?

Standard Ascii85 includes characters like <, >, and & which need escaping in HTML. RFC 1924 avoids most of these and is safer for use in many text contexts. For JSON payloads, Base64 remains the most common choice.

Does Base85 provide encryption or security?

No. Base85 is purely an encoding scheme — it converts binary data to text and back. It provides no encryption, no hashing, and no protection. Anyone with the encoded string can decode it instantly. Use proper encryption if security is required.

Why does the output size appear larger for short text?

Base85 encodes in blocks of 4 bytes, padding if necessary. For very short strings, the overhead of the <~...~> delimiters and padding can make the output appear larger than the input. The efficiency gain is more apparent with larger binary payloads.

Base85 Encoder and Decoder — Free Online Tool

Base85, also known as Ascii85, is a binary-to-text encoding scheme that converts arbitrary binary data into a sequence of printable ASCII characters. It was originally developed by Adobe Systems for use in PostScript and PDF files, and it remains one of the most space-efficient text-based encodings available today. This free browser-based tool lets you encode any text string into Base85 and decode any valid Base85 string back to its original form — instantly, without installation or sign-up.

💡 Looking for premium web development assets? MonsterONE offers unlimited downloads of templates, UI kits, and assets — worth checking out.

How Does Base85 Encoding Work?

The fundamental idea behind Base85 is elegant: every 4 bytes (32 bits) of binary data are treated as a single 32-bit unsigned integer. That integer is then expressed in base-85 notation, producing exactly 5 digits using 85 printable ASCII characters (characters 33 through 117 in the standard Ascii85 variant). This 4-to-5 byte ratio gives Base85 roughly 25% overhead compared to the original binary data — significantly better than Base64's 33% overhead.

There is one special optimization in the Ascii85 specification: when all 4 bytes are zero, the entire 5-character sequence is replaced with the single character z. This compression shortcut is called the "z exception" and can substantially reduce the size of data containing long runs of null bytes — common in many file formats.

The encoded output is wrapped in <~ and ~> delimiters in the Adobe Ascii85 flavor, making it easy to identify Ascii85 blocks within larger documents like PostScript files or PDF streams.

Ascii85 vs. RFC 1924 — Two Variants Explained

This tool supports two well-known Base85 variants:

The two variants are not interoperable — data encoded with Ascii85 must be decoded with Ascii85, and RFC 1924 data must be decoded with RFC 1924. This tool clearly labels which variant is active to avoid confusion.

Base85 vs. Base64 — When to Use Which

Base64 is far more widespread and is the encoding of choice for email (MIME), data URIs in CSS and HTML, and JSON payloads. It has excellent library support in every programming language and is universally understood. However, Base85 wins on compactness: the same binary data encoded in Base85 is about 10% shorter than the same data in Base64.

Use Base85 when:

Stick with Base64 when working with web APIs, JSON, email, or any environment where Base85 support is not guaranteed.

Where Is Base85 Used?

Base85 was introduced by Adobe in PostScript Level 2 and is still used inside PDF files today. PDF streams — which contain compressed font data, images, and page content — are often encoded with either FlateDecode (zlib compression) followed by Ascii85Decode, or with Ascii85 alone. The ASCIIHexDecode filter in older PDFs encodes each byte as two hexadecimal characters (100% overhead), making Ascii85 a clear improvement.

Git uses a Base85 variant (not RFC 1924 but a custom alphabet) for encoding binary patches in the git diff --binary format. This allows binary file changes to be stored and transmitted as plain text within standard diff formats.

The ZeroMQ (ØMQ) messaging library uses a Base85 encoding called Z85 for encoding binary keys and identities in text-safe contexts — particularly useful when keys need to be embedded in configuration files or command-line arguments.

Using This Tool

The tool operates entirely in your browser. Text is processed via a server-side PHP API endpoint for consistency and correctness across all browsers. No data is stored, logged, or retained. The input limit is 200,000 characters to keep responses fast.

To encode: paste or type your plain text, select the desired variant (Ascii85 or RFC 1924), and click Encode. The output appears on the right with stats showing input size, output size, and the size ratio. Use the Copy All button to copy the result to your clipboard.

To decode: paste your Base85-encoded string (with or without the <~...~> delimiters for Ascii85), select the matching variant, and click Decode. The original text appears in the output panel.

The Swap button copies the current output back to the input field, allowing you to immediately reverse an operation and verify round-trip accuracy.

Technical Notes

Base85 requires input length to be a multiple of 4 bytes. If the input is not divisible by 4, the encoder pads the final chunk with null bytes and encodes only the necessary number of output characters (fewer than 5). The decoder reverses this padding during decoding, restoring the original byte count. This is why the Ascii85 specification does not use the z shortcut for the final partial group — it must always encode the actual partial bytes faithfully.

The RFC 1924 variant does not include the z exception or the <~...~> delimiters. The output is a raw string using its specific 85-character alphabet.