THE RIGHT TOOL FOR YOUR NEXT BYTE

Decimal to Binary Converter

Type a whole decimal number to see its binary representation. The converter starts with base 10 as the input and base 2 as the output: 42 becomes 101010.

→
Runs locally
2 charactersWhole numbers · exact precision
Ready
Exact integer resultBase 2
Tip: enter a whole number in the selected input base.
Your data stays in your browser Free. No sign-up. Unicode & ASCII support
01 / EXPLAINED SIMPLY

Read the powers of two

Each binary position represents a power of two. The ones in 1101 mark 8, 4, and 1, which add up to 13. The converter shows the shortest representation, so the binary output for 13 is 1101 without leading zeros.

02 / EXPLAINED SIMPLY

Keep numbers separate from text

Converting the number 42 gives 101010. Encoding the text 42 gives one byte for each digit instead. Use the text-to-binary tool when the input is a message, identifier, or string whose characters and leading zeros need to be preserved.

GOOD QUESTIONS

Before you convert.

A few useful details for this tool.

Can I enter a fraction or a number with commas?

No. Enter a whole number using decimal digits and an optional leading minus sign. Leave out grouping separators and decimal points.

How are negative numbers shown?

The minus sign is kept, so -5 becomes -101. The converter does not use a fixed-width two's complement representation.

Will a large integer lose precision?

No. The converter uses exact integer arithmetic within the input limit, so it can represent values beyond the usual safe integer range.