Skip to main content

Number Base Converter

Convert numbers between binary, octal, decimal, hexadecimal, and more.

How it works

  1. 1

    Enter a number

    Type a number in the input field. Accepts 0x, 0b, 0o prefixes.

  2. 2

    Select input base

    Choose the base your number is in (binary, octal, decimal, hex, etc.).

  3. 3

    Copy any conversion

    See the value in all bases and copy whichever format you need.

Common use cases

  • Decimal to all

    255 (base 10)

  • Hex to binary

    FF (base 16)

About This Tool

Enter a number in any base (2, 8, 10, 16, 32, or 36) and instantly see it converted to all other bases. Supports arbitrarily large numbers using BigInt -- no precision loss even for 64-bit values and beyond.

Binary values are grouped in 4-bit nibbles for readability. Hexadecimal output is uppercase. Input accepts optional prefixes: 0b for binary, 0o for octal, 0x for hex. Invalid characters for the selected base are immediately flagged.

Common use cases: converting between hex and binary for bitwise debugging, translating RGB color values to hex, converting subnet masks between decimal and binary, and encoding/decoding base36 short IDs.

All conversion is done in your browser using JavaScript BigInt -- nothing is sent to any server.

More examples

Examples

Decimal to all

Input

255 (base 10)

Output

BIN: 1111 1111, OCT: 377, HEX: FF, B36: 73

Hex to binary

Input

FF (base 16)

Output

BIN: 1111 1111, DEC: 255, OCT: 377
Frequently Asked Questions
What number bases are supported?
Binary (2), Octal (8), Decimal (10), Hexadecimal (16), Base32, and Base36. Enter a value in any base and see all conversions instantly.
How large can the numbers be?
This tool uses JavaScript BigInt, which supports integers of arbitrary size with no precision loss. You can safely convert 64-bit, 128-bit, or larger values.
Can I enter hex with 0x prefix?
Yes. The tool accepts 0x prefix for hex, 0b for binary, and 0o for octal. The prefix is stripped before conversion.
What is Base36?
Base36 uses digits 0-9 and letters a-z, making it the highest base that uses only alphanumeric characters. It is commonly used for short URL IDs and compact encodings.

Discover More Tools

View all Developer Tools →