Skip to content
apikey.tools
ENCEncoding

Binary, Hex & Radix Token Converter

Convert one value into nine bases at once, from binary through Base64.

ENCRuns in this tabInput not transmitted

Input

bits

Output

computing

Every base represents the same underlying number. What changes is density and which characters are used — which matters when a value has to survive a URL, a filename, a case-insensitive system or a human reading it aloud.

The bases, and where each is used

BaseAlphabetTypically used for
201Bit flags, permission masks, protocol fields
80-7Unix file permissions
100-9Human-facing numbers
160-9a-fHashes, keys, memory addresses, colours
32RFC 4648TOTP secrets, case-insensitive identifiers
360-9a-zCompact case-insensitive IDs
58Bitcoin alphabetValues a human transcribes
620-9A-Za-zShort URLs, compact IDs
64Base64Binary in text channels

Density in practice

A 128-bit value:

  • Binary: 128 characters
  • Hex: 32 characters
  • Base32: 26 characters
  • Base58: 22 characters
  • Base62: 22 characters
  • Base64: 22 characters

Base58 and Base62 land in the same place as Base64 while being URL-safe and, for Base58, transcription-safe. That is why short-link services and Bitcoin addresses use them.

Bit length is the useful readout

The bit length tells you how much entropy a value can hold. A token displayed as 22 Base62 characters carries at most 130 bits — and exactly that only if it was generated as random bytes. If it was generated as a counter, its bit length says nothing about its unpredictability.

This is the distinction between representation and entropy: converting a value to a denser base does not make it stronger. The entropy calculator measures the latter.

Leading zeros

Numeric bases drop leading zeros, because 007 and 7 are the same number. That matters for byte sequences: hex 00ff and ff are the same integer but different byte arrays.

Base58 handles this explicitly, encoding each leading zero byte as a 1 — which is why Bitcoin addresses beginning 1 do so consistently. If you are converting a fixed-width byte sequence rather than a number, use the hex converter, which preserves byte boundaries.

Frequently asked questions

Why is my Base64 output different from another tool's?

Probably leading zeros. This tool treats the input as a number, so leading zero bytes vanish. Byte-oriented conversion preserves them — use the Base64 encoder with hex input for that.

What is the largest value I can convert?

Arbitrary precision, using JavaScript BigInt. A 4096-bit RSA modulus converts without loss.

Which base for a short URL?

Base62. It is URL-safe without encoding, dense, and every character is a normal alphanumeric. Base58 if the code might be read aloud or typed from a printed page.

Is Base32 the same as base 32?

Not quite. RFC 4648 Base32 uses A-Z2-7, deliberately excluding 0, 1 and 8 because they are confusable. Numeric base 32 would use 0-9a-v. This tool shows the RFC 4648 form, since that is what TOTP and file formats use.

More encoding tools

Convert, encrypt and unwrap key formats