How to use the Number Base Converter
- Paste a number, such as
255,0xff,0b1010or0o17. - Leave From on Auto, or pick Binary, Octal, Decimal or Hex to force the input base.
- Toggle Group digits and Uppercase to change how the result is formatted.
A single value is shown in five bases, with the base it was read as and its bit length in the status bar. For 0xDEADBEEF:
Binary (2) 1101 1110 1010 1101 1011 1110 1110 1111
Octal (8) 33653337357
Decimal (10) 3,735,928,559
Hex (16) dead beef
Base 36 1ps9wxb
Read as base 16 · 32 bits
Input formats
| Input | Read as |
|---|---|
255 |
Decimal |
0xff, ff, DEADBEEF |
Hex (prefix, or letters a–f) |
0b1010 |
Binary |
0o17 |
Octal |
-42 |
Negative decimal |
1_000_000, 1,000,000 |
Decimal (separators are ignored) |
Spaces, underscores and commas inside a number are ignored, so you can paste grouped values straight from logs or code. A digit that doesn’t fit the base is reported precisely, for example '2' is not a valid base-2 digit.
Grouping
With Group digits on, binary and hex are split into groups of four digits (one nibble in binary, two bytes in hex), and decimal gets thousands separators. Turn it off to copy values straight into code.
Batch mode
Paste one number per line to convert them all to the base chosen in Batch to:
255 → ff
0b1010 → a
0o17 → f
ff → ff
12345678901234567890 → ab54a98ceb1f0ad2
Each line’s input base is detected separately in Auto mode, so mixed input works. With From set, every line must use that base.
Where this helps
- Reading hex dumps and memory addresses. For whole byte sequences, the Base64 decoder shows binary data as a hex dump.
- Checking bit flags and permission masks in binary.
- Converting hash prefixes from the Hash Generator, or large IDs, between hex and decimal without losing precision.
- Comparing Unix permissions in octal, such as
755. - Reading the timestamp inside a UUID v7 from the UUID Generator. Its first 12 hex digits are Unix milliseconds:
0x0199b1c2d3e4is1759623959524, which the Unix Timestamp Converter shows as 2025-10-05T00:25:59.524Z.
Why arbitrary precision matters
JavaScript numbers are 64-bit floats, so any integer above 2^53 (9,007,199,254,740,992) is silently rounded by parseInt and Number. Database IDs, 64-bit hashes and cryptographic values routinely exceed that. This converter parses every digit into a BigInt, so a 97-bit value such as 123456789012345678901234567890 converts to hex and binary exactly, and converting the result back returns the original number.
In code
(255).toString(16); // 'ff'
parseInt('ff', 16); // 255 — loses precision above 2^53
BigInt('0xdeadbeef').toString(2); // exact for any size
hex(255), bin(10), oct(15) # '0xff', '0b1010', '0o17'
int('deadbeef', 16) # 3735928559
Frequently asked questions
How big can the numbers be?
There is no fixed limit. Conversion uses arbitrary-precision integers (BigInt), so a 30-digit decimal or a 128-bit hex value converts exactly, without the rounding you get above 2^53 with ordinary JavaScript numbers.
How does Auto decide the input base?
A 0x prefix means hex, 0b means binary and 0o means octal. Without a prefix, a value that contains the letters a–f is read as hex, and anything else as decimal. Set From explicitly when the value is ambiguous, for example 10 meant as hex.
Are negative numbers supported?
Yes. A leading minus sign is kept in every base, so -42 becomes -101010 in binary and -2a in hex. The tool does not produce two's-complement representations.
Are fractions supported?
No. Only whole numbers are converted. A decimal point is reported as an invalid digit.
Is my data uploaded?
No. Conversion runs in your browser. Nothing is uploaded.
Last updated