Skip to content
ASCII World

UTF-8

Definition of UTF-8

UTF-8 encodes all 1,112,064 valid Unicode code points using 1 to 4 bytes per character. ASCII characters (0-127) take 1 byte - the same byte values as ASCII itself, which is why any ASCII file is automatically valid UTF-8. Accented Latin characters take 2 bytes, CJK ideographs take 3, and emoji take 4.

Designed by Ken Thompson and Rob Pike in 1992 at a New Jersey diner (on a placemat, as the story goes), UTF-8 now accounts for over 98% of web pages. Its key advantage over UTF-16: no byte-order ambiguity and no null bytes within ASCII text, so C string functions still work. Always set <meta charset="utf-8"> in HTML and use UTF-8 in databases, APIs, and file storage unless you have a specific reason not to. Use our text converter to see how text looks in different representations.

References

Related Terms