🇺🇸English
🇨🇳简体中文
🇺🇸English

Base91 Encoder & Decoder - Online Base91 Encoding | Online Base91 Decoding

Free online Base91 encoding and decoding tool, supporting text to Base91 and Base91 to text conversion, powered by Martin Pool's original Base91 implementation, simple and efficient.

Base91 Encode / Decode (Quick Conversion)

Base91 Encoding Implementation Details (No Unified Official Standard)

Base91 is a highly efficient binary data encoding method, offering better encoding efficiency than Base64. Note: There is no unified official standard for Base91 (no RFC or similar specification), and the character set and implementation details may vary between different tools. This tool adopts Martin Pool's original Base91 design approach, with the following implementation rules:

FeatureImplementation Rules of This ToolDescription
Character SetABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789!#$%&()*+,./:;<=> ?@[]^_`{|}~
(91 printable ASCII characters, 0x21-0x7e excluding 0x22,0x27,0x2c,0x5c,0x60)
Includes uppercase and lowercase letters, numbers, and symbols, excluding conflicting characters (quotes, commas, backslashes, etc.)
Encoding EfficiencyEach 13 bits of binary data is encoded into 2 charactersApproximately 1.5% more efficient than Base64, resulting in smaller data volume
Encoding PrincipleBinary data is grouped into 13-bit segments and mapped to the 91-character set 13 bits can represent 0-8191, which perfectly maps to 91×91=8281 combinations
Application ScenariosHigh-compression data transmission, binary data textualization, network protocol transmission
Compatibility NoteDifferent Base91 tools may have different implementation rules; encoded results are only guaranteed to be reversible within this tool

Complete Base91 Character Set Used by This Tool (91 characters):

ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789!#$%&()*+,./:;<=>?@[]^_`{|}~

Introduction to Base91 Encoding and Decoding

What is a Base91 Encoder?

A Base91 encoder is a specialized online tool designed to convert standard text into Base91 encoding format, leveraging a highly efficient binary-to-text encoding scheme. Base91 was originally designed by Martin Pool in 2000 to provide superior encoding efficiency compared to Base64, reducing data expansion during transmission. Unlike Base64, which uses a 64-character set and adds approximately 33% overhead, Base91 utilizes 91 printable ASCII characters and achieves roughly 1.5% better efficiency by encoding 13 bits of binary data into just two characters. This makes the Base91 encoder particularly valuable for scenarios where minimizing data size is critical, such as embedded systems communication, high-compression data serialization, and bandwidth-constrained network protocols. Our online Base91 encoder implements the original Martin Pool algorithm faithfully, ensuring consistent and reversible conversion results every time you use the tool.

What are the Functions and Underlying Principles of Base91 Encoding?

The primary function of a Base91 encoder is to transform arbitrary binary data or text strings into a compact, ASCII-safe representation using a defined 91-character alphabet. The underlying theory relies on efficient binary grouping and modular arithmetic. The encoding process begins by converting the input text into a continuous stream of bytes and then into a bit-level sequence. This bit stream is divided into 13-bit groups, where each group represents a value between 0 and 8191. This value is then decomposed using base-91 division: the first character index is derived from the integer division of the value by 91, and the second character index comes from the modulo operation. These two indices select characters from the Base91 character set, which includes uppercase and lowercase letters, digits, and a curated selection of special symbols, all chosen to avoid common escape characters like quotes and backslashes. The decoder reverses this process, reconstructing the original bit groups and converting them back to bytes. A key theoretical advantage is that 13 bits map precisely to the 8281 possible two-character combinations, minimizing wasted space and achieving higher density than traditional Base64 or even Base85 in some implementations.

How to Use a Base91 Decoder Online?

Using our online Base91 decoder is straightforward and requires no software installation. First, select the "Decode" option from the conversion type dropdown menu. Next, paste your Base91 encoded string into the input text area. The tool provides two optional settings to control the decoding process: "Ignore whitespace," which automatically strips spaces, tabs, and newlines before processing, and "Strict mode," which validates that every character in the input belongs to the defined 91-character set and reports any invalid characters. After configuring these options, click the "Base91 Decode" button. The tool processes the input by mapping each pair of characters back to their original 13-bit or 14-bit values, reassembling the binary data, and converting it to readable UTF-8 text. The decoded result appears in the output area, where you can easily copy it to your clipboard. This base91 decoder is particularly useful for developers working with legacy systems or proprietary protocols that use non-standard Base91 variants, as it strictly adheres to the Martin Pool specification for accurate data recovery.

Frequently Asked Questions

Is Base91 more efficient than Base64?

Yes, Base91 is approximately 1.5% more efficient than Base64 in terms of output size relative to input data. While Base64 encodes 6 bits per character and has an efficiency of 75%, Base91 encodes roughly 6.5 bits per character by using a larger character set, resulting in an efficiency close to 85.3%. This means a Base91 encoded string will be shorter than the equivalent Base64 encoded string for the same input, making it a better choice for bandwidth-sensitive applications and data storage where every byte counts.

Is there an official RFC standard for Base91 encoding?

No, unlike Base64 which is standardized in RFC 4648, there is no official RFC or universally accepted standard for Base91 encoding. The original implementation was proposed by Martin Pool, and various tools and libraries have adopted different character sets and encoding rules. This means that Base91 encoded output from one tool may not be decodable by another tool. Our online base91 encoder and decoder use the original Martin Pool character set and algorithm, providing consistent results within our ecosystem but not guaranteeing cross-tool compatibility.

What characters are included in the Base91 alphabet?

Our tool uses a carefully selected set of 91 printable ASCII characters: all uppercase letters (A-Z), all lowercase letters (a-z), all digits (0-9), and a specific subset of special characters including !#$%&()*+,./:;<=>?@[]^_`{|}~. Characters like double quotes ("), single quotes ('), comma (,), backslash (\), and grave accent (`) are explicitly excluded to avoid conflicts with common programming language syntax, JSON strings, and CSV formatting. This selection ensures the encoded output is safe for use in most text-based protocols and configuration files.

Can I use a base91 decoder for data from other tools?

It is not recommended to use our base91 decoder for data encoded by other Base91 tools unless you have verified they use the identical character set and algorithm. Since Base91 lacks a universal standard, different implementations may use different character sets, different handling of padding, or different bit-grouping strategies. If you attempt to decode Base91 data from an incompatible tool, you will likely encounter errors or garbled output. Always ensure you use the same Base91 implementation for both encoding and decoding to guarantee data integrity.

What are the practical applications of a Base91 encoder?

A Base91 encoder is primarily useful in scenarios where minimizing data expansion is critical. Common applications include efficient binary data transmission over text-based protocols like HTTP or SMTP, storing binary blobs in text-only databases or configuration files, embedding small binary resources directly within source code, and optimizing payload sizes in IoT (Internet of Things) devices with limited bandwidth. The online base91 encoder provides a convenient way for developers to experiment with this encoding method and integrate it into their workflows without setting up local toolchains.

How does the online Base91 encoder handle special characters in text input?

Our online Base91 encoder converts all input text, including special Unicode characters, into UTF-8 bytes before encoding. This ensures that characters from any language, as well as emojis and other symbols, are properly represented as a sequence of bytes and then encoded into Base91. The decoder performs the reverse operation, reconstructing the UTF-8 byte sequence and decoding it back to the original text. This design guarantees that the encoding is fully lossless and reversible for any valid text input, making the tool suitable for international content and multilingual applications.