Skip to content

Utilities

Number Base Converter

Convert integers between binary, octal, decimal and hexadecimal.

Loading tool…

Helpful references

About this tool

What is Number Base Converter?

Compare binary, octal, decimal and hexadecimal representations of the same integer. Choose the source base explicitly: the characters 10 mean ten in decimal, two in binary and sixteen in hexadecimal. Conversion changes the notation rather than the quantity, which is useful when reading bit masks, identifiers, protocol values or debugger output.

A worked example

Read an eight-bit maximum in three bases

Example input

255 (10)

Expected result

11111111 (2)
377 (8)
ff (16)

Select decimal as the input base and enter 255. Eight set binary bits have weights 128 through 1, summing to 255. Hexadecimal groups each four bits into one digit, so those eight bits become ff. The textual result does not select a signed machine representation or reserve a particular bit width for storage.

Common mistakes and limits

  • The converter handles integers. Floating-point encodings, decimal fractions and IEEE 754 bit layouts require a different representation.
  • A minus sign describes a negative integer, not a fixed-width two's-complement byte sequence. Decide the intended width before interpreting machine-level bits.

Features

What you can do

  • Binary conversion.
  • Octal conversion.
  • Decimal conversion.
  • Hexadecimal conversion.
  • Automatic base detection.
  • Negative integers.
  • Digit grouping.
  • Hex uppercase/lowercase.
  • Safe integer validation.
  • Runs locally.

Frequently asked questions

Questions about Number Base Converter

Does it support hexadecimal prefixes?

Yes. Prefixes like 0x, 0b and 0o are detected automatically.

Can I convert negative numbers?

Yes. Signed integers are supported.

Does this upload my data?

No. Everything happens locally in your browser.

Related tools