Number Base Converter

Convert numbers between binary, octal, decimal, hexadecimal, and any custom base...

SecureFastFree

Updated

Convert a number between bases

Base 2
Base 8
Base 10
Base 16
Any base from 2 to 36 (digits 0-9 then A-Z)

Bit view

8 bits
1111 1111

Two's complement (signed, fixed width)

1111 1111

255 does not fit in a signed 8-bit integer (range -128 to 127); the pattern below is the wrapped value.

Quick examples

Number base reference

DecimalBinaryOctalHex
0000
1111
21022
81000108
10101012A
15111117F
16100002010
64100000010040
25511111111377FF

Quick answer

To convert between binary, decimal, and hex, type your number into any field and the others update at once. Decimal 255 is binary 11111111, octal 377, and hexadecimal FF, because each hex digit maps to exactly four binary bits. This converter runs entirely in your browser and uses BigInt, so it stays exact even for very large numbers: decimal 12345678901234567890 is hex AB54A98CEB1F0AD2 with no rounding. It also shows the grouped bit view, the bit width, a signed two's complement pattern at 8, 16, 32, or 64 bits, and conversion to any custom base from 2 to 36.

SSL Secured
256-bit Encryption
Cloud Processing
Mobile Friendly

Converter Features

Five-Way Live Convert - Binary, octal, decimal, hex, and a custom base from 2 to 36, all in sync
Grouped Bit View - Binary shown in 4-bit nibbles with the exact bit width
BigInt Precision - Exact for numbers of any size, no floating point rounding
Two's Complement - Signed 8, 16, 32, and 64-bit patterns with an overflow flag
Digit Validation - Names the invalid digit for the base you are typing in
Copy Any Base - One tap copies the exact value from any field

Why Use Number Base Converter?

Every Base at Once

Type in binary, octal, decimal, or hex and the other three update live. A fifth field converts to any custom base from 2 to 36 at the same time.

Live Bit View

See the binary grouped into nibbles like 0100 1101, with the exact bit width shown, so you can read a byte or a register value at a glance.

Exact BigInt Math

Big values are handled with BigInt, so a 20-digit number converts to hex with zero rounding. No silent precision loss past 2 to the power 53.

Two's Complement View

Read the signed 8, 16, 32, or 64-bit two's complement pattern for any value, clearly labelled, with an overflow note when a number will not fit the width.

Friendly Digit Checks

Type a 2 in the binary field or a G in hex and the tool names the bad digit instead of silently guessing, so you fix the input in one read.

100% In Your Browser

Every conversion runs on your device with JavaScript BigInt. No number you type is ever uploaded, logged, or sent to a server.

Common Uses for the Base Converter

Programming and Debugging

Read hex color codes, bit flags, and memory addresses as decimal or binary while you work.

Unix File Permissions

Type 755 in the octal field to see the binary rwxr-xr-x pattern behind a chmod value.

Embedded and Firmware

Inspect register values and masks with the bit view and the fixed-width two's complement panel.

Computer Science Study

Check homework on radix conversion, signed integers, and two's complement against exact answers.

How It Works

1

Type a number in any base

Enter a value in the binary, octal, decimal, or hex field. The field you are editing is highlighted and the others convert instantly.

2

Read every base together

See binary, octal, decimal, hex, and your chosen custom base side by side, plus the grouped bit view and the two's complement pattern.

3

Copy the value you need

Press Copy next to any base to put that exact representation on your clipboard, ready to paste into code, a config file, or a calculator.

Tips and Best Practices

Read Bytes in Nibbles

The bit view groups binary in fours, so 0100 1101 reads as two hex digits (4 and D). Once you see the nibble split, converting hex to binary in your head becomes trivial.

Use the Custom Base for Base 32

Set the custom base to 32 to work with base 32 style values, or to 36 for the shortest alphanumeric form. Changing the base reconverts the current value instead of clearing it.

Pick the Right Width for Signed Values

Two's complement depends on the bit width. -1 is 11111111 at 8 bits but 1111111111111111 at 16 bits, so choose the width that matches your data type before you read the pattern.

Frequently Asked Questions

Type your number into any one of the fields on this page and the others convert at once. For example, decimal 255 is binary 11111111, octal 377, and hexadecimal FF. Each hexadecimal digit maps to exactly four binary digits, so FF is 1111 1111, which is why hex is used as a compact shorthand for binary. To go the other way, type FF in the hex field and read 255 in decimal.
Type the hex digits 0 to 9 and A to F into the Hexadecimal field. Case does not matter, so 1a and 1A both read as decimal 26. You can include a 0x prefix or leave it off, and the copy button always gives you the uppercase form like FF.
Yes. This converter uses JavaScript BigInt, so it is exact for numbers of any size. For example, decimal 12345678901234567890 is hex AB54A98CEB1F0AD2 with no rounding. Ordinary calculators that use floating point start losing digits past 9007199254740991, which is 2 to the power 53 minus 1; this tool does not.
Type a minus sign in the decimal field to convert a signed value, and each base shows the signed magnitude. For a bit-level view, the two's complement panel shows the exact 8, 16, 32, or 64-bit pattern a signed integer would hold. For example, -1 at 8 bits is 11111111 and -128 is 10000000. If a value is too large for the chosen width, the tool flags it and shows the wrapped pattern.
A custom base lets you convert to and from any radix from 2 to 36, not just the common four. Bases up to 36 use the digits 0 to 9 and then the letters A to Z, so base 36 packs the most into each character. This is handy for base 32 encodings, base 12 or base 20 math, and short IDs.
Binary is how computers store data at the bit level, hexadecimal is a compact way to write binary because one hex digit equals four bits, and octal shows up in Unix file permissions such as chmod 755. Decimal stays the most natural base for everyday human counting, so a converter that shows all of them together saves constant mental math.

Related Tools