Number Base Converter

Convert any integer between decimal (base 10), hexadecimal (base 16), binary (base 2), and octal (base 8). Type in any field and all others update instantly. Supports numbers up to 253.

Developer Tools

What This Tool Does

Converts numbers between decimal, hexadecimal, binary, and octal in your browser instantly. Also shows the IEEE 754 float representation for floating-point inputs.

Who This Is For

  • Embedded systems and firmware engineers working with hex memory addresses and binary bit fields
  • Computer science students learning number systems for coursework or exams
  • Web developers converting hex color values or working with binary flags
  • Security professionals analyzing binary protocol data or hex-encoded payloads

Example: Input: The decimal number 255 → Output: Hex: FF ยท Binary: 11111111 ยท Octal: 377 โ€” all displayed simultaneously

How to Convert Between Number Bases

  1. Enter your number in the input field.
  2. Select the source base (the base your number is currently in).
  3. All four conversions โ€” decimal, hexadecimal, binary, octal โ€” appear instantly. Hex color values appear everywhere in CSS โ€” the Color Converter translates HEX to RGB and HSL. For encoding binary data, the Base64 Encoder is the standard tool.
  4. Click any result to copy it.

The converter updates in real time. Hex strings also appear in URL percent-encoding โ€” the URL Encoder shows both the character and its hex code. If you enter an invalid character for the selected base (for example, a 9 in a binary field), the field is highlighted and no conversion is shown.

Understanding Number Bases

BaseNameDigits UsedCommon Use
Base 2Binary0, 1Computer hardware, logic gates, bitwise operations
Base 8Octal0โ€“7Unix file permissions, older computing systems
Base 10Decimal0โ€“9Everyday arithmetic, human-readable numbers
Base 16Hexadecimal0โ€“9, Aโ€“FMemory addresses, color codes, byte representation

Every number in any base represents the same underlying quantity โ€” just written differently. The decimal number 255 is 0xFF in hex, 11111111 in binary, and 377 in octal. All four are the same value.

Hexadecimal is particularly useful because one hex digit maps exactly to 4 binary bits (a nibble), and two hex digits map to one byte (8 bits). This makes hex a compact, human-readable representation of binary data.

Real-World Use Cases

Hexadecimal Arithmetic Quick Reference

The letters A through F in hex represent values 10 through 15:

HexDecimalBinary
A101010
B111011
C121100
D131101
E141110
F151111
101610000
FF25511111111
100256100000000

To convert hex to decimal manually: multiply each digit by 16 raised to its position. 2A = (2 ร— 16ยน) + (10 ร— 16โฐ) = 32 + 10 = 42.

Number and Data Encoding Workflow

Base conversion is used throughout computing and cryptography:

Related Tools

Related Guides

Frequently Asked Questions

What is the difference between decimal and hexadecimal?
Decimal (base 10) uses digits 0โ€“9 and is the everyday number system. Hexadecimal (base 16) uses digits 0โ€“9 and letters Aโ€“F, where A=10 and F=15. Hex is commonly used in computing to represent binary data compactly โ€” two hex digits represent exactly one byte.
Why do computers use binary?
Computer hardware is built from transistors that are either on (1) or off (0). Binary directly maps to this physical reality. All other number systems are just human-friendly ways to represent the same binary values.
How do I convert binary to decimal?
Multiply each bit by 2 raised to its position (starting from 0 on the right), then sum. For example, 1011 = (1ร—8) + (0ร—4) + (1ร—2) + (1ร—1) = 11. This tool does the calculation for you automatically.
What does 0x mean before a hex number?
The 0x prefix is a programming convention to indicate a hexadecimal number. It is used in C, JavaScript, Python, and most other languages: 0xFF, 0x1A3F. The prefix itself is not part of the value.
Can I convert floating point numbers?
This tool converts integers only. Floating-point binary representation (IEEE 754) uses a different encoding and requires a dedicated converter.
Is there a maximum number size?
Very large numbers may lose precision due to JavaScript's 64-bit floating-point limitations. For numbers larger than 2โตยณ โˆ’ 1 (9,007,199,254,740,991), use a big integer library in your code instead.