Number Base Converter

Convert integers or fractions between bases 2–36, keeping whole numbers exact and labeling truncated fractions.

On-device No sign-up Free to use

Convert the integer controls

Showing an example. Edit to see your own.

?

One number per line, up to 100. Replaces the single value; each line uses the selected source base.

?

Any bases from 2 to 36, separated by commas, for example 3, 7, 12.

?

Non-terminating results are truncated at this precision and labeled as approximate.

?

Digits in the source base, with an optional fractional point. A minus sign is allowed; grouping spaces, underscores and apostrophes are ignored.

?

Set the base before typing, so a leading 0b, 0o or 0x is checked against it instead of guessed.

?

Letter digits are written in uppercase, so decimal 255 is FF in hexadecimal. Lowercase input is accepted as well.

?

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.

?

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.

Processed in your browser. Your inputs stay on this device.

Result

Showing an example.

Write decimal 255 in binary and hexadecimal without changing its value.

The integer 255 in base 10 is shown in 3 bases. One selected base is the source base, so its row repeats the value you entered.

https://usefreetools.net/number-base-converter · 20 November 2026

Was this helpful?

How to use Number Base Converter

  1. Enter a signed whole number and select the base it is written in. A prefix such as 0x must agree with that choice.
  2. Select the output bases you need: binary, octal, decimal, hexadecimal or base 36.
  3. Optionally choose an 8-, 16-, 32- or 64-bit two's-complement view, or try reading the value as UTF-8 bytes.
  4. Read the conversion table, including any range or text-decoding warning. Copy a value with its base or download the text report.
  5. 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.

You add
Number to convert: 255; The number above is written in: 10; Show binary (base 2): true; Show octal (base 8): false; Show decimal (base 10): true; Show hexadecimal (base 16): true; Show base 36: false; Read the number as UTF-8 text: false
You get
The integer 255 in base 10 is shown in 3 bases. One selected base is the source base, so its row repeats the value you entered.

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.

Page updated · Project managed by Tony Hines · Report a problem with Number Base Converter