Skip to content

Number Base Converter

Convert between hex, binary, decimal, and octal with bit visualization and bitwise operations

Number Base Converter

Input base

4 conversions shown

Binary
0b11001010
Octal
0o312
Decimal
202
Hexadecimal
0xca

Bit visualization

1100 1010
1
1
0
0
1
0
1
0

Bitwise operations

Result (decimal)
—

Updated . Provided as is. Check the output before you rely on it in production.

How to use Number Base Converter

  1. 1

    Enter a number

    Input a number in any base: decimal (0-9), hexadecimal (0-9, A-F), binary (0-1), or octal (0-7).

  2. 2

    Select input base

    Specify which base the input is in. The tool auto-detects common formats (0x for hex, 0b for binary, 0o for octal).

  3. 3

    Choose output bases

    Select one or multiple target bases. The tool shows conversions to all popular bases simultaneously.

  4. 4

    View all conversions

    See decimal, hexadecimal, binary, and octal representations side-by-side. Useful for debugging, bitwise operations, and protocol work.

  5. 5

    Copy any format

    Click individual bases to copy their value to clipboard. Perfect for embedding color codes (#FF5500), bitmasks, or IP addresses.

Questions and answers

How do I convert hex to decimal?
Enter your hex value, select base 16 as input, and the decimal output appears instantly alongside binary and octal representations. You can also prefix with 0x.
Can I see the binary bits visually?
Yes. The bit visualization shows each bit as a box, grouped into nibbles (groups of 4) for readability.
Does it support bitwise operations?
Yes — AND, OR, XOR, NOT, left shift, and right shift operations between two values. Results are displayed in all bases simultaneously.
Can it handle large numbers?
Yes, the converter uses BigInt for numbers that exceed the standard 32-bit or 64-bit range, supporting arbitrarily large integers.
What bases are supported?
Any base from 2 to 36, with presets for Binary (2), Octal (8), Decimal (10), and Hexadecimal (16). Custom base input is available for specialized conversions.

Use it as an API

Number Base Converter is also callable as a free HTTP JSON API at https://aidevhub.io/api/number-base-converter/ — GET with query parameters or POST with a JSON body, no authentication, CORS enabled, fair use (abusive traffic is throttled at the edge; there is no per-request quota header). Responses return { ok, tool, result, meta }.

curl -s "https://aidevhub.io/api/number-base-converter/?value=255&from_base=10&to_base=16"

Machine-readable contract: /api/tool/number-base-converter.json All API endpoints: /agents/ LLM site index: /llms.txt

For AI agents: how to call this tool

Machine-readable contract, endpoints and examples. Humans can ignore this section.

Best Path For Builders

Dedicated API endpoint

Deterministic outputs, machine-safe contracts, and production-ready examples.

Dedicated API

https://aidevhub.io/api/number-base-converter/

OpenAPI: https://aidevhub.io/api/openapi.yaml

GET /api/number-base-converter/ GET number-base-converter
POST /api/number-base-converter/ POST number-base-converter