Text encoder: text to HTML entities, Unicode, binary, hex and back

Turn text into HTML entities, Unicode code points (U+), binary, hex or decimal UTF-8 bytes, and turn any of them back into text.

Keep it one tap away for everyday use.

Bookmark Text encoder?

Press Ctrl + D now. Your browser opens its own bookmark box, where you choose the name and folder.

Or install fibub as an app: every tool you open then works offline.

  1. Type text
  2. See codes
  3. Copy
  4. Decode
Nothing is uploadedWorks offline once open

Bytes are UTF-8, the encoding nearly every website and file uses: letters like A take 1 byte, accented letters 2, the euro sign 3, emoji 4.

What it does

Computers store text as numbers. Which numbers depend on the character and on the encoding: Unicode gives every character a code point (an “A” is U+0041), and UTF-8 turns each code point into 1 to 4 bytes for files and web pages. This tool shows all of those views of your text at once: HTML entities (é), Unicode code points (U+00E9), binary, hex and decimal bytes. You can also paste any of them and get the text back.

It is useful for fixing garbled characters, writing special symbols into HTML, checking how many bytes a message takes, or learning how text works. Nothing leaves your browser. For other encodings see base64 converter for binary data in text form, URL encoder for web addresses and hash checker for fingerprints of text.

How to use it

  1. Choose Text to code and type or paste your text. Each format is shown in its own box with a Copy button.
  2. Tick Use names (like ©) to get readable HTML entities (&, ©), or Encode every character to turn even plain letters into numbers.
  3. To go back, choose Code to text, paste the code, and leave The code is on “Detect it” or pick the format yourself.

What each format is

  • HTML entities: &amp; or &#233; are safe ways to write &, <, > and any special character in HTML.
  • Unicode code points: the character’s number, written U+ followed by hex. A character outside the first 65,536, like an emoji, has a longer number.
  • Binary / Hex / Decimal bytes: the UTF-8 bytes of the text, as 8 bits, 2 hex digits or a number from 0 to 255. Separate bytes with spaces or commas when decoding.

Worked example

The example text Héllo € has 7 characters but 10 bytes. In hex it is 48 c3 a9 6c 6c 6f 20 e2 82 ac: the “é” takes two bytes (c3 a9) and the euro sign three (e2 82 ac). As code points it is U+0048 U+00E9 U+006C U+006C U+006F U+0020 U+20AC. In decimal bytes it is 72 195 169 108 108 111 32 226 130 172. Pasting any of these in Code to text gives back Héllo €.

FAQs

Why are characters and bytes different counts? One character can use several bytes in UTF-8. Message and database limits are usually in bytes.

Why does decoding say the bytes are not valid UTF-8? A multi-byte character was cut off, or the bytes are from another encoding such as Latin-1. UTF-8 only is supported.

Which HTML entity names are known? When encoding, a short set of common names is used (amp, lt, gt, quot, nbsp, copy, euro and a few more); everything else is a number. When decoding, every standard name your browser knows works.

Is anything uploaded? No, it all happens in your browser.

Where the numbers come from

  • UTF-8 as defined in RFC 3629, Unicode code points from the Unicode Standard, and HTML character references from the WHATWG HTML Standard; fibub's own working.

Standard scientific values, such as constants, atomic weights and melting points, are facts found in every textbook; we name where ours were checked. If you are an author or publisher and want a value, a credit or a table changed or removed, tell us and we will act quickly.

Last updated 2026-12-05.

Related tools

Base64 converter #T877 Turn text into Base64 and back (UTF-8 safe, so accents and emoji work), switch to URL-safe Base64, turn a file into Base64 or a data: URL, and save Base64 back as a file. URL encoder #T850 Percent-encode text for a web address and decode it back, as a part (encodeURIComponent) or a whole address (encodeURI), and read a pasted address's query string as a table. Hash checker #T852 Work out the SHA-256, SHA-512, SHA-384, SHA-1 and MD5 hash of text or a file in your browser, and paste an expected checksum to see whether it matches. Regex tester #T853 Type a regular expression and some text to see every match highlighted, each numbered and named group listed, and a live preview of a replacement with $1. Morse code #T1123 Translate text to Morse code and Morse back to text, play it as sound at the speed you choose (including Farnsworth timing) or flash it on the screen, with the full ITU chart. Code beautifier #T1129 Paste HTML, CSS or JavaScript to lay it out with indents and line breaks, or minify it to save bytes. Shows how many bytes you saved. The code is only read, never run, and stays in your browser. Number base converter #T1130 Convert a number between binary, octal, decimal, hexadecimal and any base from 2 to 36, see it in two's complement for 8, 16, 32 and 64 bits, convert data sizes (bits, bytes, KB, KiB) and work out download time at a speed. NATO phonetic alphabet #T1259 Type any text and get it spelled in the ICAO and NATO phonetic alphabet, with digits and a printable chart. Optional speech reads it out with voices already on your device. Roman numeral converter #T1260 Change a number from 1 to 3,999,999 into Roman numerals and back, with each step shown, and checks that tell you why a numeral is wrong. Includes a year and date mode.