The underscore, that little symbol “_” that we use daily on keyboards and screens, is a fundamental element in the world of computing. We often take it for granted, but behind this simple character lies a world of codes and standards that allow for its correct representation and interpretation by computers. In this article, we will explore the underscore in depth, analyzing its ASCII and Unicode encoding , and discovering how it is used in programming languages, operating systems, and SEO.
What is the Underscore?
The underscore , also known as the low line , is a typographic character consisting of a horizontal line positioned at the bottom of the text line. Its history dates back to typewriters, where it was used to underline words before the advent of bold or italic text. Today, the underscore plays a crucial role in computer science, finding use in various contexts:
- Programming: In many programming languages, the underscore is used to separate words in variable and function names (e.g.,
nome_variabile,calcola_area), improving code readability. - File names: The underscore is often used in file and folder names to separate words or to indicate specific information (example:
relazione_annuale_2023.pdf). - Web addresses: In URLs, the underscore can be used to separate keywords, which helps with SEO.
Fun fact: In old typewriters, the “_” symbol was often used in combination with the backspace key to create a continuous underline. You would type the symbol, go back with the backspace key, and repeat the operation for the entire length of the word to be underlined.
ASCII Encoding

To fully understand how the underscore works in computer science, it is essential to know the concept of character encoding. ASCII (American Standard Code for Information Interchange) is one of the earliest and most important encoding standards. Developed in the 1960s, ASCII uses 7 bits to represent 128 characters, including uppercase and lowercase letters , numbers, punctuation symbols, and control characters.
| Character | Decimal Code | Hexadecimal Code |
|---|---|---|
| A | 65 | 41 |
| a | 97 | 61 |
| 0 | 48 | 30 |
| ! | 33 | 21 |
| _ | 95 | 5F |
As can be seen from the table, the underscore in ASCII has decimal code 95 and hexadecimal code 5F .
Despite its historical importance, ASCII has limitations. With only 128 characters, it is unable to represent the wide range of symbols and special characters found in different languages around the world.
Further information: To overcome the limitations of ASCII, several extensions have been developed, such as extended ASCII , which uses 8 bits to represent 256 characters. However, these extensions are not universal and may vary depending on the operating system and language.
The Advent of Unicode

Unicode was created to meet the need for a universal encoding system capable of representing all characters in all languages of the world. This standard assigns a unique code to each character, regardless of language, platform, or program.
Unicode offers several types of encoding:
- UTF-8: Uses 1 to 4 bytes to represent a character. It is the most common encoding on the web.
- UTF-16: Uses 2 or 4 bytes to represent a character. It is commonly used in Windows operating systems.
- UTF-32: Uses 4 bytes to represent each character. It offers better performance in some applications, but takes up more space.
In Unicode, the underscore is represented by the code U+005F . This code is identical in all Unicode encodings, ensuring compatibility between different systems.
Focus: Unicode has revolutionized the way software is localized for different languages. Thanks to this standard, it is possible to develop applications that support a wide range of characters and languages, making software accessible to a global audience.
The Underscore in Programming Languages
The underscore plays an important role in many programming languages. Let’s look at some examples:
- C: In C, the underscore is often used in variable and function names (example:
int numero_elementi;). - Java: In Java, the underscore is also commonly used to improve code readability (example:
String nomeUtente;). - Python: In Python, the underscore has a special meaning in some contexts. For example,
_is used to indicate a temporary variable or a value that will not be used.
Best practice: For better code readability, it is advisable to use the underscore consistently and follow the conventions of the programming language you are using.
The Underscore in Operating Systems
The use of the underscore in file and folder names may vary depending on the operating system:
- Windows: Windows allows the use of the underscore in file and folder names, but there are some exceptions. For example, you cannot use the underscore as the first character of a file name.
- macOS: macOS supports the use of the underscore without any particular restrictions.
- Linux: Linux is generally permissive regarding the use of the underscore, but it is advisable to avoid using it as the first character of a file or folder name.
Examples: A file name such as report_vendite_2023_Q1.xlsx is perfectly valid in all operating systems. However, a file name such as _file_nascosto.txt might cause problems in Windows.
The Underscore and SEO
The underscore also plays an important role in terms of SEO. Search engines, such as Google, consider the underscore as a word separator in URLs.
Tips for using the underscore for SEO purposes:
- Use the underscore to separate keywords in URLs, making them more readable and understandable for both users and search engines.
- Avoid using too many hyphens in a single URL.
- Prefer using the underscore instead of the hyphen (-) in URLs, as Google tends to interpret the hyphen as a stronger separation sign.
Case study: Websites like Wikipedia and Amazon use the underscore in URLs to improve the readability and indexing of their pages.
Comparison Table: ASCII vs. Unicode
| Feature | ASCII | Unicode |
|---|---|---|
| Number of characters | 128 | Over 143,000 |
| Encoding | 7 bits | UTF-8 (1-4 bytes), UTF-16 (2-4 bytes), UTF-32 (4 bytes) |
| Language support | Limited to English and some Western languages | Supports all languages of the world |
| Flexibility | Low | High |
| Compatibility | Compatibility issues between different platforms | Guaranteed compatibility between different systems. |
Common Mistakes and Fun Facts
- Common mistake: Using the underscore instead of the hyphen (-) in URLs. Although both symbols are allowed, Google tends to give more weight to the underscore as a word separator.
- Fun fact: The underscore is often used in nicknames and usernames on social media, as it allows you to create unique names even when the desired word is already in use.
In Brief (TL;DR)
The underscore is a fundamental character in computer science, used in programming, file names, and URLs.
ASCII and Unicode are two character encoding standards. ASCII is more limited, while Unicode supports all the languages of the world.
The underscore has the code 95 in ASCII and U+005F in Unicode.

Conclusions

Character encoding is a fundamental aspect of computer science. ASCII and Unicode, with their different characteristics and functionalities, have enabled the representation and exchange of textual information in an increasingly efficient and universal way. The underscore, a seemingly simple symbol, is an example of how encoding standards are essential to ensure compatibility between different systems and languages.
The evolution of encoding standards continues, with new challenges and opportunities on the horizon. Unicode, with its ability to represent a wide range of characters, is destined to play an increasingly important role in the era of globalization and digital communication.
To stay up-to-date on the latest news in the IT field and delve deeper into topics such as character encoding, I invite you to subscribe to the TuttoSemplice.com newsletter. You will find articles, guides, and useful resources to improve your digital skills.
Frequently Asked Questions

The underscore () is a typographic character found at the bottom of the line of text, while the hyphen (-) is a punctuation symbol used to join words or indicate a range.
Yes, the underscore is generally accepted in email addresses.
On the Italian keyboard, the underscore is obtained by pressing the Shift key (the one on the right) and the key immediately to its left simultaneously.
Yes, using underscores in URLs can affect SEO. Google tends to interpret the underscore as a word separator, so it is advisable to use it to separate keywords in URLs.
If you use non-ASCII characters in a document and open it on a system that does not support these characters, you may see incorrect or illegible symbols.
Still have doubts about The Underscore: ASCII and Unicode Code Comparison?
Type your specific question here to instantly find the official reply from Google.
Sources and Further Reading






Did you find this article helpful? Is there another topic you’d like to see me cover?
Write it in the comments below! I take inspiration directly from your suggestions.