> maximum | efficiency | compression <
// Base91 encoding with 91 ASCII characters for maximum space efficiency
Highest Efficiency
Base91 provides the best compression ratio among common base encodings.
All Printable
Uses 91 printable ASCII characters for maximum compatibility.
Space Saving
Achieves ~23% overhead compared to 33% for Base64, saving significant space.
>> technical info
How Base91 Works:
Base91 uses 91 of the 94 printable ASCII characters (excluding quotes and backslash). It achieves exceptional efficiency by packing 13-14 bits into every two output characters.
Example:
"Hello" → fPNKd
Why Use Base91:
- >Best compression efficiency
- >23% overhead vs 33% for Base64
- >All printable ASCII characters
- >Ideal for bandwidth-limited scenarios
- >Maximum data density
>> frequently asked questions
What is Base91 encoding?
Base91 is a binary-to-text encoding that uses 91 printable ASCII characters to achieve the highest compression efficiency among common base encodings.
When should I use Base91?
Base91 is ideal when you need maximum space efficiency and can work with all printable ASCII characters. It's perfect for bandwidth-limited applications or when storage space is critical.
How efficient is Base91 compared to Base64?
Base91 has only ~23% overhead compared to Base64's 33% overhead. This means Base91 produces significantly smaller encoded output for the same input data.
Is Base91 widely supported?
While not as common as Base64, Base91 has implementations in many programming languages and is used in applications where maximum compression efficiency is needed.
Which 91 characters does basE91 use — and which ASCII characters are excluded?
The original basE91 by Joachim Henke uses 91 of the 94 printable ASCII characters and excludes three: " (0x22, double quote), & (0x26, ampersand), and ' (0x27, single quote) — chosen because they interfere with JSON, HTML, and shell scripts. The full alphabet runs:A-Z a-z 0-9 ! # $ % & ( ) * + , . / : ; < = > ? @ [ ] ^ _ ` { | } ~ "
(Implementations differ — some variants also drop backslash; always check the reference.) This makes Base91 safe to embed in JSON strings without escaping, which is its main advantage over Base85.
How do I decode Base91 in Python or JavaScript?
Base91 is not in any language's standard library. Use these packages:
Python: pip install base91 → import base91; base91.decode('fPNKd') → b'Hello'.
JavaScript: npm i base91 → require('base91').decode('fPNKd').
C: reference implementation at base91.sourceforge.net (GPL).
Rust: crate base91.
For a quick one-off decode without installing anything, paste your string into this tool — it runs client-side, so even proprietary encoded payloads stay on your device.
When is Base91 actually better than Base64?
Base91 wins only in two narrow scenarios:
1. Storage or bandwidth is severely constrained — embedded systems, SMS messages (140-byte limit), or legacy protocols where every byte counts.
2. You need JSON-safe output without escaping — Base91's default alphabet avoids ", so you can drop a Base91 string into a JSON string field without any escape sequences. Base64 contains / and + which are fine in JSON but annoying in XML and URLs.
In most modern contexts (APIs, localStorage, network payloads), the extra 10% savings isn't worth losing Base64's ubiquity. Base64 is in every browser, every language, every shell; Base91 needs a library everywhere it goes.
Why is Base91 overhead exactly ~23%?
The math: with 91 symbols, each character carries log2(91) ≈ 6.508 bits of information. Raw binary carries 8 bits per byte. So the ratio of encoded-size to input-size is roughly 8 / 6.508 ≈ 1.229 — a 22.9% overhead.
Compare:
• Base32 (log2(32)=5): 60% overhead.
• Base64 (log2(64)=6): 33% overhead.
• Base85 (log2(85)≈6.409): 25% overhead.
• Base91 (log2(91)≈6.508): 23% overhead.
• Base94 (all printable ASCII, theoretical max): 22% overhead.
Past 91 symbols, you hit diminishing returns: every extra symbol you include is a character you can't safely use elsewhere (quotes, backslash, etc.).
Base91 online decoder — is it safe for confidential data?
Yes, when the tool runs client-side. Our Base91 decoder uses pure JavaScript in your browser — open the Network tab while decoding and you'll see zero outbound requests. This makes it safe for:
• API keys embedded in payloads
• Proprietary firmware blobs encoded in Base91
• Research data from bandwidth-constrained telemetry
Be cautious with Base91 decoders that upload to a server — those are rare but exist. For maximum paranoia, download the page, disconnect from the network, and decode offline.