🔢 Number Base Converter

Convert between binary, octal, decimal, and hexadecimal instantly. Type in any field and all others update live.

Convert Number

Binary
Base 2 · 0-1
Octal
Base 8 · 0-7
Decimal
Base 10 · 0-9
Hex
Base 16 · 0-9, A-F
Invalid input for the selected base.

Quick Reference

DecBinOctHex
0000
81000108
16100002010
64100000010040
1281000000020080
25511111111377FF
655361000000000000000020000010000

Embed This Tool

Add this Number Base Converter to your website or blog for free — just paste this code:

<iframe src="https://number-base-converter.tabutility.com/" width="100%" height="600" frameborder="0" style="border-radius:12px" title="Number Base Converter by Tabutility"></iframe> <p style="font-size:12px"><a href="https://number-base-converter.tabutility.com/" target="_blank" rel="noopener">Number Base Converter</a> by <a href="https://tabutility.com/" target="_blank" rel="noopener">Tabutility</a></p>
Free to use — the credit link helps others find the tool

Related Tools

JSON Formatter
Developer Tools
Base64 Encoder
Developer Tools
UUID Generator
Developer Tools
HEX to RGB Converter
Developer Tools
Meta Tags Generator
SEO
Schema Markup Generator
SEO

Frequently Asked Questions

Why do computers use binary?

Computers use binary because transistors — the fundamental building blocks — have two states: on (1) and off (0). This maps perfectly to binary. Everything a computer does, from adding numbers to displaying images, ultimately reduces to manipulating sequences of 0s and 1s.

Why is hexadecimal used in programming?

Hex is used because one hex digit represents exactly 4 binary bits (a nibble), so two hex digits = one byte. This makes it far more human-readable than binary while still mapping cleanly to how computers work internally. It's widely used for memory addresses, colours (#FF6600), and byte-level data.

How do I convert binary to decimal manually?

Each binary digit represents a power of 2, starting from the right. For 1011: (1×8) + (0×4) + (1×2) + (1×1) = 11. The tool does this instantly for any number.

What is octal used for?

Octal was historically used in older computing systems. Today it's most commonly seen in Unix/Linux file permissions (e.g., chmod 755 means rwxr-xr-x). Each octal digit represents exactly 3 binary bits.

Is there a limit to the size of number I can convert?

JavaScript uses 64-bit floating-point numbers (IEEE 754), which means integers are exact up to 2^53 − 1 (about 9 quadrillion). Beyond that, precision may be lost. For very large numbers, use a dedicated big-integer library.

How to Use the Number Base Converter

The Number Base Converter instantly converts numbers between binary (base 2), octal (base 8), decimal (base 10), and hexadecimal (base 16). Type a value into any of the four fields and all the other fields update automatically in real time. There is no button to press — the conversion is live as you type. This makes it easy to explore how the same number is represented across different numeral systems, double-check conversions when working on programming problems, or quickly translate between formats without stepping through the arithmetic manually.

Computers fundamentally operate in binary — every piece of data is ultimately stored as zeros and ones. Decimal is the base-10 system humans use every day, with digits 0–9. Octal (base 8) was historically common in early computing and still appears in Unix file permissions. Hexadecimal (base 16) uses digits 0–9 and letters A–F to represent values 0–15, and is ubiquitous in programming: HTML colour codes, memory addresses, byte values, and debugging output are almost universally expressed in hex because two hex digits exactly represent one byte (8 bits), making it far more compact than binary while still mapping directly onto computer memory.

Understanding these number bases is fundamental for computer science students, software developers, embedded systems engineers, and network administrators. Binary is used in bitwise operations, boolean logic, and CPU instruction sets. Hex appears in CSS colours (e.g., #1A2B3C), IPv6 addresses, Unicode code points, and assembly language. Octal permissions in Linux/Unix (e.g., chmod 755) use base 8 because the three octal digits map neatly onto the three permission groups (owner, group, others) with read/write/execute values of 4, 2, and 1. The converter handles all these scenarios without requiring any manual calculation.

Common Use Cases

Decimal 255 = Binary 11111111 = Octal 377 = Hex FF (one fully set byte — the maximum value of an 8-bit unsigned integer)
Decimal 42 = Binary 101010 = Octal 52 = Hex 2A

Frequently Asked Questions

Why is hexadecimal used in programming?

Hexadecimal is used because it maps cleanly onto binary. One hex digit represents exactly four bits (a nibble), so two hex digits represent exactly one byte (8 bits). This makes hex far more compact than binary for expressing memory addresses, byte values, and colour codes, while still having a direct, mechanical relationship to the underlying binary representation that decimal does not.

What is the highest number each base can represent with a given number of digits?

With n digits: binary can represent 2ⁿ values (0 to 2ⁿ−1), octal can represent 8ⁿ values, decimal can represent 10ⁿ values, and hexadecimal can represent 16ⁿ values. With 2 digits: binary = 0–3, hex = 0–255. This is why hex is so efficient — two characters cover the full range of a single byte.

How do Unix file permissions use octal?

Unix permissions are represented as three groups of three bits (read=4, write=2, execute=1). Each group's bits sum to a single octal digit. So permissions 111 101 101 in binary = 7 5 5 in octal = chmod 755 = owner can read/write/execute, group and others can read and execute only.

Does the converter handle negative numbers?

The converter works with non-negative integers. Negative numbers in binary are typically represented using two's complement in computer systems, which requires knowing the word size (8-bit, 16-bit, etc.) — this is handled by the processor or programming language, not by a simple base converter.

What are valid hexadecimal digits?

Hex uses digits 0–9 for values zero through nine, and letters A–F (or a–f) for values ten through fifteen. A = 10, B = 11, C = 12, D = 13, E = 14, F = 15. Hex is case-insensitive, so 1a2b and 1A2B represent the same value.