Number Base Converter

Convert a number between binary, octal, decimal and hex — exactly, at any size.

What you provide

Result

255 = 255 (decimal)

The same value in each base. A prefix on the input (0x, 0b, 0o) sets the base automatically; otherwise the selected base is used. Large values are exact — no precision is lost.

Diagnostic telemetry
Binary
0b11111111
Octal
0o377
Decimal
255
Hexadecimal
0xFF

What this cannot tell you

  • Whole numbers only. Fractional and negative values are not converted.
  • A 0x, 0b or 0o prefix sets the base automatically and overrides the selector.

Take this with you

Number Base Converter on RunTheTests — free browser-based devtools tools, no sign-up.