Binary Code Converter — Convert Binary to Text, Decimal, Hex Instantly
Last updated:
A free online tool that converts between binary code and text, decimal numbers, hexadecimal, and ASCII. All conversion runs in your browser — no signup, no upload, no tracking.
Multi-mode binary converter
What this tool does
Switch between six conversion modes using the buttons above. Common uses include decoding binary strings from CTF challenges, generating ASCII binary for class assignments, and inspecting hex / decimal representations of small data.
If you specifically need to translate binary to English text (and back), see our dedicated Binary Code Translator.
Quick examples
| Text | Binary (UTF-8) |
|---|---|
| A | 01000001 |
| Hi | 01001000 01101001 |
| Hello | 01001000 01100101 01101100 01101100 01101111 |
How to use
- Pick a conversion mode from the buttons above (e.g. Text → Binary or Binary → Text).
- Type or paste your input into the Input box. You can also click Open file or drag a
.txtfile directly onto the input area. - Adjust the Separator option if you want different output spacing (space, none, comma, or newline).
- The result appears instantly in the Output box. Click Copy to copy it to your clipboard, or Swap to reverse the conversion.
Frequently asked questions
How do I convert text to binary?
Type any text in the Input box. The tool converts each character to its 8-bit binary code (UTF-8 encoded) and displays the result instantly. Spaces separate bytes for readability.
How do I convert binary back to text?
Switch the mode to "Binary → Text", paste your binary code (with or without spaces). The tool groups bits into 8-bit bytes and decodes them as UTF-8 text.
Why do I see "Decoded bytes are not valid UTF-8"?
Your binary likely came from a different encoding (e.g., raw bytes, Latin-1) or is corrupted. Try Binary → Decimal or Binary → Hex to inspect the raw numbers instead.
How do I convert a decimal number to binary?
Switch to "Decimal → Binary" and type a non-negative integer (e.g. 255). The tool returns the unsigned base-2 form — 255 becomes 11111111. No leading zero padding is added.
Why does my decimal show as a huge string of 0s and 1s?
Each extra digit roughly triples the bit count, and the tool uses BigInt so there is no 53-bit precision ceiling. A 30-digit decimal legitimately produces a ~100-bit binary string — that is correct output, not a glitch.
Can I convert negative numbers?
Plain decimal → binary rejects negatives because raw binary has no sign. For signed values use the signed (two's complement) checkbox and pick a bit width (8, 16, 32, or 64) so the encoding is unambiguous.
How is hex (hexadecimal) related to binary?
Each hex digit maps to exactly 4 bits, so one byte is always two hex digits. That is why "Hex → Binary" expands 0xFF into 11111111 and 0xAB into 10101011 — direct 4-bit groupings with no math involved.
Can I paste hex with a 0x prefix?
Yes. The tool strips a leading 0x (case-insensitive) and ignores all whitespace before parsing, so "0xDEAD BEEF", "DEADBEEF", and "de ad be ef" all give the same binary output.
What is the maximum input length?
The tool accepts up to 100,000 characters per conversion. For larger batches, split your input or use the command-line equivalent.
Is my input sent to your servers?
No. All conversion happens entirely in your browser using JavaScript. We never see what you type, and no input is transmitted.