Overview
Need maximum binary density in character-counted Unicode systems? Base65536 packs two full bytes (16 bits) into a single Unicode character. A 256-byte payload condenses to exactly 128 characters without trailing padding. For JavaScript, Java, and Windows runtimes that store strings as 16-bit code units, Base65536 achieves the theoretical limit of 1 code unit per 2 bytes.
Key Features
- Encodes binary buffers into Base65536, mapping 16 bits to one Unicode code point.
- Decodes Base65536 character streams back to raw UTF-8 byte payloads.
- Handles odd byte counts through a secondary 256-character repertoire to avoid padding overhead.
- Runs client-side in the browser with immediate validation and error feedback.
Technical Architecture and Bit Allocation
Created by qntm, Base65536 extends the base-N encoding concept to the 16-bit space. Where Base64 (RFC 4648) maps 6 bits per ASCII character and Base85 maps 4 bytes to 5 ASCII characters, Base65536 uses a curated repertoire of 65,536 Unicode code points.
The primary repertoire maps two 8-bit bytes (16 bits, values 0x0000 to 0xFFFF) to a unique code point. Code points are selected to avoid: 1. High and low surrogate pairs (U+D800 to U+DFFF). 2. ASCII control codes and invisible format controls. 3. Combining characters that trigger visual clustering.
When an input payload contains an odd number of bytes, the trailing byte is mapped to a secondary 256-character repertoire. Because 16 bits divide evenly into byte pairs, no trailing '=' padding characters are required.
Encoding Instructions
- Paste your raw string or payload into the input box.
- Select Encode to generate Base65536 or Decode to reconstruct the original byte stream.
- Copy the condensed Unicode output for your target application.
- If receiving errors on decode, check whether an intermediate transport applied NFC or NFKC normalization.
Transport Trade-offs and UTF-8 Expansion
Base65536 is optimal when transport or storage limits are measured in character counts (such as microblogging APIs or fixed string columns). However, across UTF-8 network transports, characters outside the Basic Multilingual Plane (BMP) serialize into 3 or 4 raw bytes. In such scenarios, the UTF-8 wire size of Base65536 can exceed that of standard Base64.
Interoperability and Normalization Risks
Unicode normalization forms (NFC and NFKC) can alter code points by combining adjacent characters or decomposing compatibility symbols. Applications passing Base65536 data across rich text editors or databases must ensure verbatim binary string preservation without normalization filters.
Frequently asked questions
How does Base65536 differ from Base32768 and Base2048?
Base65536 encodes 16 bits per character using both the BMP and supplementary planes. Base32768 encodes 15 bits per character and stays strictly inside the BMP. Base2048 encodes 11 bits per character and is designed specifically for Twitter-like character limits.
Is Base65536 an encryption scheme?
No. Base65536 is a deterministic binary-to-text encoding format. It provides zero cryptographic secrecy or integrity verification.
Related Encodings
Base65536 offers maximum character density for 16-bit Unicode environments. Compare its output against our Base64 encoder, or explore Base32768 and Base2048 for BMP-restricted pipelines.