Number Base Converter

Convert numbers between binary, octal, decimal, and hexadecimal. Instant conversion as you type — all in your browser, no upload.

About the Number Base Converter

This number base converter runs entirely in your browser. Type a value into any of the four fields — binary, octal, decimal, or hexadecimal — and the other three update instantly. Nothing is uploaded to a server — the conversion happens with JavaScript on your device as you type.

What are number bases?

A number base (or radix) is the number of unique digits used to represent values. We normally count in base 10 (decimal) with digits 0–9, but computers and other fields use other bases:

  • Binary (base 2) — Uses only 0 and 1. The native language of digital electronics, where every bit is on or off.
  • Octal (base 8) — Uses digits 0–7. Each octal digit maps neatly to three binary digits, which made it popular on older systems with 12- or 36-bit words.
  • Decimal (base 10) — Uses digits 0–9. The everyday base for human counting, likely because we have ten fingers.
  • Hexadecimal (base 16) — Uses digits 0–9 and letters A–F. Each hex digit maps to four binary digits, making it the standard compact way to write byte values and memory addresses.

Common use cases

  • Hex colors — Web colors like #FF5733 are written in hexadecimal, where each pair of digits is a red, green, or blue channel from 0 to 255.
  • Binary flags — Permission bits, feature flags, and bitmasks are easiest to read in binary, where each position represents one on/off switch.
  • Octal file permissions — Unix and Linux file permissions (such as 755 or 644) are written in octal because each digit encodes read, write, and execute for owner, group, and others.
  • Memory addresses — Debuggers and low-level tools show memory addresses and byte dumps in hexadecimal for compactness.

How to use the converter

  1. Type a value into any one of the four fields (binary, octal, decimal, or hexadecimal).
  2. The other three fields update automatically as you type.
  3. If you enter an invalid digit for a base (for example a 2 in binary), the field shows a red border and the others are not updated.
  4. Click Copy all to copy all four values, or Clear to reset every field.

Frequently asked questions

Does this tool upload my data? No. All conversion happens locally in your browser. Your input never leaves your device.

Are negative numbers supported? The converter works with non-negative integers. For negative values, enter the magnitude and apply the sign yourself, since representations like two's complement depend on a chosen bit width.

What about fractional numbers? This tool handles integers only. Fractional values in other bases require a fixed number of fractional digits and are not converted here.

Is there a size limit? JavaScript can safely represent integers up to 253−1 (about 9 quadrillion). Values beyond that may lose precision because they exceed the safe integer range of the Number type.