Base91 Encoder/Decoder
Encode and decode Base91 data with ~23% overhead (more efficient than Base64's ~33%). Perfect for space-efficient binary data encoding in databases, APIs, and text protocols.
Why Base91?
Base91 provides ~23% overhead compared to Base64's ~33%, making it more space-efficient for encoding binary data as text. It uses 91 printable ASCII characters, offering better compression while remaining safe for JSON, databases, and text protocols.
Recommended Settings
Base91 Encoding Best Practices
- •Use Base91 when you need better space efficiency than Base64 (~23% vs ~33% overhead)
- •Ideal for internal systems where both encoder and decoder can use Base91
- •Perfect for database storage, reducing text column sizes by ~10% vs Base64
- •Safe for JSON, XML, CSV, and most text protocols (avoids backslash and quotes)
- •Not a standard like Base64 - ensure both sender and receiver support Base91
Base91 vs Base64 Comparison
- •Base91: ~23% overhead, 91 characters, better compression, non-standard
- •Base64: ~33% overhead, 64 characters, standard (RFC 4648), universal support
- •Base91 saves ~10% space compared to Base64 for the same data
- •Use Base91 for storage/internal APIs, Base64 for compatibility/standards
- •Both are encoding (not encryption) - neither provides security
Pro Tips
- •Live conversion updates automatically as you type for instant feedback
- •Upload files to encode/decode larger datasets without manual copy-paste
- •Swap button instantly reverses encode/decode direction with current data
- •Base91 overhead is calculated and displayed in real-time during encoding
Most Popular
Most users encode data to Base91 for efficient database storage and internal API transmission
When to Use This Tool
Base91 provides better space efficiency than Base64 (~23% overhead vs ~33%). Use it when encoding binary data for transmission over text protocols where size matters. Ideal for embedding compressed data, cryptographic keys, or binary blobs in JSON, XML, or text files where every byte counts and the 91-character alphabet is acceptable.
Store binary data in text-only databases or configuration files with less overhead than Base64. Base91's higher efficiency means smaller database records, faster queries, and reduced storage costs. Perfect for systems storing large volumes of encoded binary data like image thumbnails, serialized objects, or encrypted tokens in text columns.
Transmit binary data over protocols that only support printable ASCII characters. Base91 uses 91 printable characters (avoiding backslash and quote to prevent escaping issues), making it safe for JSON strings, XML attributes, CSV fields, and URLs. Better compression than Base64 while maintaining text-safety for legacy systems and APIs.
How It Works
Choose Encode or Decode mode using the toggle buttons at the top
Type or paste your text (encode) or Base91 string (decode) in the input field
The tool automatically converts as you type with live preview
For encode: Text is converted to UTF-8 bytes using TextEncoder
Bytes are processed through Base91's variable-length encoding algorithm
An accumulator buffer collects bits and outputs 13 or 14 bits at a time
Each chunk is converted to two Base91 characters from the 91-character alphabet
The alphabet uses A-Z, a-z, 0-9, and safe symbols (excludes \ and ')
Base91 dynamically chooses 13 or 14 bit chunks for optimal compression
This variable-length approach achieves ~23% overhead vs Base64's fixed 33%
For decode: Base91 characters are looked up in the alphabet
Character pairs are converted back to their numeric values
Bits are extracted from the accumulator and assembled into bytes
Bytes are interpreted as UTF-8 text using TextDecoder for display
Use swap button to reverse direction and convert output back to original
All processing happens in browser - your data never leaves your device
100% Private
Files never leave your device. All processing happens locally in your browser.
Lightning Fast
Powered by Client-side JavaScript with custom Base91 implementation based on Joachim Henke's algorithm for optimal performance on modern browsers.
Open Source
Built with verified, open-source libraries. Fully transparent.
Frequently Asked Questions
What is Base91 and how is it different from Base64?
Base91 is a binary-to-text encoding that uses 91 printable ASCII characters instead of Base64's 64 characters. This results in approximately 23% size overhead compared to Base64's 33%, making it more space-efficient. Base91 uses all printable ASCII except backslash and quote marks, making it safe for most text protocols while achieving better compression.
Why does Base91 have less overhead than Base64?
Base91 can encode more data per character because it uses a larger alphabet (91 vs 64 characters). While Base64 uses 4 characters to represent 3 bytes (33% overhead), Base91's variable-length encoding represents data more efficiently, averaging about 1.23 bytes per character. This makes Base91 ideal when minimizing encoded size is important.
Is Base91 a standard encoding format?
No, Base91 is not an official standard like Base64 (RFC 4648). It's a community-developed encoding scheme created by Joachim Henke in 2005. While not standardized, it has consistent implementations across languages. Use Base64 for maximum compatibility with existing systems, and Base91 when you control both encoding and decoding and need better efficiency.
Can I use Base91 in URLs or JSON?
Yes! Base91 uses printable ASCII characters safe for JSON strings, XML attributes, and most text formats. However, for URLs, Base64 URL-safe variant is preferred because Base91 includes characters like + and / that require URL encoding. Base91 is best for JSON, databases, text files, and protocols where all printable ASCII is acceptable.
Which characters does Base91 use?
Base91 uses 91 printable ASCII characters: A-Z, a-z, 0-9, and symbols !#$%&()*+,./:;<=>?@[]^_`{|}~". It deliberately excludes backslash (\) and single quote (') to avoid escaping issues in strings and shells. This makes Base91 safer for embedding in code, configuration files, and command-line arguments without special handling.
When should I use Base91 instead of Base64?
Use Base91 when you control both the encoder and decoder and need maximum space efficiency for text-safe encoding. It's ideal for internal APIs, database storage, log files, or config files where the 23% overhead is preferable to Base64's 33%. Use Base64 when you need standard compatibility, URL-safety (with URL-safe variant), or MIME email encoding.
Is Base91 encoding secure or encrypted?
No! Like Base64, Base91 is NOT encryption and provides NO security. It's purely an encoding format to make binary data text-safe. Anyone can decode Base91 data instantly with no key required. Never use Base91 to protect passwords, API keys, or sensitive information. For security, use proper encryption (AES, RSA) and optionally encode the encrypted result.
Does this tool work offline and is my data private?
Yes, completely! All Base91 encoding and decoding happens entirely in your browser using JavaScript. Your data never leaves your device, is never uploaded to any server, or stored remotely. The tool works 100% offline after the page loads, ensuring complete privacy for sensitive data, API keys, or confidential information.