Base91 Encode / Decode
Encode and decode Base91 strings in the browser β more compact than Base64 for binary data.
Base64 is ubiquitous but not optimal β it inflates data by 33%. Base91 is a lesser-known encoding that achieves better density by using a 91-character alphabet, typically producing output 10β15% smaller than the equivalent Base64 string. For applications where every byte counts β embedded payloads, URL-embedded data, or bandwidth-constrained channels β Base91 is worth reaching for.
This tool encodes arbitrary text or binary data to Base91 and decodes Base91 strings back to their original form. It is useful for developers working on data serialisation in constrained environments, anyone exploring alternative encodings for educational purposes, or security researchers analysing obfuscated payloads that may use non-standard encodings.
How to Base91 Encode and Decode Online
- 1
Paste Your Input
Paste plain text or a Base91-encoded string into the input panel.
- 2
Choose Encode or Decode
Select encode to produce a Base91 string, or decode to recover the original data. The tool reports any invalid characters.
- 3
Copy the Result
Copy the output. Base91 output is typically 8β10% smaller than equivalent Base64.
How Base91 Encoding Works
Base91 was designed by Joachim Henke to maximise encoding efficiency while using only printable ASCII characters safe for use in most text contexts. It works by processing the input bitstream in 13-bit chunks rather than the 6-bit chunks used by Base64. Two output characters encode 13 bits rather than 6 bits per character, achieving a theoretical expansion ratio of about 1.23Γ versus Base64's 1.33Γ. The 91-character alphabet deliberately excludes characters that cause problems in common contexts β no single or double quotes, no backslash, no angle brackets.
Because 91 is not a power of two, the encoding algorithm uses a modular arithmetic trick rather than simple bit masking, which makes it slightly more complex to implement but delivers the efficiency gain. Decoders must handle the tail of the input carefully when the total bit count is not a multiple of 13.
Why Use FileCrank Base91 Encoder / Decoder?
- β Produces output approximately 8β10% smaller than Base64.
- β Uses 91 printable ASCII characters for maximum compatibility.
- β Validates input and reports invalid characters clearly.
- β Runs entirely in your browser β no data sent to any server.
Features & Specs
Frequently Asked Questions
What is Base91 and how is it different from Base64?
Base91 uses 91 printable ASCII characters and encodes data more efficiently than Base64 β approximately 1.23 bytes per input byte versus 1.33 for Base64 β making the output about 8β10% smaller.
When would I use Base91 instead of Base64?
Use Base91 when compact ASCII representation of binary data matters and the receiving system supports Base91 decoding. It is uncommon in standard protocols. If unsure, use Base64.
Can Base91 encode arbitrary binary data?
Yes. Base91 can encode any byte sequence and produce a printable ASCII string safe for transmission in most text-only systems.
Is Base91 the same as Base85 or Base92?
No. Base85 (Ascii85) uses 85 printable characters and is used in PDF. Base91 uses 91 printable characters. Base92 is a different less common scheme. Each produces different output for the same input.
Base91 vs. Base64 vs. Base85
Base64 is supported everywhere and should remain the default for interoperability. Base85 (used in PDF and git binary patches) is also more compact than Base64 but uses characters that can conflict with shell and XML contexts. Base91 strikes a middle ground β better density than Base64, a safer alphabet than Base85, but with almost no standard library support. Use Base91 when you control both encoder and decoder and want compact printable output.
Related Tools
Base64 Encode / Decode
Encode text or binary data to Base64 and decode Base64 strings back to plain text, instantly in your browser.
URL Encode / Decode
Percent-encode URLs for safe use in query strings, or decode encoded URLs back to plain text.
bin2hex
Convert binary data to hex strings and hex back to binary at the byte level β like PHP's bin2hex() and hex2bin().
FileCrank Base91 Encode / Decode encodes binary data as printable ASCII using 91 characters, producing output about 8β10% more compact than Base64, entirely in your browser.
Advertisement