Number Base Converter

About the Number Base Converter

Numbers are represented differently depending on context — binary for low-level bit flags, octal for legacy Unix file permissions, decimal for everyday math, and hexadecimal for memory addresses, color codes, and hashes.

This tool converts a number between binary, octal, decimal, and hexadecimal simultaneously — type a value into any one field and the other three update instantly.

How it works

Common use cases

Frequently asked questions

Why does the hex field accept a 0x prefix?

A leading `0x` is a common convention for marking a value as hexadecimal in code (like in C, JavaScript, or Python); this tool strips it automatically before parsing so you can paste hex values copied directly from code.

What counts as an invalid number for a given base?

Each base only allows specific digits — binary allows 0-1, octal allows 0-7, decimal allows 0-9, and hex allows 0-9 and A-F. Typing a digit outside that range (like an '8' in an octal field) triggers the error message.

Does this tool support negative numbers?

The conversion is built around standard non-negative integer parsing; for negative values or two's-complement representations, additional context (like bit width) is needed that this simple four-field converter doesn't capture.

Can I convert very large numbers?

It uses standard JavaScript number parsing, which is reliably precise up to about 2^53; extremely large integers beyond that range may lose precision, similar to any standard calculator.

This tool runs entirely in your browser — nothing you enter is sent to a server. Read more in the Privacy Policy, or browse the full list of tools.