onlinetools.dev

Number Base Converter

Convert numbers between binary, octal, decimal, hex and any base up to 36

Runs locally
loading…
About this tool

Type a number in any base and read it in binary, octal, decimal and hex simultaneously — plus any custom base up to 36. Prefixes are understood (0x, 0o, 0b), digit grouping makes long values scannable (1111 1111 · 255 · ff), and a bit-length readout tells you at a glance whether a value fits in 8, 32 or 64 bits.

Arithmetic uses BigInt, so precision is exact at any size: file permissions, ARGB colors, IP addresses, hash prefixes and 64-bit database IDs all convert without the silent rounding that hits ordinary JavaScript numbers above 2⁵³.

Negative numbers keep their sign across all bases. Everything computes locally, instantly, as you type.

Frequently asked questions

How does auto-detection decide the base?
By prefix: 0x means hex, 0o octal, 0b binary; anything else parses as decimal. Digits like "ff" without a prefix are ambiguous, so select HEX explicitly — the error message will remind you.
Are huge numbers really exact?
Yes — conversion runs on BigInt, which is arbitrary-precision. 18446744073709551615 (2⁶⁴−1) round-trips exactly; a float-based converter would corrupt it to …551616.
How are negative numbers shown in binary?
With a minus sign (-1010), not two's complement, since two's complement requires a fixed width. To see a two's-complement pattern, add 2ⁿ to your negative value for the width you care about and convert that.
What can base 36 be used for?
Compact IDs: 0-9 plus a-z is the densest alphabet that stays case-insensitive and URL-safe. Many URL shorteners and ticket systems encode numeric IDs this way — paste one and read the underlying number.
Related tools