Decimal to Binary Converter
Type a base-10 integer and instantly see it written in binary, hexadecimal, and octal at the same time.
How to use this tool
- 1
Type or paste a decimal (base-10) whole number into the input box.
- 2
Read the binary, hexadecimal (shown with a 0x prefix), and octal forms in the table that appears below.
- 3
Change the number to convert a different value, or clear the box to hide the results.
- 4
Copy any line of output you need straight from the table into your code or terminal.
What does converting decimal to binary actually mean?
Decimal is the base-10 system humans use, with digits 0 through 9. Binary is base-2, using only 0 and 1, which is how data is physically represented in a computer's memory and registers. Converting from decimal to binary means rewriting the same quantity as a sum of powers of two: for example, 13 becomes 1101, because 8 + 4 + 0 + 1 = 13. Hexadecimal (base-16) and octal (base-8) are shorthand for binary because each hex digit maps to exactly four bits and each octal digit to three, making long bit strings easier to read. This tool does the conversion with the browser's built-in Number.toString method after parsing your input with parseInt in base 10. That means it works on standard JavaScript numbers, so reliable, exact results are limited to safe integers up to 9,007,199,254,740,991 (2^53 - 1). Negative numbers are shown in sign-magnitude form with a leading minus, not in two's-complement, and any fractional part you type is truncated before conversion. There is no fixed bit width or zero padding: you get the minimal representation of the value.
Common use cases
Checking the binary pattern of a value while debugging bitmask or flag-based logic in your code.
Translating a decimal color or byte value into hex when writing CSS, HTML, or low-level data.
Working through computer-science homework on number bases and verifying your hand conversions.
Reading an octal Unix file-permission value such as 755 and seeing its binary bits.
Confirming what bits an embedded-systems register value sets before flashing firmware.
Quickly converting a network or protocol constant between decimal, hex, and octal during analysis.
Frequently asked questions
Does this convert fractional or decimal-point numbers?▼
How are negative numbers handled?▼
Is there a maximum number I can convert?▼
Why is the hex shown with a 0x prefix and the binary without one?▼
Does it add leading zeros or pad to a byte or word width?▼
Is my input sent to a server?▼
Can I get back decimal from binary here?▼
Related tools
JSON to CSV Converter
Convert JSON arrays to CSV.
CSV to JSON Converter
Convert CSV to JSON arrays.
CSV to SQL INSERT
Generate SQL INSERT statements from CSV.
Binary to Hex Converter
Convert binary numbers to hexadecimal.
Hex to Binary Converter
Convert hexadecimal to binary numbers.
ASCII to Hex Converter
Convert text to ASCII hex codes and back.