# 8-bit Unicode Transformation Format (UTF-8)

> The code that nearly all sites use. It has each language and emoji.

**Field:** Software Development  
**Category:** Files & Formats  
**Also known as:** UTF-8, UTF8

## Think of it like

Think of it like one code book for every land. It has all their letters, and emoji too.

## Definition

UTF-8 is the character encoding used by almost every web page and modern system. It can store every letter of every language, plus emoji. Plain English letters take 1 byte each, so old English text is still valid. Other letters take 2, 3 or 4 bytes. If you are asked to pick an encoding, UTF-8 is the safe answer.

## Example

Emma's shop shows names in English, Persian and Greek on one page. Because the page is UTF-8, every name looks right.

## Example code

```python
print(len("A".encode("utf-8")))   # 1
print(len("é".encode("utf-8")))   # 2
print(len("😀".encode("utf-8")))  # 4
```

Simple letters take 1 byte; others take more.

## Why it matters

With UTF-8 in all places, names, signs and every language just work.

## Common mistake

Counting text length in bytes. A word with é or emoji has more bytes than letters.

## Three principles

- **Every language.** Plus emoji and symbols.
- **1 to 4 bytes.** English letters stay at 1.
- **The safe default.** Pick it unless told otherwise.

## Related terms

- [Character Encoding](https://learn.benibix.com/term/development/character-encoding)
- [Unicode](https://learn.benibix.com/term/development/unicode)
- [American Standard Code for Information Interchange (ASCII)](https://learn.benibix.com/term/development/ascii)
- [Byte](https://learn.benibix.com/term/development/byte)
- [String](https://learn.benibix.com/term/development/string)
- [Base64](https://learn.benibix.com/term/development/base64)

## Told apart from

- [Unicode vs UTF-8](https://learn.benibix.com/compare/unicode-vs-utf-8): People think Unicode and UTF-8 are two names for one thing, and they are not. Unicode is the list that gives each character a number. UTF-8 is one rule for storing those numbers as bytes. So a file is never saved in Unicode alone. It is saved in UTF-8, or in another encoding of Unicode.
- [ASCII vs UTF-8](https://learn.benibix.com/compare/ascii-vs-utf-8): People think every plain text file is ASCII, and it is not. ASCII has only 128 codes, for basic English letters, digits and signs. UTF-8 can store every character in every language, plus emoji. Its first 128 codes are the same as ASCII, so plain English text is both. Add one é or one emoji, and the file is UTF-8, not ASCII.

## Taught in

- [ASCII, Unicode and UTF-8](https://learn.benibix.com/learn/development-formats/ascii-unicode-and-utf-8): File Formats, 8/11

---

Source: https://learn.benibix.com/term/development/utf-8
Author: Behnia Zarei (a developer in Vienna, Austria, who builds and teaches data, AI and business intelligence at BENIBIX)
Publisher: BENIBIX Learn (https://learn.benibix.com/)
Last updated: 2026-11-18
Licence: CC BY 4.0 (https://creativecommons.org/licenses/by/4.0/). Quote freely with attribution.
