Number Base Converter

Convert numbers between Binary, Octal, Decimal, and Hexadecimal.

Any base, any number

Input Base:
BinaryBase 2
Result...
OctalBase 8
Result...
DecimalBase 10
Result...
HexadecimalBase 16
Result...

Quick Reference

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

About the Number Base Converter

The Number Base Converter translates a number between binary, octal, decimal, and hexadecimal — showing all four bases at once, live, as you type into any of them. The math runs on BigInt, so values beyond 2^53 convert exactly, with none of the silent precision loss ordinary JavaScript-number converters suffer on long binary strings or large hex values. Each base is labelled with its conventional prefix (0b, 0o, 0x) and has its own copy button. Everything runs in your browser.

How to use the Number Base Converter

  1. 1Pick the base you're typing in — binary, octal, decimal, or hexadecimal.
  2. 2Type or paste the number.
  3. 3Read the equivalent value in all four bases simultaneously.
  4. 4Use the per-base copy button to grab the representation you need.
  5. 5Type into a different base's field at any time — conversion works from any base to all others.

Common use cases

  • Converting a hex memory address or color value to decimal or binary
  • Working out chmod-style octal permission values
  • Debugging bit flags and masks by seeing the binary form of a decimal constant
  • Translating 64-bit IDs exactly, where floating-point converters corrupt the tail digits
  • Learning or teaching positional number systems

Frequently asked questions

How large a number can it convert?

Effectively unlimited. The converter uses BigInt arithmetic rather than floating-point numbers, so it stays exact past 2^53 — the point where typical JavaScript converters silently round. Long binary strings, 64-bit values, and beyond convert digit-perfectly.

Which bases are supported?

Binary (base 2), octal (base 8), decimal (base 10), and hexadecimal (base 16) — the four bases programmers actually use — with the standard 0b, 0o, and 0x prefixes shown so you can paste results straight into code.

Why do programmers need base conversion?

Because different layers speak different bases: permissions and file modes are octal, memory addresses and colors are hex, bit flags and masks are binary, and humans think in decimal. Converting between them is a daily task in debugging, embedded work, and networking.

Is anything sent to a server?

No. Conversion happens entirely in your browser as you type — nothing is uploaded, logged, or stored.