Number base converter
Convert between binary, octal, decimal, hexadecimal and any base up to 36.
Runs entirely in your browser. Your files never leave your device.
About this tool
Type a number in any field and the others update instantly: decimal, hexadecimal, binary, octal and a base of your choice from 2 to 36. It is handy for reading memory addresses, color codes, permissions such as chmod 755, bit masks and protocol values, or for checking homework in computer science.
Numbers are handled as arbitrary-size integers, so 64-bit values and far longer ones convert exactly, without the rounding errors of ordinary calculators. Prefixes like 0x, 0b and 0o, spaces and underscores are accepted, negative numbers work, and digit grouping makes long binary strings easier to read.
How it works
- Type or paste a number in the field of its base.
- Read the value in the other bases.
- Pick any base from 2 to 36 for the last field.
- Turn on grouping to split long numbers into blocks.
Digits above 9 are the letters a to z (case-insensitive). The bit count is the number of binary digits of the absolute value.
Worked example
255 is 0xFF in hexadecimal, 11111111 in binary and 377 in octal. The colour #1E90FF splits into 1E, 90 and FF, which are 30, 144 and 255 in decimal: the RGB values of the colour.
File permission 755 in octal is 111 101 101 in binary, which reads rwx r-x r-x: full rights for the owner, read and execute for everyone else.
Good to know
- One hexadecimal digit is exactly four binary digits, which makes conversions between them easy by hand.
- Use digit grouping to read long binary values four bits at a time.
- Large 64-bit identifiers are converted exactly here, unlike in spreadsheets that round after 15 digits.