Number Base Converter
Convert numbers between binary, octal, decimal, and hex online free. Decimal to binary converter with step-by-step working shown for every conversion.
How to Use Number Base Converter
- 1Enter a number in the input field.
- 2Select the base of your input: Binary, Octal, Decimal, Hexadecimal, or Custom Base.
- 3All equivalent representations update instantly across all four bases.
- 4Click any output value to copy it to your clipboard.
- 5Enable Show Working to see the step-by-step conversion process.
About Number Base Converter
This decimal to binary converter online free instantly translates any integer between all four common number bases — binary (base 2), octal (base 8), decimal (base 10), and hexadecimal (base 16) — as well as any custom base from 2 to 36.
Type a number in any base and all other representations update simultaneously. Enable Show Working to see the step-by-step division algorithm that produced the result — which makes this number system converter with working shown ideal for students learning digital electronics, computer architecture, and programming fundamentals.
Working in web development and need a hex to binary converter with steps? Debugging Unix file permissions and need an octal to decimal converter? This base conversion calculator free handles all these cases in one tool.
Results are instantly copyable. Custom base support means you can also work in base 3, base 5, base 12, or any other radix used in mathematical or engineering contexts.
How Number Base Converter Works
The Number Base Converter converts integers between any two bases from binary (base-2) through hexadecimal (base-16), and to any custom base up to base-36. Conversion works by first translating the input number to its decimal (base-10) value, then converting that decimal value into the target base using repeated division. For example, converting the binary number 1011 to decimal: (1×8) + (0×4) + (1×2) + (1×1) = 11. The tool simultaneously shows the number in binary (base-2), octal (base-8), decimal (base-10), and hexadecimal (base-16) — the four most common bases in computing — updating all four instantly as you type.
Decimal → Base N: repeatedly divide by N; remainders in reverse order form the new number.
Base N → Decimal: multiply each digit by N^position (right to left, starting at 0) and sum.Reference Data
Common Base Representations (Decimal 0–15)
| Decimal | Binary | Octal | Hex |
|---|---|---|---|
| 0 | 0 | 0 | 0 |
| 1 | 1 | 1 | 1 |
| 2 | 10 | 2 | 2 |
| 3 | 11 | 3 | 3 |
| 4 | 100 | 4 | 4 |
| 5 | 101 | 5 | 5 |
| 6 | 110 | 6 | 6 |
| 7 | 111 | 7 | 7 |
| 8 | 1000 | 10 | 8 |
| 9 | 1001 | 11 | 9 |
| 10 | 1010 | 12 | A |
| 11 | 1011 | 13 | B |
| 12 | 1100 | 14 | C |
| 13 | 1101 | 15 | D |
| 14 | 1110 | 16 | E |
| 15 | 1111 | 17 | F |
Who Uses This Tool and Why
- ✓Computer science students convert binary to decimal and back to learn how integers are stored in memory and practice the positional notation system for exams.
- ✓Embedded systems developers use hexadecimal representations of memory addresses, register values, and bitmasks; the converter lets them verify these values quickly.
- ✓Network engineers convert IP address octets to binary to understand subnetting and CIDR notation for subnet mask calculations.
- ✓Web designers convert hex colour codes to decimal RGB values and vice versa when working between CSS hex notation and RGB/RGBA functions.
- ✓Security researchers translate shellcode or binary payloads between hex and binary representations when analysing malware or debugging exploit code.
Limitations & Practical Tips
Known Limitations
- •The tool works with integers only — fractional (floating-point) binary or hex values (e.g., 0.101 in binary) are not supported.
- •For very large numbers (above 2⁵³), JavaScript's floating-point arithmetic introduces precision errors. Use a BigInt-aware tool for cryptographic-scale numbers.
- •Letters A–Z represent digits 10–35 in bases above 10. Output is shown in uppercase by convention for hex and higher bases.
Tips for Best Results
- →In hex, prefix values with "0x" in code to distinguish them from decimal numbers (e.g., 0xFF not just FF).
- →Binary numbers are always 0s and 1s. If you accidentally type a 2 or higher digit, the input is invalid for base-2 — the tool will highlight the error.
- →Memorise: 0xFF = 255 (decimal) = 11111111 (binary). This is one of the most common conversions in web colour work and bitmask operations.
Frequently Asked Questions
- What are the four main number bases?
Binary (base 2) uses digits 0–1 and is the language of computers. Octal (base 8) uses digits 0–7, common in Unix file permissions. Decimal (base 10) uses digits 0–9, the human counting system. Hexadecimal (base 16) uses 0–9 and A–F, widely used in programming for memory addresses and colors.
- How do I convert decimal to binary?
Repeatedly divide the decimal number by 2 and record the remainders from bottom to top. Example: 13 ÷ 2 = 6 R1, 6 ÷ 2 = 3 R0, 3 ÷ 2 = 1 R1, 1 ÷ 2 = 0 R1 → binary is 1101. The converter shows this result instantly. Select Decimal input, enter 13, and see 1101 in binary.
- What is hexadecimal used for in programming?
Hexadecimal is used for memory addresses (0xFF00A2), color codes in CSS/HTML (#3b82f6 = RGB 59,130,246), Unicode code points (U+1F600), file magic bytes, and bit masks. Each hex digit represents exactly 4 bits, making hex a compact and readable representation of binary data.
- What do Unix file permission numbers mean?
Unix permissions use octal. 755 in octal: 7 = rwx (read+write+execute) for owner, 5 = r-x for group, 5 = r-x for others. In binary: 111 101 101. The chmod command accepts these octal values directly. Convert 755 from octal to binary to see the individual permission bits.
- How does base 36 work?
Base 36 uses digits 0–9 and letters A–Z (26+10 = 36 symbols). It is the most compact base using only alphanumeric characters and is used for URL shorteners, unique IDs, and serial numbers where readability matters. The number 123456789 in base 36 is "21I3V9".
- What is the maximum number this converter handles?
The converter uses JavaScript's standard Number type (IEEE 754 double precision), which safely handles integers up to 2⁵³ − 1 (9,007,199,254,740,991 in decimal). For very large numbers (cryptographic keys, large memory addresses), you would need a big integer library.
- Why does 0xFF equal 255 in decimal?
Each hex digit represents 4 bits. 0xFF = F × 16¹ + F × 16⁰ = 15 × 16 + 15 × 1 = 240 + 15 = 255. In binary, FF = 11111111 = 8 bits all set to 1. 255 is the maximum value of an 8-bit unsigned integer and the maximum single-channel RGB color component.
Looking for more tools like this? Browse all Converters →
More Converters
Grams to Cups Converter
Convert grams to cups for any ingredient free online. Accurate baking converter for flour, sugar, butter, rice, and more using ingredient-specific ratios.
Image to PDF Converter
Convert PNG, JPG, and WebP images to PDF free online. No upload required — fast, private, client-side image to PDF conversion in your browser.
Unit Converter
Convert length, weight, temperature, area, volume, and speed units online free. Metric and imperial unit conversion with instant results.
File Size Converter
Convert MB to GB, bytes to KB, and all file size units free online. Supports both decimal (SI) and binary (IEC) standards. No signup needed.
Roman Numeral Converter
Convert numbers to Roman numerals and translate Roman numerals back to decimal free online. Covers 1 to 3,999 with step-by-step breakdowns — no signup.
Morse Code Translator
Translate text to Morse code and Morse code to text free online. Includes audio playback so you can hear the dots and dashes.
You Might Also Like
Word Counter
Count words, characters, sentences, and paragraphs instantly. Free online word counter tool with reading time estimate for writers and students.
Character Counter
Count characters with and without spaces instantly. Free online character counter for Twitter, Instagram, SMS, and meta tag length limits.
JSON Formatter
Format, validate, and minify JSON online. Instantly beautify or compress JSON data with syntax highlighting. Free JSON formatter and validator.
Last updated: May 2, 2026 — Number Base Converter by CalcDash.