Tools › Developer
Number Bases
Decimal, hexadecimal, octal, binary, Base62 and any base from 2 to 36; type in any box. Also a number as a fixed-width signed integer with its byte order, and text as binary, octal, decimal or hex character codes.
About this tool What it's for, how to use it and an example
What it's for
Convert whole numbers between decimal, hexadecimal, octal, binary and Base62. Handy for colour values, bit flags, memory addresses, file permissions, network masks and short IDs.
For example, when a log or a spec gives a value in hex, type it here to see it in decimal, or check which bits are set in a flag value.
How to use it
Type in any of the five boxes and the others update as you type. Prefixes such as 0x, 0o and 0b are ignored, as are spaces and underscores, so you can paste values like 0xFF_FF or 1111 0000. Negative numbers work, and the tool shows how many bits the number needs.
Base62 uses the digits 0-9, then A-Z, then a-z (so z is 61 and 10 is 62), and capitals matter, unlike hex. Other Base62 alphabets, such as lowercase letters first, give different text for the same number. Any base takes a base from 2 to 36, using the letters a to z after 9; the base is remembered.
As a fixed-width integer shows the number at 8 to 128 bits: unsigned and signed (two’s complement), in binary, and its bytes in big-endian and little-endian order. Type -1 to see ff ff ff ff, or 4294967295 to see it read as -1.
Text as character codes turns text into the numbers of its UTF-8 bytes, in binary, octal, decimal or hex, and back: type in either box. Codes can be separated by spaces or commas; binary and hex without separators are cut into bytes.
Example
Type this in Decimal:
255
Hexadecimal shows ff, Octal shows 377, Binary shows 11111111, Base62 shows 47, and the tool reports 8 bits.
Good to know
Only whole numbers: fractions and decimal points aren’t supported. There’s no size limit, so very large numbers convert exactly. Character codes are UTF-8 bytes, so an accented letter or emoji is two to four codes.
As a fixed-width integer
Text as character codes
Type in any box. Any size of whole number works; 0x, 0o and 0b
prefixes, spaces and underscores are ignored. Bases above 10 use letters for the digits after 9; Base62 uses
0-9, A-Z, a-z, and capitals matter.
Private: this tool runs in your browser. Nothing you type, paste or choose leaves this page.
Saved you a few minutes? Say thanks with a coffee.
Something wrong with this tool, or missing from it? Report a bug or suggest a feature.