Skip to content

Number Base Converter

Convert numbers between binary, octal, decimal, hexadecimal, and any base 2-36

Convert between binary, hex, decimal, and everything else

What’s 0xDEADBEEF in decimal? How do you write 255 in binary? What’s the octal equivalent of chmod 755?

Type a number in any base, decimal, hex (0x prefix), binary (0b prefix), octal (0o prefix), or any custom base from 2 to 36, and see it converted to all four major formats simultaneously. Copy whichever format you need.

The four bases that matter

Binary (base 2): 0s and 1s. The language of hardware. Every value in a computer is binary under the hood, even if you never look at it that way.

Octal (base 8): digits 0-7. Each digit maps to exactly 3 binary bits. Mostly a relic, except in Unix file permissions where 755 = 111 101 101 in binary. The Chmod Calculator works with these directly.

Decimal (base 10): what humans use. The default in most programming languages.

Hexadecimal (base 16): 0-9 plus A-F. Each hex digit is exactly 4 binary bits, making it the compact way to represent bytes. FF is cleaner than 11111111. Color codes, memory addresses, byte values, all hex.

Conversions you’ll keep looking up

255 = 0xFF = 0b11111111, max value of a byte. Shows up in RGB colors, subnet masks, everywhere.

127 = 0x7F = 0b01111111, max signed 8-bit integer. Last ASCII character code.

0xDEADBEEF = 3735928559, the famous debug magic number for marking uninitialized memory.

755 (octal) = 111 101 101 (binary), the standard directory permission on Unix.

Beyond base 16

The tool supports bases up to 36, using the full alphanumeric set (0-9, A-Z). Base 36 is occasionally used for compact URL-safe identifiers. Input is case-insensitive.

Negative numbers work too, prefix with a minus sign.

For bitwise operations on these numbers, the Bitwise Calculator is also available.

FAQ

What bases are supported?

Every integer base from 2 to 36. The four most common are shown by default, plus a custom base field.

Negative numbers?

Yes, prefix with a minus sign and all output formats show the negative result.

Floating point?

Integers only. Floating-point base conversion is a different problem with different considerations.

Client-side?

All calculations happen in your browser, nothing gets sent anywhere.

binary octal decimal hexadecimal base-converter number

Related Tools

More in Developer Tools