Number base converter: binary, decimal, hex, octal and text

Type a number in any base and see it in all the others, or convert text to binary, hex or decimal bytes and back.

  • Free, no sign-up
  • Your files and data stay on your device
  • No watermarks or limits

0 bytes uploaded. Everything happens in this tab.

How to use it

  1. Choose Numbers or Text and bytes.
  2. Enter your value and select the input base, or the code format for text.
  3. Copy the result you need.

Example

Number and text:

255 (decimal) = 11111111 (binary) = ff (hex)
“Hi” = 01001000 01101001

About this tool

Programmers and students constantly move between binary, octal, decimal and hexadecimal. Hex is a compact way to write bytes, binary shows the individual bits, and octal appears in Unix permissions.

The number converter works with arbitrarily large whole numbers, not only those that fit in 53 bits, and accepts the usual 0x, 0b and 0o prefixes. The text mode encodes your text as UTF-8 bytes and writes them in binary, hex, octal or decimal; letters outside basic ASCII take more than one byte, so “ł” is c5 82 in hex.

Decoding checks that the bytes form valid UTF-8 text and tells you if they do not. Fractions and negative two’s-complement notations are not covered: only whole numbers and optional minus signs. Everything is computed locally.

Frequently asked questions

Why is the number so large without errors?

The converter uses arbitrary-precision integers, so there is no 53-bit limit.

Why does one letter become two bytes?

UTF-8 uses one byte for basic ASCII and two to four for other letters and symbols.

Does it handle fractions?

No, only whole numbers.

Is my input uploaded?

No. Conversion happens in your browser.

Often used next