Number Base Converter
Converts between binary, octal, decimal, hexadecimal and any base up to 36, with bitwise views.
Type a number in one base and read it in binary, octal, decimal and hex at once, plus any base up to 36. The bitwise view underneath shows the actual bit pattern, which is what you usually came for when the number is a flag field or a permission mask.
Fractions are supported: 1010.101 in binary, 1A.8 in hex. Spaces and underscores are ignored.
Converted
- Binary
11111111 - Octal
377 - Decimal
255 - Hexadecimal
ff - Base 36
73 - Base 7
513
Digits in brackets repeat forever. Every rational number either terminates or repeats in every base — 0.1 in base 10 is exact, in base 2 it is 0.0(0011).
Bit view
| Width | Bits |
|---|---|
| 8-bit | does not fit in 8 bits |
| 16-bit | 0000 0000 1111 1111 |
| 32-bit | 0000 0000 0000 0000 0000 0000 1111 1111 |
| 64-bit | 0000 0000 0000 0000 0000 0000 0000 0000 0000 0000 0000 0000 0000 0000 1111 1111 |
Two’s complement, the representation a CPU actually uses.
Round trip check: 255 back in base 10.
How to use it
Say what base you are typing in
The same digits mean different numbers in different bases: 101 is one hundred and one in decimal and five in binary. Getting this wrong is the only way to get a wrong answer here.
Type the number
Hex letters can be upper or lower case. A digit that does not exist in the chosen base — an 8 in octal, say — is reported rather than silently dropped.
Read the bit view for masks and flags
It labels the bit positions, so you can see at a glance that 0o755 has the owner-write bit set and the group-write bit clear without counting on your fingers.
Common questions
What is the largest number it handles?
Conversion is done on exact integers rather than doubles, so numbers past 2^53 keep every digit. A 64-bit hex value round-trips exactly instead of arriving with its last few digits rounded off.
Why does base 36 stop there?
Because there are ten digits and twenty-six letters, and after that there is no agreed alphabet. Base 62 and base 64 exist but each has several incompatible orderings, so a converter that offered them would have to guess which one you meant.
How do I read a negative number in binary?
A minus sign is shown rather than a two’s-complement pattern, because two’s complement only means something once you fix a width. If you need the 32-bit pattern for −1, add 2^32 to it first.
Feed it from
Text to Binary / Hex
Converts text to and from binary, octal, decimal or hexadecimal in a chosen encoding.
Factors, GCD & LCM
Factorises an integer and computes GCD, LCM, divisors and primality for one or several numbers.
Roman Numeral Converter
Converts between Roman numerals and Arabic numbers, validating subtractive notation.
Big Number Calculator
Performs exact arithmetic on numbers far beyond 64 bits, including power, modulo and factorial.
Next
These accept what this tool produces, so the result can go straight in.
Big Number Calculator
Performs exact arithmetic on numbers far beyond 64 bits, including power, modulo and factorial.
chmod Calculator
Converts between octal, symbolic and checkbox permission views, including setuid and sticky bits.
Hex Viewer
Shows any file as an offset/hex/ASCII dump, identifies the magic bytes and highlights a search hit.
Text to Binary / Hex
Converts text to and from binary, octal, decimal or hexadecimal in a chosen encoding.
CSV Viewer
Opens a large delimited file with type detection, column stats and sorting, without loading it all into memory.
Currency Converter
Converts between about thirty currencies at the ECB’s daily reference rates, crossed through the euro, or at a rate you type in.