Skip to content
QueenNexa

Free tool

Binary, Decimal & Hex Converter with Number to Words

Convert whole numbers between binary, octal, decimal and hexadecimal exactly, even for very large values, and spell any number out in words.

Convert between binary, octal, decimal and hex

Binary (base 2)
–
Hexadecimal (base 16)
–
Decimal (base 10)
–
Octal (base 8)
–
Binary in groups of four, and bits needed
–
In words
–

Working: –

Number to words

Spell out any number up to 999 sextillion, with up to two decimal places.

In words
–
Check-writing style (cents as a fraction)
–

Assumptions and limits

Every figure comes from the numbers you enter. Where a rule of thumb is used, it is labeled as one.

  • Whole numbers only for base conversion. Each digit is multiplied by a power of the base and the total is written in the other bases. Values are exact because the tool uses BigInt, with a limit of 200 digits.
  • Accepted forms: plain digits, with optional 0b, 0o or 0x prefixes, spaces, underscores or commas as separators, and a leading minus sign. Hexadecimal accepts upper or lower case.
  • Negative numbers are shown with a minus sign. Two's complement is not produced, because it needs a chosen bit width.
  • Words use American English and the short scale (a billion is 1,000,000,000), with no "and" inside the whole number. Decimal digits are read one at a time.
  • The number-to-words limit is 21 digits before the decimal point, and at most two digits after it.

Runs entirely in your browser. Nothing you type or upload is sent to our servers.

How number bases work

A base is how many distinct digits a number system uses. Decimal uses ten (0 to 9), binary uses two (0 and 1), octal uses eight, and hexadecimal uses sixteen (0 to 9 and A to F). In every base, a digit's value depends on its position: each step to the left multiplies by the base. So the decimal number 255 means 2 × 100 + 5 × 10 + 5 × 1, and the binary number 1101 means 1 × 8 + 1 × 4 + 0 × 2 + 1 × 1. Computers store everything in binary, and hexadecimal is a compact way to write it, because one hex digit equals exactly four bits.

Worked example 1: 255 in every base

  1. Binary: 255 = 128 + 64 + 32 + 16 + 8 + 4 + 2 + 1, so all eight bits are ones: 11111111.
  2. Hexadecimal: 255 ÷ 16 = 15 remainder 15, and 15 is F, so the number is FF. Check: 15 × 16 + 15 = 255.
  3. Octal: 255 ÷ 8 = 31 remainder 7, 31 ÷ 8 = 3 remainder 7, and 3 is the last digit, so reading upward gives 377. Check: 3 × 64 + 7 × 8 + 7 = 255.

The converter opens with 255 so you can compare its results with the ones above. It also shows that 255 needs 8 bits, one byte.

Worked example 2: a number in words

Spell 1,234.56 as you would on a check.

  1. Split the whole number by thousands: 1 | 234.
  2. 1 is "one" with the scale word thousand. 234 is two hundred (200) plus thirty (30) plus four (4), written "two hundred thirty-four".
  3. Whole part: one thousand two hundred thirty-four.
  4. The cents are 56 out of 100, so the check line ends "and 56/100".

Where each base is used

  • Binary: how processors and memory store data.
  • Hexadecimal: color codes such as #FF5733, memory addresses and byte dumps.
  • Octal: Unix file permissions such as 755.

Related tools

For colors, the Image Color Picker & HEX to RGB Converter turns hex codes into RGB values. Working with dates in code? The Unix Timestamp Converter turns a number into a date. Want to write a year in a different system? Try the Roman Numeral Converter.

Frequently asked questions

How do I convert binary to decimal?

Multiply each binary digit by a power of 2, starting from 2⁰ at the right, and add the results. For 1101: 1 × 8 + 1 × 4 + 0 × 2 + 1 × 1 = 13. Choose binary as the starting base, type the digits, and the decimal, octal and hexadecimal values appear together, with the working beside them.

How do I convert decimal to binary or hexadecimal?

Divide the number by the new base repeatedly and write down the remainders, then read them from last to first. For 255 in binary, the remainders of dividing by 2 give 11111111. For hexadecimal, divide by 16 and use A to F for remainders 10 to 15. 255 ÷ 16 is 15 remainder 15, so 255 is FF.

Why do programmers use hexadecimal?

One hexadecimal digit stands for exactly four binary digits, so a byte is always two hex characters, from 00 to FF. That makes memory addresses, color codes and file contents much shorter to read than a long string of ones and zeros, while still lining up exactly with the underlying bits.

How large a number can it handle?

Up to 200 digits in any base. The tool uses arbitrary-precision whole-number arithmetic rather than ordinary floating-point numbers, so values past 9,007,199,254,740,991, where regular JavaScript starts to round, stay exact. The words converter stops at 21 digits, which is 999 sextillion.

Does it handle negative numbers and fractions?

Negative whole numbers work and keep their minus sign, so -42 becomes -101010 in binary. It does not produce two's complement forms, which depend on a fixed bit width. Fractions and numbers with a decimal point are not converted between bases, though the number-to-words box accepts up to two decimal places.

How are numbers written out in words?

Using the American style: no "and" inside the whole number, hyphens for 21 to 99 in the tens and ones, and the short scale for large names, so 1,000,000,000 is one billion. A decimal part is read digit by digit, as in "point five six". The check-writing line shows cents as a fraction, such as "and 56/100".

Link to this tool

Found it useful? Copy a link for your page, newsletter or documentation.

Get new tools and guides by email

Optional. The tool above works without signing up.

One email every Tuesday. Free, and you can unsubscribe in one click.

More free tools

Browse all developer tools or the full list of free tools.