Language
English English Vietnamese (Tiếng Việt) Vietnamese (Tiếng Việt) Chinese (简体中文) Chinese (简体中文) Portuguese (Brazil) (Português do Brasil) Portuguese (Brazil) (Português do Brasil) Spanish (Español) Spanish (Español) Indonesian (Bahasa Indonesia) Indonesian (Bahasa Indonesia)
Number Base Converter

Number Base Converter

Convert numbers between Binary, Octal, Decimal, and Hexadecimal at once. Built for programmers, students, and anyone working across number systems.

Number Base Converter for Binary, Octal, Decimal, and Hex

This number base converter turns a value between Binary (base-2), Octal (base-8), Decimal (base-10), and Hexadecimal (base-16) and shows all four results at once. Pick an input base, type a number, and every conversion updates instantly below — no button to press and nothing to install.

It is built for the people who switch bases all day: programmers working with memory addresses and bit patterns, students learning computer science and digital electronics, system administrators setting Unix permissions like chmod 755, and web developers reading color codes such as #FF5733.

Private by design: every conversion runs entirely in your browser. Nothing you type is ever uploaded to a server.

How to Convert a Number Base

1

Select the input base

Use the Input Base tabs to choose the base of the number you have: BIN, OCT, DEC, or HEX. A hint below the field shows which characters that base accepts.

2

Enter your number

Type into the input field. Characters that do not belong to the selected base are filtered out automatically, so you cannot enter an invalid value by mistake.

3

Read all four results

Binary, Octal, Decimal, and Hexadecimal results appear at once, each with its prefix. Long values are grouped with spaces — binary in 4s, hex in 2s, decimal and octal in 3s — for easier reading.

4

Copy what you need

Press Copy on any row to copy that value with its standard prefix (0b, 0o, 0x), or use Copy All Results to grab every base at once.

Features

Instant Conversion

All four bases convert simultaneously as you type, with no button to click and no waiting.

Large Number Support

BigInt handling lets you convert 64-bit values and beyond — numbers with hundreds of digits — without losing precision.

Smart Input Filtering

Type freely: characters that are not valid for the selected base are removed automatically, preventing errors before they happen.

Formatted Output

Long results are grouped for readability — binary in groups of 4 (nibbles) and hex in groups of 2 (bytes).

One-Click Copy

Copy a single result with its prefix (0b, 0o, 0x) or copy all results at once, ready to paste into code or docs.

Quick Examples

One-click example buttons load common values like 255, FF, and DEADBEEF so you can see a conversion instantly.

Base Reference

Expand the reference panel for each base's digits, prefix, and common uses, plus a 0–15 conversion table.

Frequently Asked Questions

How do I convert decimal to binary?

Select the DEC tab, type your decimal number, and the binary result appears instantly in the BIN row. Press Copy on that row to grab it with the 0b prefix.

How do I convert binary to hexadecimal?

Choose the BIN tab and enter your bits (only 0 and 1 are accepted). The HEX row shows the hexadecimal equivalent at the same time, grouped in 2s for readability.

What is the difference between binary, octal, decimal, and hexadecimal?

They differ by how many digits each uses. Binary (base-2) uses 0–1 and is how computers store data. Octal (base-8) uses 0–7 and shows up in Unix file permissions. Decimal (base-10) uses 0–9, the everyday system. Hexadecimal (base-16) uses 0–9 and A–F, giving a compact form for binary used in colors, memory addresses, and MAC addresses.

What is the largest number I can convert?

The converter uses BigInt, so it handles integers of arbitrary size. You can convert numbers with hundreds of digits without losing precision.

What do the prefixes 0b, 0o, and 0x mean?

They are standard programming prefixes for the number base: 0b marks binary, 0o marks octal, and 0x marks hexadecimal. The Copy button includes the right prefix so the value can be pasted straight into code.

Why are there spaces in the output?

Spaces only group the digits for readability — binary in 4s (nibbles), hex in 2s (bytes), and decimal and octal in 3s. When you copy a result, you get the raw value without spaces.

Can it convert fractional or decimal-point numbers?

This converter works with whole positive integers. For negative numbers in binary you would use two's complement, which depends on the bit width (8-bit, 16-bit, 32-bit, and so on), so it is not handled here.

How do I convert a color code?

For an HTML or CSS color like #FF5733, select HEX and enter FF5733. The DEC row shows the decimal equivalent (16734003) that some color pickers use.

Valid characters: 0123456789
BIN Binary
0b
OCT Octal
0o
DEC Decimal
HEX Hexadecimal
0x
Try examples
Select the input base using the tabs (BIN, OCT, DEC, HEX)
Invalid characters are automatically filtered as you type
Results are grouped with spaces for readability
Click Copy to copy a value with its prefix (0b, 0o, 0x)
Use Copy All Results to grab every base at once
Handles very large numbers using BigInt
Want to learn more? Read documentation →
1/7
Start typing to search...
Searching...
No results found
Try searching with different keywords