Converters

Number Base Converter

Convert integers between binary, octal, decimal and hexadecimal with live, error-checked fields.

  • Free forever
  • No sign-up
  • Runs in your browser
Share X LinkedIn

Enter a number in any base

Type in any field and the other three update live. Whole, non-negative integers only — clear a field to reset all four.

What is a number base converter?

A number base, or radix, is simply how many distinct digits a system uses to write numbers. Everyday decimal uses ten digits (0–9). Computers lean on binary (two digits, 0 and 1), and programmers often write those binary values more compactly in octal (eight digits) or hexadecimal (sixteen digits, 0–9 then A–F). The underlying quantity is identical — only the notation changes.

A number base converter translates a single integer between these notations so you can read it whichever way is most useful. This tool does it live in your browser: type a value in any of the four fields and the other three update instantly. There is no account, no upload, and nothing is stored.

How to use it

  1. Choose a field for the base you already have — binary, octal, decimal or hexadecimal.
  2. Type your number. As you type, the other three fields fill in automatically with the same value in their base.
  3. Read across. Every field now shows the identical quantity in its own notation.
  4. Copy any field with its copy button to drop the value straight into code or a document.
  5. Clear a field to reset all four and start over.

If you enter a character that doesn't belong to that base — a 2 in binary, or a G in hexadecimal — the field flags it with a short message instead of producing a wrong answer. Correct it and conversion resumes immediately.

Understanding the four bases

  • Binary (base 2) uses only 0 and 1. Each digit is a single bit, the smallest unit of computer memory. Binary is verbose for humans but native to hardware.
  • Octal (base 8) uses digits 07. It groups bits in threes and shows up in older systems and Unix file permissions.
  • Decimal (base 10) is the everyday system, digits 09. It's how we naturally read quantities.
  • Hexadecimal (base 16) uses 09 then AF. Because each hex digit maps neatly to exactly four bits, it's the favourite shorthand for memory addresses, colour codes and raw byte values.

Hexadecimal output here is upper-cased for readability, but the field happily accepts lower-case letters as you type.

Where base conversion is useful

  • Web colours. A CSS colour like #FF8800 is three hexadecimal byte values. Converting them to decimal (255, 136, 0) reveals the red, green and blue components.
  • Bit masks and flags. Reading a setting in binary makes it obvious which individual bits are switched on, while hex keeps the same value short.
  • Debugging and memory. Addresses and register contents are almost always shown in hex; converting to decimal can make arithmetic easier to reason about.
  • Learning and teaching. Seeing one number in all four bases side by side is one of the clearest ways to understand how positional notation works.

How the conversion works

Under the hood the tool relies on two well-defined operations. To read your input it uses parseInt(value, base), which interprets the characters according to the base you typed in. To produce the other notations it uses Number.prototype.toString(base), which re-expresses that integer in each target base. Because both steps share a single integer value, the four fields can never disagree.

Validation happens before parsing: each field checks your input against the exact digit set its base allows, so an out-of-range character is caught early and reported clearly rather than silently producing nonsense.

Tips for accurate results

  • Skip prefixes. Type just the digits — enter 1010, not 0b1010, and FF, not 0xFF. The field already knows its base.
  • Mind the digit set. Hexadecimal stops at F; there is no G. Octal stops at 7. The inline error reminds you which digits are valid.
  • Use whole numbers. This tool is designed for non-negative integers, which covers the vast majority of byte, colour and bit-pattern work.
  • Very large values. Conversions stay exact within the range of safe integers; extremely large inputs are flagged rather than rounded, so you never get a misleading answer.

Why this converter is private and reliable

All four conversions are computed locally with the browser's own number handling — there is no network request, no logging, and no history retained. Whatever you type, from a quick colour-code check to a long binary string, never leaves your device. Convert, copy the result, and move on, confident that the calculation was instant, exact within its supported range, and entirely yours — and when you need to convert measurements rather than number systems, the unit converter works the same private, in-browser way.

Frequently asked questions

Comet's got your back

Stuck on something? Every tool has a short guide and FAQ — and Comet can point you to the right spot.

Visit help centre