UTF-8 vs UTF-16 Encoding | Which One is Prevalent?

Share on:

Unicode brought up the concept of representing all the characters in code points first and then representing these code points in memory by encoding them. How to represent these code points in memory led to the development of different Unicode encoding schemes. In this article, we’ll compare UTF-8 vs UTF-16 encoding, to see which is the preferred one.

UTF-8 vs UTF-16 both are well-established encoding standards based on Unicode. If you are working on databases or if you are an Application or a web-developer, you need to understand these two encoding standards.  This article is equipped with a complete comparison of the UTF-8 vs UTF-16 encoding scheme. Let’s go ahead and find out the similarities and differences between them.

UTF-8 vs UTF-16 Encoding

Difference Between UTF-8 & UTF-16 Encoding

Before we dive into details, here’s a short comparison chart between UTF-8 and UTF-16 encoding:

Encoding typeVariable-length encodingFixed-length encoding
Byte orderNo specific byte order (byte order mark optional)Byte order mark determines byte order (big-endian or little-endian)
Size1 to 4 bytes per character2 or 4 bytes per character depending on the code point
ASCII-compatibleYes, ASCII characters are represented by 1 byteYes, ASCII characters are represented by 2 bytes
Memory usageSmaller file size and memory footprintLarger file size and memory footprint
Widely used inUnix, Linux, and web applicationsWindows and some non-Unix systems (e.g. Java platforms)

UTF-8 Encoding

UTF-8 is the acronym for an 8-bit Unicode Transformation format that implements 1-4 blocks containing 8 bits to identify all valid code points of Unicode. Maximum 2^21 or 2,097,152 code points can be encoded in UTF-8 format. Here infrequent code points are identified with larger bytes to save space. UTF-8 test page shows weather your browser supports UTF-8 or not.

UTF-8 adopts a single block consisting of 8 binary bits to encode the first 128 code points which are identical with the ASCII character set. The number of most significant 1s followed by a zero in the first byte indicates the total number of blocks in the code. Then the bits of the code point is assigned over the following blocks.

If the first bit of the first block is zero that indicates the code point is encoded in a single byte.  If it starts with 110 that has two 1s, it means there will be two bytes. Here the first byte is the leading byte and the second one is the continuation byte. The continuation bytes start with “10” that indicates the starting of the continuation byte. The rest of the bits represent the code point including padding bits.

UTF-8 Encoding


It is the most common encoding format on the World Wide Web. UTF-8 has become the most used scheme for web applications. Since 2010, it is default standard for XML and HTML. The statistic shows 95% of web pages adopt UTF-8 in 2020. Also, IMC recommends UTF-8 for e-mail programs.

Some Common Characteristics of UTF-8 Encoding

  1. Utf-8 features compatibility with null-terminated strings. It indicates that there will be no null byte for characters after they are encoded.
  2.  It is capable to represent a large number of code points which is more than enough to cover 1,112,064 Unicode code points. So, it covers around 135 languages.
  3. It has overcome the complexity of byte order marks of UTF-16 and UTF-32. As it has the same byte order in all systems, it doesn’t need a BOM.
  4. The codes of UTF-8 can be written and interpreted fast using bitmask and bit shift operations.
  5. As UTF-8 is a byte-oriented scheme, it is well compatible with the byte-oriented networks.
  6. To occupy less space, frequently used code points are represented with fewer blocks in UTF-8 format.
  7. The first 128 characters validate ASCII characters. That means it is well compatible with the ASCII coding scheme.
  8. Server-side logic to determine encoding format for pages and submitted forms are no longer needed if UTF-8 is implemented.
  9. In case of error recovery corrupting a portion of the file, UTF-8 is very effective as it can still decode upcoming uncorrupted bytes.

Limitations Of UTF-8

  1. As UTF-8 is a variable-width encoding format, the number of bytes in a text cannot be resolved from the number of Unicode characters.
  2. The variable length of the UTF-8 code is often problematic.
  3. Where Extended ASCII needs only a single byte for non-Latin characters, UTF-8 adopts 2 bytes.
  4. As internet messages were designed in ASCII, the multi-byte patterns of UTF-8 are stripped. This initiated the necessity of designing UTF-7.
  5. It is not a superset of ISO Latin-1 like Unicode.


UTF-16 refers to 16-bit Unicode Transformation Format that adopts one or two 16-bit blocks to represent each code point. That means UTF-16 requires a minimum of 2 bytes to represent each code point. This variable-length encoding can represent all 1,112,064 code points of Unicode. It is known as the oldest UTF encoding.

Here, the encoded code points that use a single block with 2 bytes are said to be from Basic Multilingual Plane. The double block code points are called surrogate pairs and they come from surrogate planes. The mapping format is such that the first 128 code points that UTF-16 represents are ASCII characters.

Some companies use the code for code points as less significant bits and some used as the most significant bits. The first is called little-endian and the second one is called the big-endian format. Though the big-endian format doesn’t make any sense, it is considered to be more efficient for certain operations both on hardware and software.



Microsoft Windows, JavaScript, and Java programming language implements UTF-16 internally. Microsoft windows often adopt it for word processing and plain text. UTF-16 is found in Qualcomm BREW OS, NET, and Qt cross-platform graphical widget toolkit. Also, it is rarely encountered in Unix/Linux or Mac OS. According to statistics under 0.01% web pages implements UTF-16.

Some Common Characteristics of UTF-16 Encoding

  1. The UTF-16 encoding scheme is more effective on the systems where ASCII is not predominant.
  2. It is more efficient for Asian texts.
  3. UTF-16 is capable to encode with both little-endian or big-endian formats.
  4. The encoded file size of UTF-16 is less than that of UTF-32.

Limitations of UTF-16

  1. UTF-16 lacks compatibility with ASCII as the encoded ASCII characters are not the same in both cases.
  2.  It is not considered to be efficient for English texts where ASCII can encode English characters in lesser space.
  3. The software unaware of Unicode is not capable of opening UTF-16 files.
  4. The two forms of UTF-16; big-endian and little-endian cause a great deal of confusion. A file in UTF-16 needs to specify which format it is using or else it cant is interpreted correctly.
  5. It is not a byte-oriented format. So, the establishment of byte order is required to work with byte-oriented networks.
  6. In case of error recovery, if some bytes are lost, the lost byte can manipulate the continuation byte combination and end up in misinterpretation.
  7. It is not recommended to use for safety reasons by WHATWG.

Difference between UTF-8 vs UTF-16

  1. The main difference is in the number of bytes required. UTF-8 needs 1-byte at least to represent a code point in memory where UTF-16 needs 2 bytes. UTF-8 adopts 1-4 blocks with 8 bits and UTF-16 implements 1-2 blocks with 16 bits.
  2. UTF-8 is dominant on the web thus, UTF-16 could not get the popularity.
  3. In UTF-16, the encoded file size is nearly twice of UTF-8 while encoding ASCII characters. So, UTF-8 is more efficient as it requires less space.
  4. UTF-16 is not backward compatible with ASCII where UTF-8 is well compatible. An ASCII encoded file is identical with a UTF-8 encoded file that uses only ASCII characters.
  5. As UTF-8 is a byte-oriented format unlike UTF-16, So, no needs of byte order established in the case of UTF-8.
  6. UTF-8 is better than UTF-16 in error recovery corrupting portion of the file by decoding the next uncorrupting bytes.

Click here to learn about the EBCDIC code.

Wrap Up

UTF-16 is the oldest in the series of Unicode standards. But it had a few limitations like lack of compatibility with ASCII and larger size of files. To overcome these limitations of UTF-16, UTF-8 came into existence. Now UTF-8 is mostly adopted and prevalent Unicode encoding format worldwide and most of the web pages are designed based on the UTF-8 encoding scheme.

About The Author

Leave a Comment

Your email address will not be published. Required fields are marked *

This site uses Akismet to reduce spam. Learn how your comment data is processed.