Binary, Decimal, Hex & Text Converters: The Complete Guide
Every number you type, every letter you send, and every color on a web page is stored by a computer as a sequence of bits — and those bits can be represented in several different number systems: binary, octal, decimal, and hexadecimal. Converting between them isn't just a computer-science classroom exercise. Programmers use hex to read memory addresses and debug output. Network engineers convert binary to decimal to work out subnet masks. Web developers use hexadecimal for color codes. And anyone who has ever seen a string of 1s and 0s and wondered what it says has needed a binary-to-text converter.
This guide covers all of it in one place: what each number system actually is, how the conversions work mathematically, and links to every free converter on this site for binary, decimal, hexadecimal, octal, ASCII, and text conversion — plus number-to-word and Roman numeral tools.
The Four Number Systems, Explained
Binary (Base-2)
Binary uses only two digits, 0 and 1, because it mirrors how a transistor works: off or on. Every value a computer stores — a number, a letter, an image pixel — ultimately reduces to a string of binary digits (bits). It's the native language of hardware, which is why binary shows up constantly in networking (IP subnetting), low-level programming, and digital logic.
Octal (Base-8)
Octal uses digits 0-7. It was popular in early computing because it groups binary neatly into sets of three bits (since 2³ = 8), and it still appears today in Unix file permission codes (like chmod 755) and some legacy systems.
Decimal (Base-10)
Decimal is the counting system humans use every day, built around ten fingers and ten digits (0-9). It's the "translation layer" most people need when working with binary, octal, or hex values — converting a memory address or IP octet into a number that's actually meaningful to read.
Hexadecimal (Base-16)
Hex uses sixteen symbols: 0-9, then A-F for the values 10-15. It groups binary into sets of four bits, so two hex digits represent exactly one byte (8 bits) — which is why hex is the standard way to display memory addresses, color codes (like #1A4B8C), and MAC addresses. It's far more compact than binary while staying easy to convert back and forth.
Text, ASCII & Word Representations
Separately from pure number bases, every text character has a numeric code point defined by the ASCII (and later Unicode) standard — the letter "A" is decimal 65, binary 01000001, hex 41. Converting text to binary, ASCII, decimal, hex, or octal (and back) relies on this character-to-number mapping rather than pure positional math, which is why those tools are listed separately below. Number-to-word and Roman numeral converters serve a different purpose again — turning numeric values into written-out words or classical Roman numeral notation for documents, invoices, and legal text.
Conversion Table: The Same Value, Four Ways
| Decimal | Binary | Octal | Hexadecimal | ASCII Character |
|---|---|---|---|---|
| 65 | 01000001 | 101 | 41 | A |
| 97 | 01100001 | 141 | 61 | a |
| 48 | 00110000 | 60 | 30 | 0 |
| 255 | 11111111 | 377 | FF | — |
| 1000 | 1111101000 | 1750 | 3E8 | — |
How to Convert by Hand
Decimal to Binary (Division Method)
Repeatedly divide the decimal number by 2 and record the remainder at each step. Reading the remainders from bottom to top gives the binary value. For example, converting 13: 13÷2=6 r1, 6÷2=3 r0, 3÷2=1 r1, 1÷2=0 r1 — reading bottom-up gives 1101.
Binary to Decimal (Positional Weight Method)
Each binary digit represents a power of 2 based on its position, counting from the right starting at 2⁰. Multiply each bit by its positional value and sum the results. For 1101: (1×8)+(1×4)+(0×2)+(1×1) = 8+4+0+1 = 13.
Binary to Hexadecimal (Grouping Method)
Since one hex digit exactly represents four binary bits, split the binary number into groups of 4 (padding with leading zeros if needed) and convert each group independently. For 11010110: split into 1101 and 0110, which convert to D and 6 — giving D6.
All Number Base & Text Conversion Tools
Binary Conversions
Hexadecimal Conversions
Octal & Decimal Conversions
Numbers, Words & Roman Numerals
Frequently Asked Questions
Why do computers use binary instead of decimal?
Computer hardware is built from transistors that are most reliably built as two-state switches — on or off. Binary's two digits (0 and 1) map directly onto that physical reality, making it far more reliable to build circuits around than a system with ten distinct voltage levels for decimal digits.
What's the difference between ASCII and plain text-to-binary conversion?
They're closely related but not identical. ASCII is the specific standard that assigns a numeric code (0-127) to each character. "Text to binary" tools use that same ASCII (or Unicode/UTF-8) mapping internally, but present the result as pure binary digits rather than the intermediate ASCII decimal code — both ultimately rely on the same character-encoding table.
Why is hexadecimal used for color codes instead of binary or decimal?
A color code needs 24 bits (8 bits each for red, green, and blue). Written in binary that's a 24-character string; in hex it's just 6 characters (like 1A4B8C), because each hex digit cleanly represents 4 bits. It's the most compact format that's still easy for a person to read and edit.
Can every decimal number be converted to binary exactly?
Yes, for whole numbers. Every non-negative integer has an exact binary representation with no rounding. Fractional decimal values can sometimes only be approximated in binary (the same way 1/3 can't be written exactly in decimal), which is a well-known source of floating-point rounding errors in programming.
What's the largest number a given number of bits can represent?
An n-bit binary number can represent 2 raised to the power of n distinct values, from 0 to (2⁰-1). For example, 8 bits (a byte) can represent 256 values, 0 through 255 — which is exactly why byte values and hex pairs (00 to FF) line up so neatly.
Why do some systems still use octal instead of hex?
Octal predates widespread hex use and persists mainly for historical and compatibility reasons — Unix file permissions (like 755 or 644) are the most common example still seen today, because early Unix systems represented permission bits in groups of three, which maps naturally to octal digits.