Number Base Converter
Convert numbers between binary, octal, decimal, and hexadecimal online. Supports arbitrarily large numbers with BigInt.
Common Values
| Decimal | Hex | Binary | Description |
|---|---|---|---|
| 0 | 0x0 | 0 | Zero |
| 255 | 0xFF | 1111 1111 | Max uint8 |
| 256 | 0x100 | 1 0000 0000 | 2^8 |
| 1024 | 0x400 | 100 0000 0000 | 1 KB |
| 65535 | 0xFFFF | 1111 1111 1111 1111 | Max uint16 |
Examples
About Number Base Converter
Number base conversion is the process of converting a number from one positional numeral system to another. The most common bases are binary (base 2), octal (base 8), decimal (base 10), and hexadecimal (base 16).
Binary (base 2) is the native language of computers, using only 0 and 1. Octal (base 8) was historically used in computing for compact binary representation. Decimal (base 10) is the everyday human number system. Hexadecimal (base 16) is widely used in programming, memory addresses, color codes, and Ethereum (addresses, calldata, transaction hashes).
This tool supports arbitrarily large numbers using BigInt and processes everything client-side in your browser.
How to Use This Number Base Converter
This free online tool converts numbers between binary (base 2), octal (base 8), decimal (base 10), and hexadecimal (base 16) instantly. It supports arbitrarily large numbers.
- Select the input base — choose the number system of your input value (Binary, Octal, Decimal, or Hexadecimal).
- Enter your number — type or paste the number. You can include common prefixes (0x, 0b, 0o) which will be automatically stripped.
- View all conversions — the tool instantly shows the value in all four bases, with grouped digits for readability.
- Copy any result — use the copy button next to any conversion to copy it with the appropriate prefix.
All processing happens client-side in your browser. No data is sent to any server.
Common Use Cases
- Programming and debugging — Convert between hex, binary, and decimal values when working with bitwise operations, memory addresses, or low-level code.
- Ethereum development — Convert hex values from calldata, storage slots, and transaction data to decimal or binary for analysis.
- Network and systems — Convert subnet masks, port numbers, and protocol values between different bases.
- Color codes — Convert hex color values to decimal RGB components.
- Education — Learn how number systems work by seeing the same value in all four common bases.
Related Tools
Frequently Asked Questions
What is a number base (radix)?
A number base (or radix) is the number of unique digits used to represent numbers in a positional numeral system. The most common bases are binary (base 2, digits 0-1), octal (base 8, digits 0-7), decimal (base 10, digits 0-9), and hexadecimal (base 16, digits 0-9 and A-F). Each base represents the same values differently.
How do I convert between binary and hexadecimal?
Each hexadecimal digit maps to exactly 4 binary digits (bits). To convert binary to hex, group the binary digits in sets of 4 from right to left and replace each group with the corresponding hex digit. For example, 1010 1111 in binary is AF in hexadecimal. This tool performs this conversion instantly for any number.
Why is hexadecimal used in programming?
Hexadecimal is popular in programming because each hex digit represents exactly 4 bits, making it a compact way to represent binary data. It is used for memory addresses, color codes (e.g., #FF5733), character encoding, Ethereum addresses (0x...), transaction hashes, smart contract calldata, and low-level debugging.
What is the largest number this tool can convert?
This tool uses JavaScript's BigInt, which supports arbitrarily large integers with no theoretical upper limit. You can convert numbers with hundreds or thousands of digits across all supported bases. This is especially useful for Ethereum development where 256-bit numbers (uint256) are common.
How do I read binary numbers?
Binary numbers use only 0 and 1. Each position represents a power of 2, starting from the right: 1, 2, 4, 8, 16, 32, etc. For example, binary 1011 means (1x8) + (0x4) + (1x2) + (1x1) = 11 in decimal. The tool groups binary digits in sets of 4 for easier reading.
What is the difference between this and the Hex/Decimal converter?
The Hex/Decimal converter is focused specifically on hexadecimal and decimal conversion with Ethereum-specific features. This Number Base Converter supports all four common bases (binary, octal, decimal, hexadecimal) and provides grouped digit display, bit/byte length information, and a common values reference table.
Related Tools & Guides
Hex / Decimal Converter
Convert between hexadecimal and decimal numbers. Useful for Ethereum block numbers, values, and calldata.
UTF-8 / Hex / Bytes Converter
Convert between UTF-8 text, hexadecimal strings, and byte arrays. Essential for encoding and debugging Ethereum data.
Base64 Encoder / Decoder
Encode and decode Base64 strings online. Supports text and hex input with URL-safe Base64 option for Ethereum development.
Try Also
RLP Encoder / Decoder
Encode and decode Recursive Length Prefix (RLP) data. The serialization format used by Ethereum transactions and blocks.
Bytes32 / String Converter
Convert between bytes32 hex, UTF-8 strings, numbers, and addresses. Visualize padding for Solidity bytes32 values.
URL Encoder / Decoder
Encode and decode URL components online. Compare encodeURIComponent vs encodeURI with a common URL encodings reference table.