Skip to content
Swizztool

Number Base Converter

Convert integers across Decimal (Base 10), Binary (Base 2), Hexadecimal (Base 16), and Octal (Base 8) number systems.

Decimal (Base 10)0-9
Standard decimal integer
Hexadecimal (Base 16)0-9, A-F
0x
0x prefix notation
Binary (Base 2)0, 1
0b
Formatted: 1111 1111
Octal (Base 8)0-7
0o
0o prefix notation

How to use Number Base Converter

  1. Type a number into any base field (Decimal, Binary, Hex, or Octal).
  2. View synchronized real-time conversions across all 4 numbering systems.
  3. Copy converted numerical values.

About Number Base Converter

Convert whole numbers between decimal, binary, hexadecimal, and octal. Type in any field and the other three update instantly. Very large numbers stay exact, and invalid digits are flagged instead of silently ignored.

Related tools: Universal Unit Converter, PX to REM Converter, HEX to CMYK Converter, Unix Timestamp Converter

How the bases relate

Decimal (base 10) is everyday counting. Binary (base 2) uses only 0 and 1 and is how computers store data. Hexadecimal (base 16) uses 0 to 9 and A to F; each hex digit stands for exactly four binary digits, which is why it is used for memory addresses, colors, and byte values. Octal (base 8) appears in Unix file permissions such as 755.

For example, 255 in decimal is 11111111 in binary, FF in hex, and 377 in octal.

Large and negative numbers

Numbers of any length are converted exactly, including 64-bit values such as 18446744073709551615 (FFFFFFFFFFFFFFFF), which many calculators round. Negative numbers are shown with a minus sign rather than in two's complement form.

Prefixes such as 0x, 0b, and 0o and underscores used as digit separators are accepted and ignored.

Common uses

Programming
Convert hex values, bit masks, and flags while coding.
Networking
Read IP and subnet values in binary.
File permissions
Translate octal chmod values into bits.
Computer science classes
Check base conversion homework.

Questions about Number Base Converter

What bases are supported?
Base 2 (Binary), Base 8 (Octal), Base 10 (Decimal), and Base 16 (Hexadecimal).
Can I convert fractions?
No. This converter works with whole numbers only.
How do I convert binary to decimal by hand?
Add up the place values of each 1, doubling from the right: 1011 is 8 + 0 + 2 + 1 = 11.
Can I type 0x or 0b prefixes?
Yes. Prefixes like 0xFF and 0b1010 are accepted and ignored.
Is there a size limit?
No practical limit. Large numbers, including 64-bit values, are converted exactly.

Comments

Questions, ideas, or a bug in Number Base Converter? Let us know.