Number Base Converter Online
Binary, octal, decimal, hex
Cómo usar Base Numérica
- 1
Enter a number
Type a number in any supported base field — binary, octal, decimal, or hex.
- 2
View conversions
All base representations update in real time as you type.
- 3
Copy any value
Click copy next to the base you need for your code or documentation.
Preguntas frecuentes
Is my data safe?
What number bases are supported?
Why is hexadecimal so common in programming?
What does the '0x' prefix in hex values mean?
Can this tool handle negative numbers?
Saber más
¿Qué es Number Base?
Convert numbers between binary (base 2), octal (base 8), decimal (base 10), and hexadecimal (base 16) instantly. Type in any field and all other representations update in real time. Useful for low-level programming, understanding memory addresses, working with network masks, embedded systems, and computer science coursework. No sign-up required — all conversions happen in your browser with no server involved.
¿Por qué usar Number Base?
- Real-time updates — type in any base field and all others update instantly, no button click needed.
- All four common bases in one view — binary, octal, decimal, and hex side by side for easy comparison.
- Handles large numbers — JavaScript's BigInt ensures accurate conversion for numbers beyond 32-bit range.
- Useful for low-level work — essential for understanding bitwise operations, memory addresses, and color codes.
- Completely private — all computation happens in your browser.
Casos de uso de Number Base
Bitwise operation debugging
Verify the result of AND, OR, XOR, and shift operations by viewing the binary representation of your operands and results side by side.
Network subnet masks
Convert subnet masks like 255.255.255.0 into binary to visualize which bits define the network versus host portions of an IP address.
Embedded systems programming
Microcontroller registers are often documented in binary or hex. Convert between formats when writing register configuration code in C or assembly.
Color code conversion
CSS hex color codes (#FF5733) are hexadecimal RGB values. Convert to decimal to see the individual red, green, and blue channel values (255, 87, 51).
Consejos y buenas prácticas
- 💡Hexadecimal is 4x more compact than binary — each hex digit represents exactly 4 binary bits (nibble). This makes hex the preferred shorthand for binary values in code.
- 💡Octal (base 8) is commonly used for Unix file permissions — chmod 755 means binary 111 101 101 (rwxr-xr-x in permission notation).
- 💡In most programming languages, prefix hexadecimal literals with '0x', binary with '0b', and octal with '0o'. For example: 0xFF, 0b11111111, 0o377 all equal 255 in decimal.
- 💡Two's complement representation for negative numbers is a separate concept — this converter handles unsigned integers. For signed binary arithmetic, consult a two's complement reference.
Cómo funciona
Conversion uses JavaScript's parseInt(value, fromBase) to parse the input in the source radix, then Number.prototype.toString(toBase) to format in each target radix. For numbers larger than Number.MAX_SAFE_INTEGER (2^53 - 1), BigInt is used to ensure exact conversion without floating-point precision loss. Binary output is grouped in 4-bit nibbles for readability. Input validation rejects characters that are invalid for the selected base (e.g., '2' through '9' are invalid in binary).