Number base converter
Convert a whole number between binary, octal, decimal, hexadecimal and any base from 2 to 36. Very large numbers stay exact.
Your files stay on your device. Nothing is uploaded.
Step 1: Type a number
Step 2: The same number in other bases
How to convert between number bases
-
Type the number
Type the number. Prefixes such as 0x, 0b and 0o, spaces and underscores are understood.
-
Say which base it is in
Choose decimal, binary, octal, hex, or any other base.
-
Copy the result
The number appears in every common base at once.
About this tool
Exact for big numbers
Many converters lose digits beyond about 15 decimal digits. This one uses exact whole-number arithmetic, so a 128-bit hex value converts to every digit of its decimal form.
How bases work
Decimal uses 10 digits; binary uses 0 and 1; hexadecimal uses 0-9 and A-F, so one hex digit is exactly four bits. That is why colours, memory addresses and hashes are written in hex.
Which integer it fits
The tool says how many bits the number needs and whether it fits in an 8, 16, 32, 64 or 128-bit integer, signed or unsigned.
Privacy
This tool runs in your browser, on your own device. Your files and text are not uploaded to our server and we cannot see them. When you close or reload this tab, they are cleared, along with the results.
Frequently asked questions
Can I convert negative numbers?
Yes. The minus sign is kept, for example -255 is -FF in hex. Two's complement form is not shown.
Does it convert fractions?
No, whole numbers only.
Is anything sent to a server?
No. It runs in your browser, so nothing you type or choose is sent anywhere.
How do I convert colours?
Use the Colour converter for HEX, RGB and HSL.
Related tools
- /24 Subnet calculator Network, broadcast and host range of an IPv4 subnet.
- HEX ⇄ RGB HEX to RGB converter Convert colour codes between HEX, RGB and HSL.
- SHA-256 Hash generator MD5, SHA-1 and SHA-256 checksums of text or files.
- Epoch Unix timestamp converter Turn Unix timestamps into dates and dates into timestamps.
- 1 › 100 Random number generator Pick random numbers in any range, with no repeats if you like.
- Base64 Base64 encode and decode Encode text to Base64 or decode Base64 to text.
- /.*/ Regex tester Test regular expressions with live highlights and groups.
- v4 · v7 UUID generator Make random UUIDs (version 4 or 7), up to 100 at once.