Number base converter
Hex, decimal, binary and octal, any size.
Try
Results
- Decimal
- 255
- Hexadecimal
- FF0xFF
- Binary
- 1111 11110b11111111
- Octal
- 3770o377
- Base 36
- 73
- Size
- 8 bits, 1 byte
About this tool
- Runs in
- your browser
- Your input sent to our servers
- Nothing
- Kept on this device
- nothing
More in the privacy policy.
How to use it
- 01Type a number in any field: decimal, hexadecimal, binary, octal or the base you pick (2 to 36). Prefixes such as 0x, 0b and 0o work, and spaces and underscores are ignored.
- 02The other fields update as you type. For negative numbers, pick a bit width to see the two’s complement pattern.
- 03Copy any row from the results, or Copy hex.
Related tools
Questions
How does hexadecimal work?
Each hex digit stands for 4 bits, from 0 to 15, written 0–9 then A–F. Two digits make a byte: FF is 255, the largest byte, and 11111111 in binary.
What is two’s complement?
The way computers store negative whole numbers in a fixed number of bits: the top bit counts as negative. At 8 bits, −1 is FF and −128 is 80; pick a bit width to see it.
Why does the bit width matter?
The same negative number has a different pattern at each width: −42 is D6 at 8 bits, FFD6 at 16 and FFFFFFD6 at 32. Any size shows a minus sign instead.
How big can the number be?
Any size, up to 10,000 characters. JavaScript’s ordinary numbers stop being exact past 9,007,199,254,740,991 (2⁵³ − 1); this converter uses whole-number arithmetic of any length (BigInt), so 64-bit and 128-bit values stay exact.
Can it convert fractions?
No, whole numbers only. A decimal point shows an error.
Is anything sent anywhere?
No. It’s worked out in your browser. Nothing is sent to our servers, put into the page address or saved.