Algorithms

UTF-8

The most used way to store Unicode text. Each character takes 1 to 4 bytes, and ASCII text stays the same.

Example

"niño" takes 5 bytes: 1 each for n, i and o, and 2 for "ñ". An emoji takes 4.

Test yourself: UTF-8

How letters are stored

An ASCII text file can be read as UTF-8 without changing anything.

Lessons that use it

More algorithms terms

All terms →

Arki, the beaver mascot

Your next interview starts with 5 minutes today.

Free on iOS and Android. Start from zero, no account needed.