Number Base Converter
Convert number bases
What Is This Tool?
The Number Base Converter lets you type a number into any of four fields — binary, octal, decimal, or hexadecimal — and instantly see it converted into the other three. It's useful for programmers working with bitmasks, color codes, memory addresses, or any task that mixes number bases. All conversion happens locally in your browser.
How to Use
Type a number into any one of the four fields (Binary, Octal, Decimal, or Hexadecimal).
The other three fields update automatically to show the same value in their base.
Use the Copy button next to any field to copy that value.
Click Example to load a sample value, or Clear to reset all fields.
Features
- Live two-way conversion between binary, octal, decimal, and hex
- Validates that each field only contains digits valid for its base
- Supports a leading minus sign for negative numbers
- Copy buttons for each base
- 100% client-side — nothing leaves your browser
Examples
Decimal: 255
Binary: 11111111
Octal: 377
Hexadecimal: FF
Common Use Cases
- Converting a hex color or memory address into decimal for a calculation
- Checking a binary bitmask value in decimal or hex
- Working with Unix file permission octal notation
- Teaching or learning how number bases relate to each other
Frequently Asked Questions
Does this support negative numbers?
Yes, using a plain leading minus sign (e.g. -255). This tool does not implement two's-complement binary representation for negative numbers.
Why does the tool reject "2" in the Binary field?
Binary only allows the digits 0 and 1. Each field validates that its input only contains digits that are valid for that base, and shows a friendly error otherwise.
Is hexadecimal output uppercase or lowercase?
Hexadecimal output is always shown in uppercase (e.g. FF), but you can type either case into the Hexadecimal field.
Is there a limit to how large a number I can convert?
Conversion uses standard JavaScript number precision, which is reliable up to about 2^53. Extremely large values may lose precision.
Is my data sent anywhere?
No. All conversion happens locally in your browser using JavaScript. Nothing is uploaded or logged.
Which bases does this tool support?
Binary (base 2), octal (base 8), decimal (base 10), and hexadecimal (base 16) — the four most commonly used bases in programming.