Number Base Converter

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

Base conversion tool

Convert numbers between bases

Enter a number, choose the source base and target base, then copy the converted value or all common outputs.

Examples: binary 101010, decimal 42, hex 2A or 0x2A, octal 52, base 36 Z.

Converted output

Decimal to Hexadecimal

2A

Converted with BigInt-based integer logic where supported.

Conversion status

Ready

Whole-number conversion only. Fractions are not supported.

Primary result

2A

Output in base 16.

From base

10

Decimal

To base

16

Hexadecimal

Normalized input

42

Prefixes and whitespace removed.

Input length

2

Digits in normalized input.

Bit length estimate

6

Approximate binary bit length.

Safe integer status

Safe JavaScript integer

BigInt helps preserve precision for large integers.

Conversion status

Ready

Ready to copy.

Copy converted result

Copy the primary converted value for code, docs, debugging, or notes.

Copy all base outputs

Copy binary, octal, decimal, hexadecimal, and custom output when available.

Privacy note

Conversion is designed to happen locally in your browser without storing user input.

Accuracy note

BigInt preserves large integer precision where supported, avoiding normal JavaScript number precision loss.

Whole-number note

This converter handles integers only. Fractional base conversion is not supported.

Reset example

Load Decimal 42 and convert it to hexadecimal or binary-style examples.

Common base outputs

See the same value represented in common programming bases.

Binary

Base 2

101010

Octal

Base 8

52

Decimal

Base 10

42

Hexadecimal

Base 16

2A

Practical conversion examples

Click an example to populate the converter instantly.

Number base quick reference

Binary base 2

Digits 0–1

Octal base 8

Digits 0–7

Decimal base 10

Digits 0–9

Hexadecimal base 16

Digits 0–9 and A–F

Base 36

Digits 0–9 and A–Z

Prefixes

0b binary, 0o octal, 0x hex

Hex digit

One hex digit equals four bits

Byte

Two hex digits equal one byte

Developer guide

Understand number bases in programming

Number base conversion helps developers read binary flags, inspect byte values, understand memory addresses, compare constants, and learn computer science fundamentals.

What is a Number Base Converter?

A Number Base Converter changes the representation of a number from one base to another, such as decimal to binary, binary to hex, or octal to decimal.

When should developers use number base conversion?

Use it for debugging code, reading binary flags, bitmasks, byte values, memory addresses, color and protocol values, logs, API payloads, Unix permissions, and computer science learning.

How number bases work

A base defines how many symbols are used to represent numbers. Each digit position represents a power of the base, so higher bases can represent the same value with fewer digits.

Binary, decimal, octal, and hexadecimal

Binary is common in low-level computing. Decimal is everyday base 10. Octal appears in Unix permissions. Hexadecimal is compact for bytes, memory, colors, and debugging.

Number base conversion formula

Each digit is multiplied by a power of the base. Binary 1010 = 1×8 + 0×4 + 1×2 + 0×1 = decimal 10. Hex 2A = 2×16 + 10 = decimal 42.

Privacy and accuracy

BlinkCalc is designed to convert locally in the browser. BigInt preserves large integer precision where supported. Signed, unsigned, and fractional interpretations should be checked separately.

Common number base mistakes

Confusing decimal 10 with hexadecimal 10.
Using invalid digits for the selected base.
Forgetting that A–F are digits in hex.
Losing precision with normal JavaScript numbers.
Confusing binary strings with decimal numbers.
Treating prefixes like 0x as digit values.
Assuming fractions are supported.

How to use this Number Base Converter

  1. 1Enter a number such as 101010, 42, FF, or 755.
  2. 2Choose the source base.
  3. 3Choose the target base.
  4. 4Review the converted result and common base outputs.
  5. 5Copy the result or switch bases to convert another value.

Why developers use a Number Base Converter

Convert binary, decimal, octal, and hexadecimal quickly.
Debug byte values and bitmasks.
Read programming constants.
Understand chmod-style octal values.
Compare the same value across bases.
Avoid manual conversion mistakes.
Preserve precision for large integers with BigInt.

Number Base Converter FAQs

It converts a number from one base to another, such as binary to decimal, decimal to hexadecimal, or octal to decimal.