User Rating 0.0
Total Usage 0 times
0 chars
0 chars
Base46 Alphabet Reference
Is this tool helpful?

Your feedback helps us improve.

About

Base64 encoding uses 64 characters to represent binary data in ASCII. Base46 is a compact encoding that uses only 46 characters: digits 0 - 9, uppercase A - Z, and lowercase a - j. A smaller alphabet means longer output strings. The expansion ratio is approximately log(64)log(46) 1.085, so Base46 output is roughly 8.5% longer than Base64 for the same payload. This tool performs real transcoding: it decodes the source encoding to raw bytes, then re-encodes using arbitrary-precision integer arithmetic against the target alphabet. No data is approximated or discarded.

Base46 is useful in systems that restrict the usable character set below 64 symbols, such as certain QR code alphanumeric modes, legacy database fields, or transport protocols that forbid +, /, and =. Incorrect manual transcoding risks silent data corruption. A single mismatched character in the alphabet mapping produces garbled output that passes no checksum. This tool validates input strictly against the expected alphabet before conversion and reports exact error positions.

base64 base46 encoding converter transcoding baseN data-encoding

Formulas

Transcoding between bases proceeds through an intermediate raw-byte representation. The source string is decoded to a byte array B, which is interpreted as a big-endian unsigned integer N.

N = n1i=0 Bi 256n1i

The integer N is then converted to the target base b by repeated division:

dk = N mod b , N N dkb

Each digit dk maps to a character in the target alphabet. The output length L for n input bytes is:

L = n log(256)log(b)

Where: Bi = byte at index i, n = total byte count, b = target base (46 or 64), dk = digit at position k in target encoding, L = output string length. Leading zero bytes are preserved as leading zero-characters in the target alphabet to ensure round-trip fidelity.

Reference Data

EncodingAlphabet SizeCharacters UsedBits per CharEfficiency vs RawPaddingCommon Use
Binary (Raw)2560x00 - 0xFF8.000100%NoneFile storage
Base85 (Ascii85)85! - u6.40980.1%ContextPostScript, PDF
Base6464A - Z, a - z, 0 - 9, +/6.00075.0%=Email, Data URIs
Base64url64A - Z, a - z, 0 - 9, -_6.00075.0%OptionalJWT, URLs
Base58581 - 9, A - H, J - N, P - Z, a - k, m - z5.85873.2%NoneBitcoin addresses
Base46460 - 9, A - Z, a - j5.52469.0%NoneRestricted charsets
Base36360 - 9, A - Z5.17064.6%NoneURL shorteners
Base3232A - Z, 2 - 75.00062.5%=TOTP, file names
Hexadecimal (Base16)160 - 9, A - F4.00050.0%NoneColor codes, hashes
Octal (Base8)80 - 73.00037.5%NoneUnix permissions
Binary (Base2)20, 11.00012.5%NoneLow-level debug
Ascii85 (Z85)85Printable ASCII subset6.40980.1%NoneZeroMQ
Base9191ASCII 33 - 126 excl. -6.50781.3%ContextCompact text encoding

Frequently Asked Questions

A smaller alphabet requires more characters to represent the same information. The ratio is log(64) / log(46) ≈ 1.085, meaning Base46 output is about 8.5% longer. For a 100-character Base64 string representing 75 bytes, the Base46 output will be approximately 109 characters.
The Base46 alphabet consists of 46 characters: digits 0-9 (10 chars), uppercase A - Z (26 chars), and lowercase a - j (10 chars). This avoids special characters like +, /, and = that cause issues in URLs, filenames, and certain database fields.
Yes. The converter decodes Base64 to raw bytes and re-encodes to Base46 regardless of content. Images, PDFs, or any binary payload encoded as Base64 will transcode correctly. However, for large files (over 1 MB of Base64 text), browser memory may become a constraint since BigInt arithmetic scales quadratically with input length.
Yes. The transcoding preserves leading zero bytes and uses arbitrary-precision arithmetic (BigInt). Converting Base64 → Base46 → Base64 returns the exact original string, including padding. No bits are lost or rounded.
Standard Base64 uses = padding to ensure the encoded length is a multiple of 4. This tool strips padding before decoding to bytes, then re-applies correct padding when encoding back to Base64. For Base46, no padding is used - the byte-length prefix embedded in the encoding handles alignment.
The converter validates every character against the expected alphabet before processing. Invalid characters are flagged with their position index in the error message. Whitespace and newlines are silently stripped before validation, since Base64 strings are often line-wrapped at 76 characters per RFC 2045.