Convert numbers between decimal and Base16 (hex), Base32, and Base64 in both directions, with automatic base detection. Encode a decimal or decode an encoded value.
Convert between decimal numbers and standard base encodings (Base16/Hex, Base32, Base64). Enter a value in either field to convert.
Enter a positive integer (max: 9,007,199,254,740,991)
Enter a Base16, Base32, or Base64 encoded value
A base converter turns a number from one way of writing it into another. Computers, URLs, and data formats rarely store a plain decimal number — they pack it into a more compact or transport-safe encoding such as Base16 (hexadecimal), Base32, or Base64. This tool converts both directions: type a decimal number and see its Base16/Base32/Base64 form, or paste an encoded value and get the decimal back. It also detects which base an encoded value is in.
Every positional number system has a base (or radix) — the number of distinct symbols it uses for a single digit. Decimal is base-10 (0–9). The encodings here trade a larger symbol set for a shorter string:
0-9 and A-F. Each character carries 4 bits. Ubiquitous
for colour codes (#FF0000), memory addresses, and hashes.A-Z and 2-7 (RFC 4648). Each character carries 5 bits. Case-insensitive
and free of easily-confused characters, so it survives being read aloud or typed by hand.A-Z, a-z, 0-9, +, and / (RFC 4648). Each character carries 6 bits.
The standard way to carry binary data through text-only channels such as email or a JSON field.The higher the base, the fewer characters the same number needs — but the larger the alphabet you have to keep straight.
The tool has two fields and works in whichever one you type:
Values are limited to JavaScript's maximum safe integer, 9007199254740991 (that is 2^53 − 1). Above it, integers can no longer be represented exactly, so a converter that kept going would return silently wrong digits — the tool reports an out-of-range error instead of guessing. Decimal input must be a non-negative integer; encoded input must use only the characters valid for its base, or the tool flags it rather than decode garbage.
FF, because 255 = 15×16 + 15 and both digits are F. This is why
#FFFFFF is white: three bytes each at their maximum.3E8 (3×256 + 14×16 + 8 = 1000).FF. Detected as Base16, decodes to 255.FF in hex — one hex character per 4 bits, so two characters per
byte. The same byte needs a longer string in Base32 and a padded group in Base64, which is why hex
stays the readable choice for short values like colours and addresses.data: URIs, email attachments (MIME), embedding images or certificates inside JSON or
XML, JWT tokens.Because each encoding is just a representation of the same underlying number, converting between them never changes the value — only how many characters it takes to write it down and which channels it can safely travel through.
Discover more tools that might be useful for your workflow