Number Base Converter
Convert numbers between binary, octal, decimal, and hexadecimal instantly.
Type a number in any field to convert all bases instantly.
Quick Reference (0–15)
When a number base converter is the right tool
Use this page to translate a non-negative integer among binary, octal, decimal, and hexadecimal in the browser. Type in one box; the others follow. It is not a floating-point or big-integer converter. For grouping and scientific display of a decimal, see Number Format Converter.
Use cases
Reading a hex value as decimal or binary
Enter FF in Hex (or 255 in Decimal). The binary and octal fields fill in. The 0–15 table under the form is a short nibble cheat sheet, not an input.
Copying a single base
Use Copy on that card. The clipboard gets the digits only — for hex, FF, not 0xFF.
How conversion works
The active field is parsed at its base. If the result is a number greater than or equal to zero, the four representations are written back. Emptying the field you are editing clears all four.
255
11111111
377
FFWhat this tool does not do
It does not convert fractions (the decimal point is truncated by parseInt), signed values, or bases other than 2, 8, 10, and 16, and it is not safe for integers past the 53-bit range. Conversion stays in your browser.
How to use Number Base Converter
- Type digits into Binary, Octal, Decimal, or Hex — without a 0b / 0o / 0x prefix.
- Read or copy the other bases. Use Clear to reset all fields.
Frequently asked questions
How does Number Base Converter work?
Type a non-negative integer in any of the four fields — binary (base 2), octal (base 8), decimal (base 10), or hex (base 16). The other three update as you type. Hex output is uppercase, and the field you are editing is also uppercased. Copy writes that field’s digits only, without a 0b, 0o, or 0x prefix. Those prefixes are labels in the UI, not part of the value.
Should I include 0b, 0o, or 0x in the input?
Usually no. The labels are decoration. parseInt in the browser is used under the hood: 0xFF in the hex box does convert to 255, but 0b10 in the binary box becomes 0 (parsing stops at b), and 0o17 in the octal box becomes 0 for the same reason. Type the digits only.
Why was a “wrong” value accepted, or why did a large number change?
JavaScript parseInt reads a valid prefix and ignores trailing junk, so 19 in octal becomes 1, and 10.5 in decimal becomes 10, without an error. A completely invalid string (for example G in hex) shows “Invalid number for this base.” Conversion uses IEEE-754 numbers, so integers above 2^53−1 (9,007,199,254,740,991) can lose precision. Negatives are rejected.
Is my number uploaded?
No. Conversion runs in your browser. Clear empties all four fields. A 0–15 quick-reference table is shown under the inputs.
Related tools and guides
References
- Conversion uses the language’s
parseIntandNumber#toString. That is convenient for everyday integers and is not an arbitrary-precision calculator.