Base85 Encoder/Decoder

Free online Base85 (Ascii85) encoder and decoder tool. Encode text to Base85 or decode Base85 to text instantly. More efficient than Base64 with 25% better compression. Perfect for developers working with PDF encoding, binary data compression, email attachments, and space-efficient encoding.

Base85 (Ascii85) Encoder/Decoder - Encode and Decode Base85 Online

A powerful online Base85 (Ascii85) encoder and decoder tool that allows you to easily encode text to Base85 format or decode Base85 strings back to plain text. Base85 is 25% more efficient than Base64, making it perfect for encoding binary data in PDFs, email attachments, and anywhere space efficiency matters. Ideal for developers, system administrators, and anyone working with binary data encoding.

What is Base85 (Ascii85) encoding?

Base85, also known as Ascii85, is a binary-to-text encoding scheme that represents binary data using 85 printable ASCII characters. It's more efficient than Base64, producing smaller output.

Base85 Alphabet:
!"#$%&'()*+,-./0123456789:;<=>?@ABCDEFGHIJKLMNOPQRSTUVWXYZ[\]^_`abcdefghijklmnopqrstu

Key characteristics:
- Uses 85 printable ASCII characters (33-117)
- Encodes 4 bytes into 5 characters (vs Base64's 3→4)
- 25% more efficient than Base64
- Special 'z' character represents 4 zero bytes
- No padding characters
- Case-sensitive
- Variable length output

Common uses:
- PDF files (internal encoding)
- PostScript documents
- Binary data in text files
- Email attachments (alternative to Base64)
- Git pack files
- Data compression
- Space-efficient encoding

Why Base85?
1. Space efficient: 25% smaller than Base64
2. Printable: All ASCII printable characters
3. Compact: Better compression ratio
4. Standard: Used in Adobe PDF format
5. Efficient: Processes 4 bytes at a time

Base85 vs Other Encodings:

Vs Base64:
- Base85: 25% more efficient, 85 chars, 4→5 encoding
- Base64: Less efficient, 64 chars, 3→4 encoding, widely supported

Vs Base58:
- Base85: More compact, includes special chars
- Base58: Human-readable, no confusing chars, crypto standard

Vs Hexadecimal:
- Base85: Much more compact, 20% smaller
- Hex: Simpler, more readable, 2x data size

Example:
Text: "Hello, World!"
Base85: "87cURD]i,"Ebo7"
Base64: "SGVsbG8sIFdvcmxkIQ=="
Hex: "48656c6c6f2c20576f726c6421"

Efficiency Comparison:
- Original: 13 bytes
- Base85: 17 bytes (31% overhead)
- Base64: 20 bytes (54% overhead)
- Hex: 26 bytes (100% overhead)

Base85 is the most space-efficient ASCII encoding for binary data!

How do I encode text to Base85?

Encoding text to Base85 is simple:

1. Select the 'Encode' mode
2. Enter or paste your text in the input field
3. Click the 'Encode' button
4. Your Base85-encoded text will appear in the output field

Example:
Input: "Hello, World!"
Output: "87cURD]i,"Ebo7"

The tool automatically:
- Converts text to bytes (UTF-8 encoding)
- Processes 4 bytes at a time
- Converts each 4-byte group to 5 Base85 characters
- Handles partial chunks at the end
- Uses special 'z' for 4 zero bytes (optimization)
- Supports Unicode, emoji, and multi-byte characters

Encoding Process:
1. Take 4 bytes: [B1, B2, B3, B4]
2. Combine into 32-bit number: B1×256³ + B2×256² + B3×256 + B4
3. Convert to base-85 (5 digits)
4. Map each digit to Base85 alphabet
5. Special case: if all 4 bytes are 0, output 'z'

Example (detailed):
Text: "Test"
Bytes: [84, 101, 115, 116]
Number: 84×16777216 + 101×65536 + 115×256 + 116 = 1415934836
Base85 digits: [26, 21, 83, 83, 1]
Output: "<+ohp"

Note: Base85 encoding is 25% more efficient than Base64!

How do I decode Base85?

Decoding Base85 back to text is just as easy:

1. Select the 'Decode' mode (default)
2. Paste your Base85-encoded string in the input field
3. Click the 'Decode' button
4. The original text will appear in the output field

Example:
Input: "87cURD]i,"Ebo7"
Output: "Hello, World!"

The tool automatically:
- Removes whitespace from input
- Validates Base85 format (checks for invalid characters)
- Handles special 'z' character (4 zero bytes)
- Processes 5 characters at a time
- Converts back to 4 bytes
- Handles partial chunks
- Decodes bytes to UTF-8 text
- Shows clear error messages if invalid

Decoding Process:
1. Take 5 Base85 characters (or special 'z')
2. Convert each character to its Base85 value (0-84)
3. Combine: V1×85⁴ + V2×85³ + V3×85² + V4×85 + V5
4. Convert 32-bit number to 4 bytes
5. Handle partial chunks at the end

Special Cases:
- 'z' → [0, 0, 0, 0] (4 zero bytes)
- Partial chunks: Use only needed bytes

Note: Base85 is case-sensitive! Different cases = different values.

Where is Base85 used and why?

Base85 encoding is used in various applications where space efficiency matters:

1. PDF Files:
- Internal binary encoding
- Image data compression
- Font embedding
- Most common Base85 use case
- Adobe standard (Ascii85)

2. PostScript:
- Binary data in PostScript files
- Image encoding
- Font data
- Created by Adobe

3. Version Control:
- Git pack files
- Binary diffs
- Patch files
- Git uses btoa (Base85 variant)

4. Email & Communication:
- Alternative to Base64 for attachments
- More space-efficient encoding
- Binary data in text protocols

5. Data Storage:
- Embedded binary in text files
- Configuration files
- Database text fields
- JSON with binary data

6. Network Protocols:
- Binary data transmission
- Space-constrained protocols
- Efficient encoding

Why Use Base85:

✓ Space Efficiency:
- 25% smaller than Base64
- 20% smaller than Hexadecimal
- Saves bandwidth and storage
- Better for large files

✓ ASCII Compatible:
- All printable ASCII characters
- Works in text-only systems
- Email-safe
- No binary data issues

✓ Optimization:
- Special 'z' for all-zero sequences
- Efficient for common patterns
- Good compression for binary data

✓ Industry Standard:
- Adobe PDF/PostScript standard
- Well-documented
- Library support
- Proven reliability

Real-World Impact:

File Size Comparison (10MB binary file):
- Original: 10 MB
- Base85: 13.1 MB (31% larger)
- Base64: 13.7 MB (37% larger)
- Hex: 20 MB (100% larger)

Savings with Base85:
- vs Base64: ~600 KB saved (4.4% smaller)
- vs Hex: ~7 MB saved (35% smaller)

PDF Example:
A PDF with embedded images uses Base85 to:
- Reduce file size by 25% vs Base64
- Maintain text-only format
- Speed up document loading
- Reduce storage requirements

Git Example:
Git's pack files use Base85 (btoa) to:
- Efficiently encode binary diffs
- Save repository space
- Faster push/pull operations
- Better compression

When to Choose Base85:

✓ Use Base85 when:
- Space efficiency is critical
- Working with PDF/PostScript
- Large binary data in text
- Storage/bandwidth limited
- Adobe ecosystem

✗ Don't use Base85 when:
- Need maximum compatibility (use Base64)
- Human readability important (use Base58)
- Simple encoding needed (use Hex)
- Web APIs (most expect Base64)

Base85 Variants:

1. Ascii85 (Adobe):
- Original specification
- Used in PDF/PostScript
- <~ and ~> delimiters
- 'z' optimization

2. Base85 (RFC 1924):
- IPv6 address encoding
- Different alphabet
- No 'z' optimization

3. Z85 (ZeroMQ):
- Network-safe variant
- No quotes or backslashes
- Used in ZeroMQ protocol

4. btoa (Git):
- Git's variant
- Used in pack files
- Slightly different implementation

This Tool:
Implements standard Ascii85 (Adobe variant):
✓ Standard Base85 alphabet
✓ 'z' optimization for zero bytes
✓ Compatible with PDF encoding
✓ General-purpose encoding

Compatibility Note:
Base85-encoded data from this tool is compatible with:
- Adobe Acrobat/Reader
- PostScript interpreters
- Most Base85/Ascii85 libraries

Base85 strikes the perfect balance between efficiency and compatibility, making it ideal for applications where every byte counts!

What's the difference between Base85 and Base64?

Base85 and Base64 are both binary-to-text encodings, but with key differences:

Efficiency:

Base64:
- Encodes 3 bytes → 4 characters
- 33.33% overhead
- Efficiency: 75% (6 bits per character)
- Output size: 137% of input

Base85:
- Encodes 4 bytes → 5 characters
- 25% overhead
- Efficiency: 80% (6.4 bits per character)
- Output size: 125% of input

Space Savings:
Base85 produces ~8% smaller output than Base64

Example (100 bytes):
- Original: 100 bytes
- Base64: 137 bytes
- Base85: 125 bytes
- Savings: 12 bytes (8.7% smaller)

Alphabet Size:

Base64:
- 64 characters
- A-Z, a-z, 0-9, +, /
- Padding: = character
- Case-sensitive

Base85:
- 85 characters
- ASCII chars 33-117 (printable)
- Includes: ! " # $ % & ' ( ) * + , - . / 0-9 : ; < = > ? @ A-Z [ \ ] ^ _ ` a-t
- No padding
- Special 'z' for optimization

Readability:

Base64:
✓ More familiar-looking
✓ Alphanumeric-heavy
✓ Easier to recognize
✓ Web-standard

Base85:
✓ Includes special characters
✓ Less familiar
✓ More compact
✓ Harder to read

Compatibility:

Base64:
✓ Universal support
✓ Web APIs standard
✓ Email (MIME) standard
✓ JSON-safe
✓ URL-safe variant available
✓ XML-safe

Base85:
✓ PDF/PostScript standard
✓ Git pack files
✓ Less common
✗ Not all systems support it
✗ May need escaping in some contexts

Use Cases:

Use Base64 for:
- Web APIs and REST services
- JSON data embedding
- Email attachments (MIME)
- Browser data URLs
- OAuth tokens
- JWT tokens
- HTTP headers
- Maximum compatibility

Use Base85 for:
- PDF/PostScript encoding
- Git internals
- Space-constrained storage
- Large binary data in text
- When every byte counts
- Adobe ecosystem

Real Example:

Text: "Hello, World!"

Base64:
Input: 13 bytes
Output: "SGVsbG8sIFdvcmxkIQ=="
Length: 20 bytes
Overhead: +54%

Base85:
Input: 13 bytes
Output: "87cURD]i,"Ebo7"
Length: 17 bytes
Overhead: +31%

Savings: 3 bytes (15% smaller)

Large File Example (1 MB):

Base64:
- Output: 1.37 MB
- Overhead: 370 KB

Base85:
- Output: 1.25 MB
- Overhead: 250 KB

Savings: 120 KB (8.7% smaller)

Performance:

Base64:
✓ Faster encoding/decoding
✓ Simpler algorithm
✓ Hardware acceleration available
✓ Highly optimized libraries

Base85:
✓ More complex algorithm
✓ Slightly slower
✓ Worth it for space savings
✓ Good library support

Security:

Both Base64 and Base85:
✗ Are NOT encryption
✗ Provide NO security
✗ Are easily reversible
✗ Are just different representations

Special Features:

Base64:
- Padding with '=' for alignment
- URL-safe variant (+ and / replaced)
- Widely understood

Base85:
- 'z' shortcut for 4 zero bytes
- No padding needed
- More compact

Delimiters:

Base64:
- No standard delimiters
- Often used raw

Base85 (Ascii85):
- <~ starts encoding
- ~> ends encoding
- Used in PDF/PostScript

Summary:

| Feature | Base64 | Base85 |
|---------|---------|--------|
| Efficiency | 75% | 80% |
| Overhead | 33% | 25% |
| Alphabet | 64 chars | 85 chars |
| Padding | Yes (=) | No |
| Special chars | 2 (+/) | Many |
| Compatibility | Universal | Limited |
| Use case | Web, email | PDF, Git |
| Readability | Good | Lower |
| Space saving | - | 8.7% better |

Choosing:

→ Use Base64 when:
- Need maximum compatibility
- Working with web APIs
- Sending via email (MIME)
- Embedding in JSON/XML
- Standard web development

→ Use Base85 when:
- Working with PDF/PostScript
- Space is critical
- Using Git internals
- Large files in text format
- Adobe ecosystem

Conclusion:

Base64 is the safe, universal choice for most applications. Base85 is the specialized choice when you need maximum space efficiency and are in a compatible ecosystem (PDF, Git, etc.).

For modern web development, stick with Base64. For specialized applications or when space really matters, Base85 is 8.7% more efficient!

Is my data safe when using this tool?

Yes, your data is completely safe and private when using this tool:

Privacy Features:

✓ 100% Client-Side Processing:
- All encoding/decoding happens in your browser
- JavaScript runs locally on your computer
- No server-side processing
- No data transmission

✓ No Data Uploads:
- Your text never leaves your computer
- No network requests for encoding/decoding
- No API calls
- No external services

✓ No Storage:
- We don't store any data you input
- No cookies tracking your data
- No logging
- No databases

✓ No Tracking:
- We don't track what you encode or decode
- No analytics on your data
- Privacy-focused design

✓ Works Offline:
- Once the page loads, works without internet
- Disconnect and it still functions
- Proves no data transmission

✓ Open Source:
- Code is visible and verifiable
- Transparent operation

How to Verify:

1. Network Tab: Open DevTools → No requests when encoding/decoding
2. Offline Test: Disconnect internet → Still works
3. Source Code: View page source → Verify client-side only

Security Reminders:

⚠️ Base85 is NOT Encryption:
- Anyone can decode Base85
- Provides no security
- Don't encode secrets thinking they're protected
- It's just a different way to represent data

⚠️ Sensitive Data:
- Don't encode passwords or keys
- Not a security measure
- Use proper encryption for sensitive data

⚠️ Browser Security:
- Data is in browser memory
- Be cautious on public computers
- Clear browser data on shared machines

Your privacy is guaranteed because everything happens locally, but remember: Base85 encoding provides no security—it's just a space-efficient way to represent binary data in text format!

Key Features

  • Encode text to Base85 (Ascii85) format instantly
  • Decode Base85 strings back to original text
  • 25% more efficient than Base64 encoding
  • Uses standard Ascii85 alphabet (85 printable ASCII chars)
  • Special 'z' optimization for zero bytes
  • Case-sensitive encoding and decoding
  • No padding characters needed
  • Automatic whitespace handling
  • Real-time size comparison statistics
  • One-click swap between encode and decode modes
  • Copy encoded/decoded text to clipboard
  • Download results as text files
  • Upload text files for encoding/decoding
  • Dark mode support
  • 100% client-side processing - your data never leaves your browser
  • No file size limits
  • Works offline after initial load
  • Mobile-friendly responsive design
  • Clear error messages for invalid Base85 input
  • Support for Unicode and emoji characters
  • Compatible with PDF/PostScript Base85
  • No registration or login required