How to use Number Base Converter
- Enter a signed whole number and select the base it is written in. A prefix such as 0x must agree with that choice.
- Select the output bases you need: binary, octal, decimal, hexadecimal or base 36.
- Optionally choose an 8-, 16-, 32- or 64-bit two's-complement view, or try reading the value as UTF-8 bytes.
- Read the conversion table, including any range or text-decoding warning. Copy a value with its base or download the text report.
- Select any source base from 2 to 36, add target bases if needed, and use a fractional point or up to 100 pasted numbers.
Example: Number Base Converter
Write decimal 255 in binary and hexadecimal without changing its value.
Options
- The number above is written in
- Set the source base before you type, so a leading 0b, 0o or 0x is checked against your choice instead of guessed.
- Grouping separators
- Spaces, underscores and apostrophes inside a long number are ignored, which helps with a pasted value that was already grouped. A separator at the start or end is reported.
- Output bases
- Select any of the five displayed bases. Selecting the source base includes an unchanged row for comparison.
- Two’s-complement bit view
- Shows the value as a signed two’s-complement pattern at the chosen width. A value outside that signed range is reported rather than wrapped.
- Read the number as UTF-8 text
- Reads the bytes the value stands for, up to 8 bytes, and shows the text and the byte hex. A value with no valid text reading says so.
- Additional target bases
- Enter any bases from 2 to 36, separated by commas. Duplicate targets are shown only once.
- Maximum fractional digits
- Choose 1 to 200 digits. Rational arithmetic remains exact internally; non-terminating outputs are truncated and clearly labeled.
- Batch numbers
- Up to 100 nonempty lines replace the single input. Each row uses the selected source base, with errors reported per input.
Supported inputs and limits
- Bases 2 through 36 use digits 0–9 and letters A–Z.
- Each value is limited to 1,000 input digits and each whole-number output to 4,000 digits.
- Fractions use exact rational arithmetic internally and are truncated after the selected 1–200 fractional digits when necessary.
- Up to 100 batch inputs are accepted.
- Bit patterns and UTF-8 byte interpretations apply to whole numbers only.
More details
A leading 0b, 0o or 0x must match the selected source base.
Where your input is processed
This tool does not upload your inputs. See the limits for anything saved on your device.
Place value is what changes
A number keeps its value when its representation changes. Decimal 255 is two hundreds, five tens and five ones. In hexadecimal it is FF: fifteen sixteens plus fifteen. The conversion table shows these equivalent representations side by side.
Why exact integers matter
Floating-point numbers hold a fixed number of significant digits, so a long identifier can gain a rounded tail. Values here stay exact from input to output, which is why a 17-digit input converts without altering its last digit.
Questions about Number Base Converter
Why is my 0x value rejected?
The prefix must name the base you selected. 0x means base 16, so it fails when the field is set to base 2 or 10.
Why does a 16-digit number keep its last digit?
The digits are held as an exact integer. A JavaScript Number would round anything above 9,007,199,254,740,991.
Does it understand two's complement?
Yes. Choose a two's-complement bit width to show the signed integer as a binary pattern. For example, decimal -1 becomes 11111111 at 8 bits. This is an output view; an entered binary pattern is still read as an ordinary signed integer unless you supply a minus sign.
Are fractional conversions exact?
Terminating fractions are exact. A repeating expansion stops at your chosen precision and is labeled as truncated. The tool does not disguise a finite preview as the complete fraction.