DIGITAL · TOOL

Binary ⇄ Hex ⇄ Dec ⇄ Oct

Binary, octal, decimal, hexadecimal — type in one place, sync in all four.

Basic No backend · 100% client-side

What it does: Convert non-negative integers between binary/octal/decimal/hexadecimal.

When to use it: When reading register values, tweaking bit masks, or reading a hex color or address.

→ FF / 11111111 / 377
Next

You might also need

How to

How to use the base converter

Pick a base → enter → all four bases sync.

  1. 01

    Pick the input base

    Choose binary / octal / decimal / hexadecimal as the base the number you type is written in.

  2. 02

    Enter the number

    You may include a 0x or 0b prefix, and can group with _ (e.g. 1111_0000). Only non-negative integers are supported.

  3. 03

    Read all four base results

    All four bases are output at once, and clicking any result copies it. Supports arbitrarily large integers (BigInt, exact with no error).

Reference

Common value reference

Memorize a few anchors and base conversion gets much faster.

DecimalHexadecimalBinaryOctal
88100010
10A101012
16101000020
255FF11111111377
256100100000000400
1024400100000000002000

Computed directly from the definition.

FAQ

Common questions, answered in 3 minutes

Why is hexadecimal so common in programming?

4 binary bits map exactly to 1 hex digit, so writing registers / memory addresses in hex is both short and lets you see the bit structure at a glance.

Can it convert negative numbers or fractions?

This tool only handles non-negative integers. Negative numbers involve two's complement representation (see the sign-magnitude/one's/two's complement tool), and fractions involve fixed/floating point — separate tools.

Are the 0x and 0b prefixes required?

No. The prefixes just make it convenient to paste existing code; it parses correctly with or without them.

Will very large numbers be miscalculated?

No. Internally it uses JavaScript BigInt, so any number of digits is exact with no floating-point error.

Data Provenance

Standards and sources referenced by this tool

Item Value / Formula Source
Numeral base (radix) definition value = Σ dᵢ × baseⁱ Positional numeral system

Pure bitwise/string conversion, no external API; large integers handled exactly with BigInt.

⚡ Powered by Circflow