Number base converter

A number base converter writes the same integer in different bases: decimal 255 is 11111111 in binary and ff in hexadecimal.

Features

  • Exact at any sizeBig integers are not rounded.
  • Two-way editingType in any base and the others update.
  • Runs on your deviceYour data is processed in the browser and is never uploaded.

How to use the Number base converter

  1. Type a number in any box.
  2. Read the other bases.

Why hexadecimal is common

One hex digit is exactly four bits, so two digits describe one byte.

Convert bases in JavaScript

(255).toString(2);      // '11111111'
parseInt('ff', 16);     // 255
BigInt('0xffffffffffffffff').toString(10);

Frequently asked questions

Are fractions supported?

No, integers only.

Can I use negative numbers?

Yes, written with a minus sign, not two's complement.

Are 0x and 0b prefixes accepted?

Yes, in the matching box.

Related tools