Skip to content
Unicode & EncodingVerified Bench 2026

UTF-8 vs UTF-16 vs ASCII | Which Encoding Should You Use?

ASCII, UTF-8, and UTF-16 are all ways of turning text into bytes a computer can store — but they disagree on how many bytes each character takes and which characters they can represent at all, and that disagreement is the direct cause of most “why did my special characters break” bugs.

·6 min read·Last verified Sep 2026
Windows 11 24H2 & macOS 15.1

ASCII: 128 characters, one byte each, no accents at all

ASCII, standardized in 1963, uses exactly 7 bits per character — 128 possible values, covering unaccented English letters, digits, and basic punctuation. It has no representation for é, ñ, €, or any character outside that original 128. Almost nothing in modern computing is "pure ASCII only" anymore, but ASCII is the common subset every other encoding on this page still agrees with for basic Latin — which is exactly why English-only text rarely reveals encoding bugs.

UTF-8: variable width, 1 to 4 bytes, backward-compatible with ASCII

UTF-8 represents each character using 1 to 4 bytes depending on which character it is. Plain English letters, digits, and basic punctuation take exactly 1 byte — identical to ASCII. Accented Latin letters (é, ñ, ü) take 2 bytes. Most other scripts and symbols take 2-3 bytes. Rarer characters and emoji take 4 bytes. This design, plus full ASCII backward compatibility, is why UTF-8 became the dominant encoding for the web and most modern software.

Quick copy byte-size examples:

UTF-16: fixed-ish width, 2 or 4 bytes, no ASCII compatibility

UTF-16 represents most common characters (including basic Latin letters) using 2 bytes each, with less common characters requiring 4 bytes via surrogate pairs. Critically, UTF-16 is not byte-compatible with ASCII — even the letter "A" takes 2 bytes in UTF-16 versus 1 byte in ASCII and UTF-8. UTF-16 is the internal string format for Windows, Java, and JavaScript's internal string representation, which is why you'll encounter it inside application code even on systems where files and network traffic are UTF-8.

The comparison that actually matters for debugging

ASCIIUTF-8UTF-16
Bytes per character1 (fixed)1-4 (variable)2 or 4
Handles é, ñ, üNoYesYes
Compatible with ASCII filesYesNo
Dominant use todayLegacy / protocol-levelWeb, most files, databasesWindows internals, Java, JS strings

Where this actually bites you

A file saved or declared as one encoding and read as another is the root cause behind the mojibake described in our Word-to-website encoding guide, HTML entities guide, and in Unicode explained. The UTF-8/UTF-16 distinction matters most when moving text between a Windows-native tool (which may produce UTF-16-encoded files, sometimes labeled "Unicode" in Windows' own Save As dialogs) and a web or Unix-based system that assumes UTF-8 by default. You can inspect raw byte sequences using our Unicode Inspector.

The practical rule

Default to UTF-8 for anything you create, save, or configure yourself. Only reach for UTF-16 awareness when debugging why a specific Windows-originated file or a JavaScript string-length calculation is behaving unexpectedly.

Share:
JV

Dr. Julian Vance

Lead Editor

Lead Systems Architect & Digital Typographer at HowToTypeThis. Every keystroke, Alt code, hex sequence, and encoding behavior on this page was tested and verified on physical Windows 11 (24H2) and macOS 15.1 (Sequoia) hardware.

Looking for a different glyph or accent?Symbol Picker ↗

Last verified Sep 2026 · Windows 11 24H2, macOS 15.1 · How we test

View all 32 guides
Tray
Copied to clipboard!
Ready to paste anywhere