Skip to content

Text ↔ binary / hex. Encoded in your browser.

Ready

Your text never leaves your browser. Nothing is uploaded.

Binary, hex & entities without a round-trip to a server

Type text on the left to encode, or paste codes on the right to decode, the two panes stay in sync. Encoding is UTF-8 byte-accurate, so an emoji becomes its real four-byte sequence, not a broken single value; switch Unit to Unicode code points when you want one number per character instead. Choose your radix (binary, hex, octal, decimal) or HTML entities, control the delimiter and prefixes, and group output into readable lines. On decode, auto-detect reads the format for you. Everything runs in your browser, no account, nothing uploaded, free forever.

§ · written guide

How to use the Text to Binary / Hex converter

This converter turns text into binary, hex, octal or decimal codes, or HTML entities, and turns those codes back into text. By default it works on the real UTF-8 bytes, so accented letters and emoji become their full multi byte sequences, and it can switch to one Unicode code point per character instead. It is for developers, students and anyone checking how text is stored.

Step by step

  1. Pick a format

    Press Binary, Hex, Octal, Decimal or HTML entities. Binary is selected first. The options below change to suit the format, for example Prefixes is hidden for Decimal.

  2. Encode text

    Type or paste into the Text pane on the left. The Code pane on the right fills in a moment after you stop typing, or press Encode. The page starts with the sample Hello, Digital Heroes! followed by a waving hand emoji.

  3. Decode codes

    Paste codes into the Code pane and the Text pane fills in, or press Decode. With Auto-detect format on decode ticked, the tool guesses the format from what you paste; untick it to force the format you selected.

  4. Set the options

    Unit switches between UTF-8 bytes and Unicode code points. Delimiter puts a space, nothing, or your own custom… text between values. Line break every starts a new line after 4, 8 or 16 values. Pad leading zeros keeps every value the same width, Prefixes adds 0b, 0x or 0o, and Uppercase hex shows A to F in capitals.

  5. Set HTML entity options

    With HTML entities selected, Entity style chooses decimal or hex entities, and Encode chooses every character, or only non ASCII characters plus the ampersand and the two angle brackets.

  6. Copy or save

    Press Copy text or Copy code to copy one pane. Download .txt saves the Code pane, or the Text pane if Code is empty. Swap exchanges the two panes without converting anything, and Clear empties both.

Reading the result

  • The badge at the top right reports each action. For the sample it reads Encoded · 27 bytes → binary, while the Text pane shows 24 chars · 27 bytes: the emoji is one character but four bytes.
  • In binary the sample starts 01001000 01100101, the bytes for H and e. In hex the emoji is f0 9f 91 8b as bytes, or the single value 1f44b as a code point.
  • With Pad leading zeros on, each byte is 8 binary digits, 2 hex digits or 3 octal digits. In code point mode the widths are 16, 4 and 6.
  • When auto-detect picks a different format from the one selected, the badge adds (auto-detected). Errors appear in red, such as Decimal needs a delimiter between values.

Tips and common mistakes

  • Auto-detect reads anything with the letters a to f as hex and long runs of 0 and 1 as binary, and treats most other numbers as decimal. Octal without the 0o prefix, and hex with no letters such as 48 65, come out as decimal, so untick Auto-detect and pick the format yourself.
  • Binary, hex and octal can be decoded without spaces as long as the length is a whole number of bytes: a multiple of 8, 2 or 3 digits. Decimal values must be separated, or they are read as one large number.
  • Decode with the same Unit you encoded with. Bytes decoded as code points, or the other way round, turn accented letters and emoji into the wrong characters.
  • In bytes mode, any value over 255 cannot be a byte, so the tool decodes the whole input as code points instead and says so in the badge.
  • Switching formats re-encodes whatever is in the Text pane. Clear the Text pane first if you want to decode the Code pane in a new format.

Privacy and limits

Every conversion runs in your own browser. Nothing you type is sent anywhere or saved, so reloading the page brings back the sample text.

Back to the tool

§ 02 · what you can do

Everything a code converter should do.

  • Encode text to five formats, binary, hex, octal, decimal codes or HTML entities, from a single toggle.
  • Decode any of them back to text, with auto-detect that reads the format from what you paste.
  • Stay UTF-8 correct: work on real UTF-8 bytes, or switch to Unicode code points for one value per character.
  • Control delimiters & prefixes, space, none or a custom separator, plus optional 0b / 0x / 0o notation and uppercase hex.
  • Group output into lines every 4, 8 or 16 units, and pad leading zeros for fixed-width tokens.
  • Copy or download the result as a .txt file, or swap the two panes with one click, all in your browser.
§ 04 · faq

Frequently asked questions.

Is the Text to Binary / Hex converter free?
Yes, completely free for everyone. No sign-up, no account and no usage limits.
Is it private? Is my text uploaded anywhere?
No upload, ever. Every conversion runs in your browser on your own device, the text and codes you enter never leave your computer.
Does it handle emoji and other Unicode correctly?
Yes. In UTF-8 bytes mode an emoji or accented letter is encoded as its exact multi-byte sequence and decoded back losslessly. Switch to Unicode code points if you'd rather see one value per character.
What's the difference between UTF-8 bytes and code points?
UTF-8 bytes give you the on-the-wire encoding, how the text is actually stored or transmitted, so a single emoji can be several 8-bit values. Code points give one number per character (its Unicode value), which is handy for HTML entities and character-by-character work.
Can it auto-detect binary vs hex when I decode?
Yes. With "Auto-detect format on decode" on, the tool inspects what you paste, prefixes like 0x, entity markers, hex letters and token lengths, and picks binary, hex, octal, decimal or entities for you. Turn it off to force the format shown in the toggle.

Published · Last updated .

Priya sent you a message Online now

Talk to a Developer Now

Share your name and email to reply.

Reply