ToolGenie.org Logo

Number Base Converter

Convert decimal to hex, hex to decimal, decimal to binary and every base from 2 to 36 — instantly and privately in your browser.

Converted values

BaseValueCopy
Binary (base 2)11111111
Octal (base 8)377
Decimal (base 10)255
Hexadecimal (base 16)FF
Base 327V
Base 3673
Base 12193

Every conversion runs in your browser using exact big-integer arithmetic. Nothing you type is uploaded or stored.

Key facts

  • Free, no sign-up; converts as you type, in your browser.
  • Any base from 2 to 36, with binary, octal, decimal, hex, base 32, and base 36 shown at once.
  • Exact for very large numbers (BigInt math, no rounding).
  • Accepts negative numbers and 0x, 0b, and 0o prefixes.
  • Optional uppercase letters and digit grouping (binary in 4s, hex in pairs); copy any result.
  • Whole numbers only; fractions are not supported.

How to Use the Number Base Converter

  1. Type or paste the number you want to convert. Digits 0–9 and letters a–z are accepted, a leading minus sign is allowed, and 0x, 0b, or 0o prefixes are stripped automatically when the matching base is selected.
  2. Choose the base the number is written in from the "From base" dropdown. Base 10 is preselected; pick 16 for hexadecimal, 2 for binary, or anything else up to 36.
  3. Read the results table. Binary, octal, decimal, hexadecimal, base 32, and base 36 are all calculated at the same time, so decimal to hex and hex to decimal are the same single step.
  4. Need an unusual radix? Set "Convert to base" to any value from 2 to 36 and an extra row appears with that result.
  5. Toggle "Uppercase letters" to switch between FF and ff, turn on "Group digits" to read long binary and hex strings comfortably, then press "Copy" on any row.

What Is a Number Base Converter?

A number base converter — also called a radix converter — rewrites the same quantity using a different set of digits. Base 10 uses ten symbols, binary uses two, and hexadecimal uses sixteen, but 255, 11111111, and FF all describe exactly the same number. Programmers move between these notations constantly: memory addresses and colour codes are hexadecimal, bit flags are binary, file permissions are octal, and short identifiers are often base 36 because it packs the whole alphabet plus the digits into each character.

This converter parses your input digit by digit against the alphabet 0–9 then a–z, checking that every character is legal for the base you chose, and it does the arithmetic with JavaScript BigInt values. That matters: the usual parseInt approach silently loses precision beyond 2^53, so a 40-digit number comes back wrong. Here a 60-digit decimal round-trips through hexadecimal and back without changing a single digit, and negative values are preserved.

Working with lower-level encodings too? ToolGenie has dedicated pages for the most common pairs: binary to hex, hex to binary, and text to binary when you need to encode characters rather than a single number.

Frequently Asked Questions (FAQ)

How do I convert decimal to hex?

Leave the base set to 10, type your decimal number, and read the hexadecimal row. 255 becomes FF, 4096 becomes 1000, and 3735928559 becomes DEADBEEF. The conversion repeatedly divides by 16 and records the remainders as digits.

How do I convert hex to decimal?

Select "16 (Hexadecimal)" as the source base and enter the hex digits, with or without a 0x prefix. The decimal row shows the result immediately — 0xFF is 255 and 0x1F4 is 500.

How do I convert decimal to binary?

Keep the source base at 10 and look at the binary row. 10 becomes 1010 and 255 becomes 11111111. Enable digit grouping to see long results split into four-bit nibbles, which makes them far easier to read.

What is base 36 used for?

Base 36 uses 0–9 plus a–z, so it stores the largest value per character of any case-insensitive alphanumeric notation. It is popular for short URLs, invoice codes, and compact database identifiers.

Can this converter handle very large numbers?

Yes. All arithmetic uses BigInt, so there is no 2^53 ceiling and no rounding. You can paste a hundred-digit number and every base in the table will be exact.

Does it accept 0x, 0b, and 0o prefixes?

Yes, when the prefix matches the base you selected. 0x is stripped in base 16, 0b in base 2, and 0o in base 8. In any other base those characters are treated as ordinary digits and validated normally.

Why does it say a digit is not valid?

Every base only allows digits below its own value, so base 2 permits only 0 and 1, and base 8 stops at 7. If you see that message, either the character is a typo or the source base is set too low for the number you pasted.

Can it convert negative numbers?

Yes. Start the input with a minus sign and the sign is carried through to every base in the table, so -42 shows as -2A in hexadecimal and -101010 in binary.

Tips for Converting Number Bases

  • Tip 1: One hexadecimal digit is exactly four binary digits, so grouping binary in 4s lines the two columns up perfectly: FF is 1111 1111.
  • Tip 2: Unix file permissions are octal. 755 in base 8 is 111 101 101 in binary, which reads directly as rwxr-xr-x once you split it into three groups.
  • Tip 3: Turn off uppercase when you are pasting into CSS or JSON — lowercase hex is the prevailing convention in both, and some linters will flag FF where ff is expected.
  • Tip 4: Converting colour values? Send the hexadecimal result over to the CSS units converter for the sizing side of the same stylesheet, or use binary to hex when you are working with byte streams rather than single numbers.