Integer base converter
Convert a number between different bases (decimal, hexadecimal, binary, octal, base64, ...)
About Integer base converter
Converts an integer between number bases from 2 to 64: binary, octal, decimal, hexadecimal, base64-style digits and anything in between. Handles numbers far beyond 64 bits without losing precision.
When you would use it
- Reading a hexadecimal or binary constant from code, a register map or a packet dump as a decimal.
- Writing a decimal value as hex for a colour, a memory address or a bitmask.
- Checking file permissions or flags in octal and binary side by side.
How to use it
- Type the number and set the base it is written in (2 to 64).
- Read it in binary, octal, decimal and hexadecimal at once.
- Set a custom output base at the bottom for anything else, for example base 36 or 58.
Things worth knowing
- Digits are 0-9, then a-z, then A-Z, then + and /, in that order. So bases above 10 use lowercase letters first (hex a-f), and bases above 36 are case-sensitive, where a and A are different digits.
- The custom base 64 here is positional (a true base-64 number), not the Base64 text encoding used for files and strings. Use the Base64 tools for that.
- Only non-negative integers are supported: no minus sign, decimal point or prefixes such as 0x or 0b. Strip the prefix before pasting.
- Arithmetic uses arbitrary-precision integers, so 128-bit values and longer convert exactly.
Frequently asked questions
- Why is my hexadecimal input rejected?
- Probably because of uppercase letters or a 0x prefix. Hex digits must be lowercase a-f here (uppercase letters are digits of bases above 36), and the prefix must be removed.
- What is base 36 or base 58 used for?
- Base 36 (0-9, a-z) gives compact, case-insensitive identifiers such as short URLs. Base 58 is used by Bitcoin addresses, although Bitcoin's alphabet differs from the one here, so results are not interchangeable.