Computers store every character as numbers, and those numbers are bytes. This converter shows the bytes behind your text in binary, hexadecimal, decimal or octal, and turns such bytes back into readable text. It is handy for learning how encoding works, for solving puzzles written in 0 and 1, and for checking what a string really contains.
Convert in three steps
- Choose the direction, Text to code or Code to text, and the Number system.
- Type or paste into the left box. The result appears on the right straight away.
- Pick the separator you want, copy the result with Copy or use Swap to check the round trip.
What you get
- Binary: eight digits per byte, so the letter A becomes 01000001.
- Hexadecimal: two digits per byte, so A becomes 41. An option adds 0x before each byte.
- Decimal: the byte value from 0 to 255, so A becomes 65.
- Octal: three digits per byte, so A becomes 101.
Programmers use hexadecimal because two digits describe exactly one byte, which makes long byte lists short and easy to compare. Binary is the form the hardware really works with, and decimal is what most people find easiest to read.
Why é takes two bytes
The text is first encoded as UTF-8, the encoding used on almost the whole web. The English letters take one byte each, accented letters such as é take two, many symbols take three and emoji take four. The tool shows how many bytes and how many characters your text has, so you can see the difference at a glance.
Reading code back
When decoding, groups can be separated by spaces, commas, dashes or new lines, and a 0x or 0b prefix is accepted. Binary and hexadecimal also work without any separator, as long as the digits split into whole bytes. If a group is not a valid byte, the tool names it so you can correct it. Nothing you type leaves your browser.