Skip to content

UTF-8 Converter

Type or paste text to see its UTF-8 bytes in hex, decimal, binary, URL (%) or \x form, with a byte breakdown for every character. Switch to Bytes → text to turn UTF-8 back into text, or open a file and save it as UTF-8.

A → 41 · é → C3 A9 · € → E2 82 AC · 😀 → F0 9F 98 80

UTF-8 as hex
43 61 66 C3 A9

4 characters → 5 bytes

Bytes for each character
UTF-8 bytes of each character
CharacterCode pointUTF-8 bytesBytes
CU+0043431
aU+0061611
fU+0066661
éU+00E9C3 A92
Fine-tune

Everything runs in your browser; nothing is uploaded.

How to convert text to UTF-8

UTF-8 is the way almost all text is stored on computers and sent over the web. Every character is saved as one to four bytes, and a UTF-8 converter shows you those bytes.

  1. Type or paste your text into the box. The bytes appear straight away.
  2. Pick how the bytes are written: hex (C3 A9) is the most common, decimal (195 169) is what many programming languages print, binary shows the bits, URL % is for links, and \x escapes is for code.
  3. Open Bytes for each character to see which bytes belong to which letter.
  4. Copy the result. To go the other way, click Bytes → text; the bytes are carried across and decoded.

How many bytes does a character take?

It depends on the character. Plain English letters, digits and punctuation take one byte each, exactly as in ASCII. Accented letters need two, most other scripts and symbols need three, and emoji need four.

UTF-8 byte length by character range
BytesCode pointsExamplesBit pattern
1U+0000 – U+007FA–Z, a–z, 0–9, space, ! ? @ #0xxxxxxx
2U+0080 – U+07FFé ñ ü ß £ ©, Greek, Cyrillic, Hebrew, Arabic110xxxxx 10xxxxxx
3U+0800 – U+FFFF€ ’ — ™, Chinese, Japanese, Korean, Hindi1110xxxx 10xxxxxx 10xxxxxx
4U+10000 – U+10FFFFEmoji such as 😀 and 👍, rare historic scripts11110xxx 10xxxxxx ×3

The first bits of each byte say what it is: a byte starting with 0 is a whole character, one starting with 110, 1110 or 11110 starts a 2-, 3- or 4-byte character, and one starting with 10 continues it. That is why a character count and a byte count can be very different: naïve is 5 characters but 6 bytes, and a single emoji is 4 bytes.

Worked example: Café in UTF-8

C, a and f are ASCII, so each is one byte: 43 61 66. The é needs working out.

Step 1: Find its code point and write it in binary

é = U+00E9 = 1110 1001 (8 bits, so it needs the 2-byte pattern)

Step 2: Fill the pattern 110xxxxx 10xxxxxx from the right

110 00011 · 10 101001 → 11000011 10101001

Step 3: Write each byte in hex

11000011 = C3 · 10101001 = A9

Answer

Café → 43 61 66 C3 A9 (4 characters, 5 bytes)

In other forms the same bytes are 67 97 102 195 169 (decimal), Caf%C3%A9 (URL) and \x43\x61\x66\xC3\xA9 (escapes). Note that é is not the single byte E9: that is its number in the older Latin-1 encoding, and on its own it is invalid UTF-8.

UTF-8 codes for common characters

UTF-8 bytes of common characters in hex and decimal
CharacterCode pointUTF-8 (hex)UTF-8 (decimal)
AU+00414165
spaceU+00202032
no-break spaceU+00A0C2 A0194 160
éU+00E9C3 A9195 169
ñU+00F1C3 B1195 177
üU+00FCC3 BC195 188
£U+00A3C2 A3194 163
©U+00A9C2 A9194 169
€U+20ACE2 82 AC226 130 172
’ (curly apostrophe)U+2019E2 80 99226 128 153
— (em dash)U+2014E2 80 94226 128 148
中U+4E2DE4 B8 AD228 184 173
😀U+1F600F0 9F 98 80240 159 152 128

UTF-8 vs Unicode vs ASCII

Unicode is the list: it gives every character a number, called a code point (é is U+00E9). UTF-8 is one way of storing those numbers as bytes (é becomes C3 A9). ASCII is the old 128-character set of English letters, digits and symbols.

UTF-8 was designed so that ASCII text is already valid UTF-8, byte for byte. That is a big reason it won: about 99% of websites use it today. Other Unicode encodings exist, mainly UTF-16, which Windows and Java use internally and which stores most characters in two bytes, but files and web pages are nearly always UTF-8.

If you need to squeeze text down to plain ASCII, for an old system that rejects accents, use the UTF-8 to ASCII converter.

How to convert a file to UTF-8

A file shows strange characters when it was saved in one encoding and opened as another. Older Windows programs often save text and CSV files as Windows-1252 (also called ANSI), which breaks accents and symbols in anything that expects UTF-8.

  1. Click Open file and pick the text, CSV, subtitle or other plain-text file.
  2. The tool reads it as UTF-8 if it can. If not, it reads it as Windows-1252 and tells you so. UTF-16 files are spotted by their first two bytes.
  3. Check the text in the box looks right, then click Save as UTF-8. You get a copy named yourfile-utf8.csv.

Turn on Add BOM for Excel for CSV files you will open in Excel. The BOM is three bytes (EF BB BF) at the very start that tell Excel the file is UTF-8; without them, Excel may show Café instead of Café. Leave it off for web pages, code and data feeds, which don't need it.

Frequently asked questions

Why does é show up as é ?

The text was saved as UTF-8 (C3 A9) but read as Windows-1252 or Latin-1, where C3 is à and A9 is ©. Paste the garbled text into the UTF-8 Decode tool to turn it back into é.

What is the difference between UTF-8 and UTF-16?

Both store Unicode. UTF-8 uses 1 to 4 bytes per character and is identical to ASCII for English text. UTF-16 uses 2 or 4 bytes and is mostly used inside Windows, Java and JavaScript strings, not in files or on the web.

Can UTF-8 show every language and emoji?

Yes. UTF-8 can store every Unicode character, all the way up to U+10FFFF, which covers all modern scripts, symbols and emoji. Whether a character displays depends on the font, not on UTF-8.

Is UTF-8 the same as URL encoding?

No, but they are linked. URL encoding writes each UTF-8 byte of an unsafe character as % plus two hex digits, so é in a link becomes %C3%A9. Pick URL % in the tool to get that form.

Sources