OKFree Tools
Developer

Number Base Converter

Convert numbers between binary, octal, decimal and hexadecimal, with big integers and any base from 2 to 36

Runs locally in your browser. Nothing is uploaded.

Input

A minus sign and the 0x, 0b or 0o prefixes are allowed; spaces and underscores are ignored. Integers only, no decimals

Results

Type an integer such as 255 to see it in binary, octal, decimal and hexadecimal

Display

For hexadecimal and other bases above 10

How to use

  1. 1
    Choose the input base

    Select 2, 8, 10 or 16, or choose Other to pick another base from the list

  2. 2
    Enter an integer

    Paste or type the number. A minus sign, a prefix such as 0x, and spaces or underscores as separators are all fine; results update as you type

  3. 3
    Copy a result

    Binary, octal, decimal, hexadecimal and your custom base are listed together. Select Copy next to the one you need

How conversion works

  • Integers of any length

    Values are computed exactly with BigInt, so numbers beyond 2^64 keep every digit. Handy for hashes and long IDs

  • Integers only

    A decimal point is reported with its position, and scientific notation such as 1e10 isn't supported. Negative numbers convert as a minus sign plus the magnitude, not two's complement

  • Prefixes and letters

    0x, 0b and 0o mark hexadecimal, binary and octal, and are removed when they match the input base. Bases above 10 use a–z for 10–35, in either case