Number Base Converter

Convert between decimal, binary, hexadecimal, and octal — instantly in your browser.

Decimal base 10
Digits 0–9
Binary base 2
Digits 0–1
Hexadecimal base 16
Digits 0–9, letters A–F
Octal base 8
Digits 0–7
Enter a number above to see conversions.

How to Use

  1. Type a number into any of the four input fields (Decimal, Binary, Hex, or Octal).
  2. All other fields update automatically as you type — no button press needed.
  3. Click Copy on any field to copy that value to your clipboard.
  4. Use the quick-example buttons at the top to load common values like 255, 1024, or 65535.
  5. The summary strip at the bottom shows all four representations side by side for easy reference.

About This Tool

Positional numeral systems use a base (radix) to represent numbers. Decimal (base 10) is what humans use daily. Binary (base 2) is the native language of computer hardware — every bit is a 0 or a 1. Hexadecimal (base 16) is widely used in programming for memory addresses, color codes (#FF5733), and binary data dumps because one hex digit represents exactly four bits. Octal (base 8) appears in Unix file permissions (chmod 755) and some legacy systems. This tool converts instantly between all four bases in your browser — no data is sent to any server.

Frequently Asked Questions

Why is hex commonly used in programming?

One hexadecimal digit maps exactly to 4 bits (a nibble), so a byte (8 bits) is always two hex digits. This makes hex far more compact and readable than binary when inspecting raw memory, color values, or network packets. For example, the byte 11111111 in binary is just FF in hex.

What does the 0x prefix mean?

0x is the conventional C/C++/JavaScript prefix that marks a literal as hexadecimal. For example, 0xFF equals decimal 255. This tool accepts values with or without the 0x prefix in the hex field.

How large a number can I convert?

This tool uses JavaScript's BigInt for arbitrarily large integers, so you can safely convert numbers well beyond 32-bit or 64-bit limits — up to hundreds of digits. Floating-point (decimal) numbers are not supported; only integers.

Related Tools