Guide

ASCII, Unicode and UTF-8: how text becomes numbers

Reviewed 22 November 2026 · 6 min read · Written and maintained by Toolnexo

A computer stores text as numbers, and a handful of standards decide which number means which character. Most days you never notice them, until a name shows up as strange symbols or a script breaks on a hidden line-ending character. This guide explains ASCII, the 8-bit extensions, Unicode and UTF-8, and how to look up any character. The ASCII table on this site lists the 128 ASCII characters with decimal, hex, octal and binary codes, and converts text to codes and back, all in your browser.

ASCII: 128 characters

ASCII, from the 1960s, assigns numbers 0 to 127 to characters. Of these, 33 are control codes (0 to 31 and 127) and 95 are printable characters: letters, digits, punctuation and the space. A few worth remembering: space is 32, the digits 0 to 9 are 48 to 57, uppercase A to Z are 65 to 90 and lowercase a to z are 97 to 122.

The capital A is 65, which is 0x41 in hex and 01000001 in binary. The lowercase a is 97, or 0x61. The two differ by exactly 32, a single bit, which is why case can be flipped by changing one bit.

Control codes you will meet

  • 9 is the horizontal tab, written \t in most programming languages.
  • 10 is the line feed, written \n. It ends a line on Linux and macOS.
  • 13 is the carriage return, written \r. Windows ends a line with 13 followed by 10.
  • 27 is escape, the start of terminal colour codes.
  • 127 is delete. The other codes such as 0 (null) and 7 (bell) are rarely typed but do appear in data.

There is no single "extended ASCII"

Computers store bytes with 256 possible values, so the numbers 128 to 255 were used for extra characters, but every vendor and region filled them differently. The phrase extended ASCII covers many different code pages, not one standard. ISO 8859-1, also called Latin-1, defines 128 to 255 for Western European languages and matches the first 256 Unicode characters. Windows-1252 is a close relative that puts printable characters such as the euro sign and curly quotes where Latin-1 has control codes, which is why the two are often confused.

The ASCII table has a switch to show 128 to 255 as ISO 8859-1. Other code pages use that range differently, so a table for one is wrong for another.

Unicode and code points

Unicode is a single catalogue that gives every character in every writing system a number, called a code point, written U+ followed by hex digits. The first 128 match ASCII, and the next 128 match Latin-1. Code points go up to U+10FFFF, which allows 1,114,112 values in total. Examples: é is U+00E9, the euro sign is U+20AC and the grinning face emoji is U+1F600.

A code point is not yet bytes. How a code point is stored is decided by an encoding such as UTF-8, UTF-16 or UTF-32.

UTF-8: how code points become bytes

UTF-8 uses one to four bytes per character. Code points 0 to 127 use a single byte identical to ASCII, so any ASCII file is already valid UTF-8. Higher code points use more bytes: é (U+00E9) is the two bytes C3 A9, the euro sign is the three bytes E2 82 AC, and the emoji U+1F600 is the four bytes F0 9F 98 80.

UTF-8 is now the default encoding of most of the web. Declare it in the page with a meta charset tag and send it in the HTTP header, so browsers do not have to guess.

Why é becomes é

This garbled text, known as mojibake, happens when bytes in one encoding are read as another. The UTF-8 bytes for é are C3 and A9. If a program reads them as Latin-1 or Windows-1252 instead, C3 is shown as à and A9 as ©, so you see é. The fix is not to edit the text but to read it with the encoding it was written in.

Typical causes are a missing charset declaration, a database or file saved in one encoding and opened in another, and copying between tools with different defaults. The repair is to find where the encoding is lost and set it explicitly at both ends.

Using the table and the converters

  • Search by character (A), by decimal code (65), by hex (0x41) or by name (tab, escape).
  • Click a character to copy it.
  • The text to codes tool shows decimal, hex or binary for each character. Above 127 it shows Unicode code points, not the UTF-8 bytes. Use a UTF-8 aware converter when you need bytes.
  • Codes to text accepts values separated by spaces or commas and lists any that are not valid in the chosen base.
Tools in this guide

Put it into practice

How this guide is maintained

This page is reviewed when the related tools change. It describes what the published tools actually do: the tools run in your browser tab, so your files stay on your device. If you find something inaccurate, email [email protected] and it will be corrected.

Keep reading

Other guides

All guides →