YourTools.
简体中文
Back to the catalog
Tools

Number base converter

Convert integers of any size between bases 2 and 36, one per line, with optional two’s complement for signed 8 to 128-bit values.

Process locally

Files stay in this browser session. Closing or clearing releases them.

Add text

Type or paste the text to process

Adjust settings

Optional: From base, To base, Signed numbers and more

Number base converter

Run

Processes in this browser; cancel at any time

Add text first

About this tool

Convert whole numbers between any bases from 2 to 36, such as decimal to binary or hex for programming homework, a memory address or a set of bit flags. Put one number per line to convert a whole list in one run.

Integers of any size are supported. Negative values either keep their minus sign or become two’s complement patterns at 8, 16, 32, 64 or 128 bits, and the output can use uppercase letters and a 0x, 0b or 0o prefix. Fractions are not supported. The conversion runs in your browser.

How to use it

  1. Under “Add text”, type or paste one whole number per line, or select “Use example”.
  2. Under “Adjust settings”, set “From base” and “To base”, each from 2 to 36. The default converts base 10 to base 16.
  3. For negative numbers, choose “Plain values (minus sign kept)” or “Two’s complement at the bit width” under “Signed numbers”, and pick a “Bit width”.
  4. “Uppercase letters” is on by default; tick “Add 0x, 0b or 0o prefix” if you want one. Then select “Run”.
  5. Check the results line by line under “Preview and download”, then download them as a text file.

Formats and limits

Input
Text
Output
Plain text
Size limit
1 MB
Settings
From base; To base; Signed numbers (Plain values, Two’s complement at the bit width); Bit width (8-bit, 16-bit, 32-bit, 64-bit, 128-bit); Uppercase letters; Add 0x, 0b or 0o prefix
Privacy
Files stay in the current browser session. No file bytes are uploaded.
Price
Free, no sign-up

Common questions

How are negative numbers converted?

With “Plain values (minus sign kept)”, the sign stays as it is, so -10 becomes -A in base 16. With “Two’s complement at the bit width”, a negative decimal becomes its bit pattern, for example -1 is FF at 8 bits, and binary or hex results are padded to the full width. A number outside the range of the chosen width stops the run with an error.

How is a hex or binary pattern read back as a signed number?

Choose “Two’s complement at the bit width” and convert to base 10. Input in another base without a sign is read as a bit pattern, so at 8 bits FF becomes -1, 80 becomes -128 and 7F stays 127.

Can it convert fractions or decimals like 3.14?

No, only integers. A line with a decimal point stops the run, and the error names the value that could not be read.

How large can the numbers be?

In plain mode there is no fixed number of digits, so values far beyond 64 bits convert exactly. The input text can be up to 1 MB, and two’s complement works up to 128 bits.

Can the input include a 0x prefix or separators?

Yes. When “From base” is 2, 8 or 16, a matching 0b, 0o or 0x prefix is accepted. Spaces and underscores inside a number are ignored, as in 1_000, and letters can be upper or lower case.