<?xml version="1.0" encoding="UTF-8"?>
<rss xmlns:dc="http://purl.org/dc/elements/1.1/" xmlns:content="http://purl.org/rss/1.0/modules/content/"
    xmlns:atom="http://www.w3.org/2005/Atom" xmlns:media="http://search.yahoo.com/mrss/" version="2.0">
    <channel>
        
        <title>
            <![CDATA[ ascii - freeCodeCamp.org ]]>
        </title>
        <description>
            <![CDATA[ Browse thousands of programming tutorials written by experts. Learn Web Development, Data Science, DevOps, Security, and get developer career advice. ]]>
        </description>
        <link>https://www.freecodecamp.org/news/</link>
        <image>
            <url>https://cdn.freecodecamp.org/universal/favicons/favicon.png</url>
            <title>
                <![CDATA[ ascii - freeCodeCamp.org ]]>
            </title>
            <link>https://www.freecodecamp.org/news/</link>
        </image>
        <generator>Eleventy</generator>
        <lastBuildDate>Thu, 25 Jun 2026 04:44:48 +0000</lastBuildDate>
        <atom:link href="https://www.freecodecamp.org/news/tag/ascii/rss.xml" rel="self" type="application/rss+xml" />
        <ttl>60</ttl>
        
            <item>
                <title>
                    <![CDATA[ How to Get the ASCII Value of Any Character with One Line of Code ]]>
                </title>
                <description>
                    <![CDATA[ When you're working on a project or computer program, you might need to use the ASCII value of a certain character.  This is a common phenomenon in competitive programming, as well – we typically need to use the ASCII value of characters when solving... ]]>
                </description>
                <link>https://www.freecodecamp.org/news/get-the-ascii-value-of-any-character-with-one-line-of-code/</link>
                <guid isPermaLink="false">66b902b5558588891017dd80</guid>
                
                    <category>
                        <![CDATA[ ascii ]]>
                    </category>
                
                    <category>
                        <![CDATA[ c programming ]]>
                    </category>
                
                <dc:creator>
                    <![CDATA[ Md. Fahim Bin Amin ]]>
                </dc:creator>
                <pubDate>Mon, 28 Feb 2022 16:20:44 +0000</pubDate>
                <media:content url="https://www.freecodecamp.org/news/content/images/2022/02/ascii-banner.jpg" medium="image" />
                <content:encoded>
                    <![CDATA[ <p>When you're working on a project or computer program, you might need to use the ASCII value of a certain character. </p>
<p>This is a common phenomenon in competitive programming, as well – we typically need to use the ASCII value of characters when solving some of the problems on various online platforms like HackerRank, Codeforces, and Codechef.</p>
<p>What do we do in those situations? Most of us simply search for the ASCII value on the internet, like this:</p>
<p><img src="https://www.freecodecamp.org/news/content/images/2022/02/Screenshot-2022-02-26-200516.png" alt="Image" width="600" height="400" loading="lazy"></p>
<p>Yes, it's true that we can get the ASCII value of any character directly by searching the internet. But sometimes you might not be able to search for them on the internet. Like if you are taking an exam, you might be forbidden from accessing the internet during the exam. </p>
<p>So what would you do if you don't remember the ASCII value of the character you need, and you are also forbidden to search for it on the internet? </p>
<p>No need to panic! In this article, I am going to solve the problem for you. You will never need the internet for searching the ASCII value of any character ever again.</p>
<h2 id="heading-getting-started">Getting Started</h2>
<p>Suppose you are writing a C program, and you also need to know the ASCII value of a character. Fear not! You do not need to shift to other languages just to get the value using code – you can do that within your C code! Follow the code below:</p>
<pre><code class="lang-c"><span class="hljs-meta">#<span class="hljs-meta-keyword">include</span><span class="hljs-meta-string">&lt;stdio.h&gt;</span></span>
<span class="hljs-function"><span class="hljs-keyword">int</span> <span class="hljs-title">main</span><span class="hljs-params">()</span>
</span>{
    <span class="hljs-keyword">char</span> ch = <span class="hljs-string">'A'</span>;
    <span class="hljs-built_in">printf</span>(<span class="hljs-string">"%c\n"</span> , ch);
}
</code></pre>
<p>Can you tell me what we would get in the output? If you think that you would get the character itself in the output, then you are correct!</p>
<pre><code class="lang-c"><span class="hljs-comment">// A</span>
</code></pre>
<p>I used the <code>//</code>to indicate the comment here.</p>
<p>Let me give you a nice screenshot below as well:</p>
<p><img src="https://www.freecodecamp.org/news/content/images/2022/02/Screenshot-2022-02-26-184023.png" alt="Image" width="600" height="400" loading="lazy"></p>
<p>In line 4, I am taking a character type data as <code>ch</code>, and I am assigning a character to this variable. For now, I am taking the character 'A', then I am printing the character itself in line 5.</p>
<p><img src="https://www.freecodecamp.org/news/content/images/2022/02/Screenshot-2022-02-26-184216.png" alt="Image" width="600" height="400" loading="lazy"></p>
<p>But if I use <code>%d</code> instead of <code>%c</code>, then I am telling it to print the integer value of the character, not the character itself. </p>
<p>If we talk about the integer value of a character, then it can represent one thing – the ASCII value of the character, right? The sample code is given below:</p>
<p><img src="https://www.freecodecamp.org/news/content/images/2022/02/Screenshot-2022-02-26-184314.png" alt="Image" width="600" height="400" loading="lazy">
<em>Sample input</em></p>
<p>In the output, we will get the ASCII value of the character 'A'.</p>
<p><img src="https://www.freecodecamp.org/news/content/images/2022/02/Screenshot-2022-02-26-184401.png" alt="Image" width="600" height="400" loading="lazy"></p>
<p>That is how we get the ASCII value of any character using the above code. </p>
<p>Let me introduce you to a more interesting thing now. As I am only showing you the process of getting the ASCII value of the English alphabet, you may wonder whether the code only works for getting the ASCII value of an alphabet letter or whether it works with any valid characters. </p>
<p>Well, the good news is that this process works for any valid characters! Let me show you more examples first.</p>
<h2 id="heading-how-to-get-the-ascii-value-of-a-space">How to Get the ASCII Value of a Space (  )</h2>
<p>A space is also considered a valid character. In code, normally we use a space to represent it, like <code>char ch = ' '</code>. So if I use the space in the above code – but this time I use the space instead of the alphabet letter – then the code would be like this:</p>
<p><img src="https://www.freecodecamp.org/news/content/images/2022/02/Screenshot-2022-02-26-184845.png" alt="Image" width="600" height="400" loading="lazy"></p>
<p>In line 4, we assigned a space into the character variable named <code>char</code>. Now, if I run the code, then I would get the ASCII value of a space, which is 32.</p>
<p><img src="https://www.freecodecamp.org/news/content/images/2022/02/Screenshot-2022-02-26-185014.png" alt="Image" width="600" height="400" loading="lazy"></p>
<p>Now, if you can understand how this works, then let me give you a simple task. In all of the code, we assigned character data manually and we checked the ASCII value by printing the value in the output.</p>
<p>In this process, if we want to get the ASCII value of various characters, then we need to change the code manually each time. But this might be a hassle if we want something like an ASCII calculator, where the user would provide the character as an input and the code would provide the exact ASCII value as the output in the terminal. </p>
<p>Do you think you could create that now on your own? Don't scroll down until you have tried to write down the code at least once!</p>
<p>Alright, I hope you have tried to make the calculator by tweaking the code a little bit. If you struggle in doing so, then do not worry as I have you covered.</p>
<h2 id="heading-how-to-make-an-ascii-calculator">How to Make an ASCII Calculator</h2>
<p>Earlier we assigned each character manually in our code. As we want the user to provide the character itself, we will tweak the code a little bit. </p>
<p>This time, we won't assign character values in the character variables. We will declare a character variable first so that we can assign the character to the variable later. Then we'll ask the user to provide a character in the terminal. </p>
<p>After getting the input from the user, we will assign the value to our character variable. Then we'll simply print the ASCII value of the character in the terminal. It's that easy!</p>
<p>Simply follow the code below, and I'll explain all of the steps again below:</p>
<p><img src="https://www.freecodecamp.org/news/content/images/2022/02/Screenshot-2022-02-26-185809.png" alt="Image" width="600" height="400" loading="lazy">
<em>Our ASCII Calculator using the C programming language</em></p>
<p>Let me explain what I did in the code first. Then I will show you the result by running the program. </p>
<p><img src="https://www.freecodecamp.org/news/content/images/2022/02/Screenshot-2022-02-26-190838.png" alt="Image" width="600" height="400" loading="lazy"></p>
<p>As you can see, I included the basic and must needed standard header file in line 1. <code>stdio</code> represents the standard input and output format. </p>
<p>Basically, <code>stdio.h</code> is a header file that has the necessary information to include the input/output related functions in our program. As we will definitely work on input and output, it is a necessary header file in our C program. </p>
<p><img src="https://www.freecodecamp.org/news/content/images/2022/02/Screenshot-2022-02-26-203815.png" alt="Image" width="600" height="400" loading="lazy"></p>
<p>In line 2, I added the main function. A main is a predefined keyword or function in C. The execution of any C program always starts from the <strong>main</strong> function – keep that in your mind. </p>
<p>We have to provide the return type of the function. I used <code>int</code> so that the main function can return any integer value. But as you can see, I am not actually returning anything later. So, I can also use <code>void</code> instead of <code>int</code> in line 2. The output would be exactly the same. <strong>Void</strong> means that it does not return anything.</p>
<p><img src="https://www.freecodecamp.org/news/content/images/2022/02/Screenshot-2022-02-26-190920.png" alt="Image" width="600" height="400" loading="lazy"></p>
<p><img src="https://www.freecodecamp.org/news/content/images/2022/02/Screenshot-2022-02-26-190939.png" alt="Image" width="600" height="400" loading="lazy"></p>
<p>In line 3 and in line 7, I used curly braces <code>{</code> <code>}</code>. Normally we use curly braces to group a set of statements. As all of the statements (or, you could say, the lines of code) from line 4 to line 6 are included in the main function, I used those curly braces to represent them all as a set of statements, or a block of code.</p>
<p><img src="https://www.freecodecamp.org/news/content/images/2022/02/Screenshot-2022-02-26-191024.png" alt="Image" width="600" height="400" loading="lazy"></p>
<p>In line 4, I declared a character variable. We use <code>char</code> to represent the character data type. </p>
<p>After declaring the data type, we need to provide the name of the character. I used <code>ch</code> as my variable name, but you can use any name you want except the <a target="_blank" href="https://www.javatpoint.com/keywords-in-c">C keyword</a>. There are <a target="_blank" href="https://www.programiz.com/c-programming/c-variables-constants#:~:text=%3D%20%27l%27%3B-,Rules%20for%20naming%20a%20variable,name%20(identifier)%20can%20be.">some conventions of naming a variable in the C programming language</a> you can check out, too.</p>
<p>The semicolons ( <code>;</code> ) are the end statements in the C programming language. We use <code>;</code> to indicate the end of a line of code.</p>
<p><img src="https://www.freecodecamp.org/news/content/images/2022/02/Screenshot-2022-02-26-191426.png" alt="Image" width="600" height="400" loading="lazy"></p>
<p>In line 5, I am using the <code>scanf</code> function. We use it to get input from the user. I am taking a character value from the user as input. Here, <code>%c</code> refers to character type data. </p>
<p>After taking the character value as input from the user, we are storing the value into our character variable, <code>ch</code>. (If we don't store the data, then how we are going to make calculations on them, right?).</p>
<p> <code>&amp;</code> is an address operator, and the <code>&amp;</code> operator is used to get the address of the variable. As we are using <code>&amp;ch</code>, it indicates that we are telling the C compiler that we are giving or passing the input data value in the <code>ch</code> variable. We pronounce <code>&amp;</code> as <strong>Ampersand.</strong></p>
<p><img src="https://www.freecodecamp.org/news/content/images/2022/02/Screenshot-2022-02-26-192257.png" alt="Image" width="600" height="400" loading="lazy"></p>
<p>In line 6, I am printing the ASCII value of the character (the character we have taken as an input from the user).</p>
<p>I have talked a lot, haven't I? 😅 Now, it is time to show you the result of our very simple ASCII calculator.</p>
<p><img src="https://www.freecodecamp.org/news/content/images/2022/02/image-104.png" alt="Image" width="600" height="400" loading="lazy"></p>
<p>Here I provided <code>L</code> as input to get the ASCII value of <code>L</code>. In the next line, the program provided 76 as the output, and 76 is the exact ASCII value of <code>L</code>.</p>
<p>Now let's check something different. I will check the ASCII value of <code>!</code> now.</p>
<p><img src="https://www.freecodecamp.org/news/content/images/2022/02/Screenshot-2022-02-26-192616.png" alt="Image" width="600" height="400" loading="lazy"></p>
<p>As you can see, it's working flawlessly! Now let's make the code prettier. </p>
<p>You see, as we have written the entire code, we can understand that we have to give a character value as input first. Then the program provides the ASCII value.</p>
<p>But other users might not get that. They might also get confused about what they should do after running the code – like, will the code directly provide the ASCII value of any random character or anything else? We do not want to make others confused with our simple yet kind of handy project, right?</p>
<p>Let's provide some statements first that make it easier for users to figure out what they need to do after executing the code. The code would look like this:</p>
<pre><code class="lang-c"><span class="hljs-meta">#<span class="hljs-meta-keyword">include</span> <span class="hljs-meta-string">&lt;stdio.h&gt;</span></span>
<span class="hljs-function"><span class="hljs-keyword">void</span> <span class="hljs-title">main</span><span class="hljs-params">()</span>
</span>{
    <span class="hljs-keyword">char</span> ch;
    <span class="hljs-built_in">printf</span>(<span class="hljs-string">"Enter a character: "</span>);
    <span class="hljs-built_in">scanf</span>(<span class="hljs-string">"%c"</span>, &amp;ch);
    <span class="hljs-built_in">printf</span>(<span class="hljs-string">"The ASCII value of %c is: %d\n"</span>, ch, ch);
}
</code></pre>
<p>We all want a nice screenshot. Let me give you one:</p>
<p><img src="https://www.freecodecamp.org/news/content/images/2022/02/carbon-1.png" alt="Image" width="600" height="400" loading="lazy">
<em>Our simple yet handy ASCII Calculator</em></p>
<p>Fear not! I will explain all the modified parts now:</p>
<p><img src="https://www.freecodecamp.org/news/content/images/2022/02/Screenshot-2022-02-26-193306.png" alt="Image" width="600" height="400" loading="lazy"></p>
<p>In line 5, I have added a print statement to show the given string each time the user executes the code. I want the users to know that they simply need to input a character in the terminal after running the program.</p>
<p><img src="https://www.freecodecamp.org/news/content/images/2022/02/Screenshot-2022-02-26-193518.png" alt="Image" width="600" height="400" loading="lazy"></p>
<p>In line 7, I have modified the print function a little bit. I want the code to generate a nice line along with providing the ASCII value of the given character. The <code>%c</code> indicates that we would provide the character itself here, and the <code>%d</code> is indicating to print the integer value as earlier. </p>
<p>Now let me show you the result by providing random characters as input.</p>
<p><img src="https://www.freecodecamp.org/news/content/images/2022/02/Screenshot-2022-02-26-193703.png" alt="Image" width="600" height="400" loading="lazy">
<em>The ASCII value for <code>a</code></em></p>
<p>It looks beautiful, right? At least, prettier than the earlier code, as the users will get everything here – what they would need to do, what value the program is providing in the output, and so on, right?</p>
<p><img src="https://www.freecodecamp.org/news/content/images/2022/02/Screenshot-2022-02-26-193839.png" alt="Image" width="600" height="400" loading="lazy">
<em>The ASCII value for <code>^</code></em></p>
<p>I have also added this last code in <a target="_blank" href="https://gist.github.com/FahimFBA/e0c9c3697db9dd45301edb8cdde499db">my public gist</a>.</p>
<p>Our ASCII calculator is ready! We have learned a lot, even though we only used some simple code. </p>
<p>If you're wondering that we used the C programming language in this article, but can't we do this using other programming languages? The answer is YES! I was thinking about showing you the exact ASCII calculator using other languages, but that would make this article way bigger. So I am keeping that task and letting you do it for yourself. </p>
<p>You can also customize the code to fit your needs, add a nice GUI, and so on. Explore the wonderful world of programming :)</p>
<h2 id="heading-conclusion">Conclusion</h2>
<p>I hope this article helps you in understanding how basic C programs work.</p>
<p>Thanks for reading the entire article. If it helps you then you can also check out other articles of mine at <a target="_blank" href="https://www.freecodecamp.org/news/author/fahimbinamin/">freeCodeCamp</a>.</p>
<p>If you want to get in touch with me, then you can do so using <a target="_blank" href="https://twitter.com/Fahim_FBA">Twitter</a>, <a target="_blank" href="https://www.linkedin.com/in/fahimfba/">LinkedIn</a>, and <a target="_blank" href="https://github.com/FahimFBA">GitHub</a>. </p>
<p>You can also <a target="_blank" href="https://www.youtube.com/@FahimAmin?sub_confirmation=1">SUBSCRIBE to my YouTube channel</a> (Code With FahimFBA) if you want to learn various kinds of programming languages with a lot of practical examples regularly.</p>
<p>If you want to check out my highlights, then you can do so at my <a target="_blank" href="https://www.polywork.com/fahimbinamin">Polywork timeline</a>.</p>
<p>You can also <a target="_blank" href="https://fahimbinamin.com/">visit my website</a> to learn more about me and what I'm working on.</p>
<p>Thanks a bunch!</p>
 ]]>
                </content:encoded>
            </item>
        
            <item>
                <title>
                    <![CDATA[ ASCII Table – Hex to ASCII Value Character Code Chart ]]>
                </title>
                <description>
                    <![CDATA[ As a developer, you'll eventually need to look up hex or ASCII values and see what they translate to. You might also need to know what the decimal, binary, or HTML values are, too. If you search for these codes online, you'll often find tables that a... ]]>
                </description>
                <link>https://www.freecodecamp.org/news/ascii-table-hex-to-ascii-value-character-code-chart-2/</link>
                <guid isPermaLink="false">66ac87eb59c54e72c773090e</guid>
                
                    <category>
                        <![CDATA[ ascii ]]>
                    </category>
                
                    <category>
                        <![CDATA[ HTML ]]>
                    </category>
                
                <dc:creator>
                    <![CDATA[ Kristofer Koishigawa ]]>
                </dc:creator>
                <pubDate>Thu, 11 Mar 2021 17:26:37 +0000</pubDate>
                <media:content url="https://cdn-media-2.freecodecamp.org/w1280/60484fb6a7946308b7685892.jpg" medium="image" />
                <content:encoded>
                    <![CDATA[ <p>As a developer, you'll eventually need to look up hex or ASCII values and see what they translate to. You might also need to know what the decimal, binary, or HTML values are, too.</p>
<p>If you search for these codes online, you'll often find tables that are really just images. These are inaccessible to people with disabilities, and inconvenient to use – you can't search for something and copy-paste code you want.</p>
<p>To make your life easier, I created a table from the best sources I could find. Just scroll or use Ctrl/Cmd + f to find the value you're looking for.</p>
<p>Here's the traditional ASCII table:</p>
<div class="hn-table">
<table>
<thead>
<tr>
<td>Decimal</td><td>Hex</td><td>Binary</td><td>HTML Number</td><td>HTML Name</td><td>Character</td><td>Description</td></tr>
</thead>
<tbody>
<tr>
<td>0</td><td>00</td><td>00000000</td><td><code>&amp;#0;</code></td><td></td><td>NUL</td><td>Null</td></tr>
<tr>
<td>1</td><td>01</td><td>00000001</td><td><code>&amp;#1;</code></td><td></td><td>SOH</td><td>Start of Header</td></tr>
<tr>
<td>2</td><td>02</td><td>00000010</td><td><code>&amp;#2;</code></td><td></td><td>STX</td><td>Start of Text</td></tr>
<tr>
<td>3</td><td>03</td><td>00000011</td><td><code>&amp;#3;</code></td><td></td><td>ETX</td><td>End of Text</td></tr>
<tr>
<td>4</td><td>04</td><td>00000100</td><td><code>&amp;#4;</code></td><td></td><td>EOT</td><td>End of Transmission</td></tr>
<tr>
<td>5</td><td>05</td><td>00000101</td><td><code>&amp;#5;</code></td><td></td><td>ENQ</td><td>Enquiry</td></tr>
<tr>
<td>6</td><td>06</td><td>00000110</td><td><code>&amp;#6;</code></td><td></td><td>ACK</td><td>Acknowledge</td></tr>
<tr>
<td>7</td><td>07</td><td>00000111</td><td><code>&amp;#7;</code></td><td></td><td>BEL</td><td>Bell</td></tr>
<tr>
<td>8</td><td>08</td><td>00001000</td><td><code>&amp;#8;</code></td><td></td><td>BS</td><td>Backspace</td></tr>
<tr>
<td>9</td><td>09</td><td>00001001</td><td><code>&amp;#9;</code></td><td></td><td>HT</td><td>Horizontal Tab</td></tr>
<tr>
<td>10</td><td>0A</td><td>00001010</td><td><code>&amp;#10;</code></td><td></td><td>LF</td><td>Newline / Line Feed</td></tr>
<tr>
<td>11</td><td>0B</td><td>00001011</td><td><code>&amp;#11;</code></td><td></td><td>VT</td><td>Vertical Tab</td></tr>
<tr>
<td>12</td><td>0C</td><td>00001100</td><td><code>&amp;#12;</code></td><td></td><td>FF</td><td>Form Feed</td></tr>
<tr>
<td>13</td><td>0D</td><td>00001101</td><td><code>&amp;#13;</code></td><td></td><td>CR</td><td>Carriage Return</td></tr>
<tr>
<td>14</td><td>0E</td><td>00001110</td><td><code>&amp;#14;</code></td><td></td><td>SO</td><td>Shift Out</td></tr>
<tr>
<td>15</td><td>0F</td><td>00001111</td><td><code>&amp;#15;</code></td><td></td><td>SI</td><td>Shift In</td></tr>
<tr>
<td>16</td><td>10</td><td>00010000</td><td><code>&amp;#16;</code></td><td></td><td>DLE</td><td>Data Link Escape</td></tr>
<tr>
<td>17</td><td>11</td><td>00010001</td><td><code>&amp;#17;</code></td><td></td><td>DC1</td><td>Device Control 1</td></tr>
<tr>
<td>18</td><td>12</td><td>00010010</td><td><code>&amp;#18;</code></td><td></td><td>DC2</td><td>Device Control 2</td></tr>
<tr>
<td>19</td><td>13</td><td>00010011</td><td><code>&amp;#19;</code></td><td></td><td>DC3</td><td>Device Control 3</td></tr>
<tr>
<td>20</td><td>14</td><td>00010100</td><td><code>&amp;#20;</code></td><td></td><td>DC4</td><td>Device Control 4</td></tr>
<tr>
<td>21</td><td>15</td><td>00010101</td><td><code>&amp;#21;</code></td><td></td><td>NAK</td><td>Negative Acknowledge</td></tr>
<tr>
<td>22</td><td>16</td><td>00010110</td><td><code>&amp;#22;</code></td><td></td><td>SYN</td><td>Synchronize</td></tr>
<tr>
<td>23</td><td>17</td><td>00010111</td><td><code>&amp;#23;</code></td><td></td><td>ETB</td><td>End of Transmission Block</td></tr>
<tr>
<td>24</td><td>18</td><td>00011000</td><td><code>&amp;#24;</code></td><td></td><td>CAN</td><td>Cancel</td></tr>
<tr>
<td>25</td><td>19</td><td>00011001</td><td><code>&amp;#25;</code></td><td></td><td>EM</td><td>End of Medium</td></tr>
<tr>
<td>26</td><td>1A</td><td>00011010</td><td><code>&amp;#26;</code></td><td></td><td>SUB</td><td>Substitute</td></tr>
<tr>
<td>27</td><td>1B</td><td>00011011</td><td><code>&amp;#27;</code></td><td></td><td>ESC</td><td>Escape</td></tr>
<tr>
<td>28</td><td>1C</td><td>00011100</td><td><code>&amp;#28;</code></td><td></td><td>FS</td><td>File Separator</td></tr>
<tr>
<td>29</td><td>1D</td><td>00011101</td><td><code>&amp;#29;</code></td><td></td><td>GS</td><td>Group Separator</td></tr>
<tr>
<td>30</td><td>1E</td><td>00011110</td><td><code>&amp;#30;</code></td><td></td><td>RS</td><td>Record Separator</td></tr>
<tr>
<td>31</td><td>1F</td><td>00011111</td><td><code>&amp;#31;</code></td><td></td><td>US</td><td>Unit Separator</td></tr>
<tr>
<td>32</td><td>20</td><td>00100000</td><td><code>&amp;#32;</code></td><td></td><td>SP</td><td>Space</td></tr>
<tr>
<td>33</td><td>21</td><td>00100001</td><td><code>&amp;#33;</code></td><td></td><td>!</td><td>Exclamation mark</td></tr>
<tr>
<td>34</td><td>22</td><td>00100010</td><td><code>&amp;#34;</code></td><td><code>&amp;quot;</code></td><td>"</td><td>Double quote</td></tr>
<tr>
<td>35</td><td>23</td><td>00100011</td><td><code>&amp;#35;</code></td><td></td><td>#</td><td>Number</td></tr>
<tr>
<td>36</td><td>24</td><td>00100100</td><td><code>&amp;#36;</code></td><td></td><td>$</td><td>Dollar</td></tr>
<tr>
<td>37</td><td>25</td><td>00100101</td><td><code>&amp;#37;</code></td><td></td><td>%</td><td>Percent</td></tr>
<tr>
<td>38</td><td>26</td><td>00100110</td><td><code>&amp;#38;</code></td><td><code>&amp;amp;</code></td><td>&amp;</td><td>Ampersand</td></tr>
<tr>
<td>39</td><td>27</td><td>00100111</td><td><code>&amp;#39;</code></td><td></td><td>'</td><td>Single quote</td></tr>
<tr>
<td>40</td><td>28</td><td>00101000</td><td><code>&amp;#40;</code></td><td></td><td>(</td><td>Left parenthesis</td></tr>
<tr>
<td>41</td><td>29</td><td>00101001</td><td><code>&amp;#41;</code></td><td></td><td>)</td><td>Right parenthesis</td></tr>
<tr>
<td>42</td><td>2A</td><td>00101010</td><td><code>&amp;#42;</code></td><td></td><td>*</td><td>Asterisk</td></tr>
<tr>
<td>43</td><td>2B</td><td>00101011</td><td><code>&amp;#43;</code></td><td></td><td>+</td><td>Plus</td></tr>
<tr>
<td>44</td><td>2C</td><td>00101100</td><td><code>&amp;#44;</code></td><td></td><td>,</td><td>Comma</td></tr>
<tr>
<td>45</td><td>2D</td><td>00101101</td><td><code>&amp;#45;</code></td><td></td><td>-</td><td>Minus</td></tr>
<tr>
<td>46</td><td>2E</td><td>00101110</td><td><code>&amp;#46;</code></td><td></td><td>.</td><td>Period</td></tr>
<tr>
<td>47</td><td>2F</td><td>00101111</td><td><code>&amp;#47;</code></td><td></td><td>/</td><td>Slash</td></tr>
<tr>
<td>48</td><td>30</td><td>00110000</td><td><code>&amp;#48;</code></td><td></td><td>0</td><td>Zero</td></tr>
<tr>
<td>49</td><td>31</td><td>00110001</td><td><code>&amp;#49;</code></td><td></td><td>1</td><td>One</td></tr>
<tr>
<td>50</td><td>32</td><td>00110010</td><td><code>&amp;#50;</code></td><td></td><td>2</td><td>Two</td></tr>
<tr>
<td>51</td><td>33</td><td>00110011</td><td><code>&amp;#51;</code></td><td></td><td>3</td><td>Three</td></tr>
<tr>
<td>52</td><td>34</td><td>00110100</td><td><code>&amp;#52;</code></td><td></td><td>4</td><td>Four</td></tr>
<tr>
<td>53</td><td>35</td><td>00110101</td><td><code>&amp;#53;</code></td><td></td><td>5</td><td>Five</td></tr>
<tr>
<td>54</td><td>36</td><td>00110110</td><td><code>&amp;#54;</code></td><td></td><td>6</td><td>Six</td></tr>
<tr>
<td>55</td><td>37</td><td>00110111</td><td><code>&amp;#55;</code></td><td></td><td>7</td><td>Seven</td></tr>
<tr>
<td>56</td><td>38</td><td>00111000</td><td><code>&amp;#56;</code></td><td></td><td>8</td><td>Eight</td></tr>
<tr>
<td>57</td><td>39</td><td>00111001</td><td><code>&amp;#57;</code></td><td></td><td>9</td><td>Nine</td></tr>
<tr>
<td>58</td><td>3A</td><td>00111010</td><td><code>&amp;#58;</code></td><td></td><td>:</td><td>Colon</td></tr>
<tr>
<td>59</td><td>3B</td><td>00111011</td><td><code>&amp;#59;</code></td><td></td><td>;</td><td>Semicolon</td></tr>
<tr>
<td>60</td><td>3C</td><td>00111100</td><td><code>&amp;#60;</code></td><td><code>&amp;lt;</code></td><td>&lt;</td><td>Less than</td></tr>
<tr>
<td>61</td><td>3D</td><td>00111101</td><td><code>&amp;#61;</code></td><td></td><td>=</td><td>Equal sign</td></tr>
<tr>
<td>62</td><td>3E</td><td>00111110</td><td><code>&amp;#62;</code></td><td><code>&amp;gt;</code></td><td>&gt;</td><td>Greater than</td></tr>
<tr>
<td>63</td><td>3F</td><td>00111111</td><td><code>&amp;#63;</code></td><td></td><td>?</td><td>Question mark</td></tr>
<tr>
<td>64</td><td>40</td><td>01000000</td><td><code>&amp;#64;</code></td><td></td><td>@</td><td>At sign</td></tr>
<tr>
<td>65</td><td>41</td><td>01000001</td><td><code>&amp;#65;</code></td><td></td><td>A</td><td>Uppercase A</td></tr>
<tr>
<td>66</td><td>42</td><td>01000010</td><td><code>&amp;#66;</code></td><td></td><td>B</td><td>Uppercase B</td></tr>
<tr>
<td>67</td><td>43</td><td>01000011</td><td><code>&amp;#67;</code></td><td></td><td>C</td><td>Uppercase C</td></tr>
<tr>
<td>68</td><td>44</td><td>01000100</td><td><code>&amp;#68;</code></td><td></td><td>D</td><td>Uppercase D</td></tr>
<tr>
<td>69</td><td>45</td><td>01000101</td><td><code>&amp;#69;</code></td><td></td><td>E</td><td>Uppercase E</td></tr>
<tr>
<td>70</td><td>46</td><td>01000110</td><td><code>&amp;#70;</code></td><td></td><td>F</td><td>Uppercase F</td></tr>
<tr>
<td>71</td><td>47</td><td>01000111</td><td><code>&amp;#71;</code></td><td></td><td>G</td><td>Uppercase G</td></tr>
<tr>
<td>72</td><td>48</td><td>01001000</td><td><code>&amp;#72;</code></td><td></td><td>H</td><td>Uppercase H</td></tr>
<tr>
<td>73</td><td>49</td><td>01001001</td><td><code>&amp;#73;</code></td><td></td><td>I</td><td>Uppercase I</td></tr>
<tr>
<td>74</td><td>4A</td><td>01001010</td><td><code>&amp;#74;</code></td><td></td><td>J</td><td>Uppercase J</td></tr>
<tr>
<td>75</td><td>4B</td><td>01001011</td><td><code>&amp;#75;</code></td><td></td><td>K</td><td>Uppercase K</td></tr>
<tr>
<td>76</td><td>4C</td><td>01001100</td><td><code>&amp;#76;</code></td><td></td><td>L</td><td>Uppercase L</td></tr>
<tr>
<td>77</td><td>4D</td><td>01001101</td><td><code>&amp;#77;</code></td><td></td><td>M</td><td>Uppercase M</td></tr>
<tr>
<td>78</td><td>4E</td><td>01001110</td><td><code>&amp;#78;</code></td><td></td><td>N</td><td>Uppercase N</td></tr>
<tr>
<td>79</td><td>4F</td><td>01001111</td><td><code>&amp;#79;</code></td><td></td><td>O</td><td>Uppercase O</td></tr>
<tr>
<td>80</td><td>50</td><td>01010000</td><td><code>&amp;#80;</code></td><td></td><td>P</td><td>Uppercase P</td></tr>
<tr>
<td>81</td><td>51</td><td>01010001</td><td><code>&amp;#81;</code></td><td></td><td>Q</td><td>Uppercase Q</td></tr>
<tr>
<td>82</td><td>52</td><td>01010010</td><td><code>&amp;#82;</code></td><td></td><td>R</td><td>Uppercase R</td></tr>
<tr>
<td>83</td><td>53</td><td>01010011</td><td><code>&amp;#83;</code></td><td></td><td>S</td><td>Uppercase S</td></tr>
<tr>
<td>84</td><td>54</td><td>01010100</td><td><code>&amp;#84;</code></td><td></td><td>T</td><td>Uppercase T</td></tr>
<tr>
<td>85</td><td>55</td><td>01010101</td><td><code>&amp;#85;</code></td><td></td><td>U</td><td>Uppercase U</td></tr>
<tr>
<td>86</td><td>56</td><td>01010110</td><td><code>&amp;#86;</code></td><td></td><td>V</td><td>Uppercase V</td></tr>
<tr>
<td>87</td><td>57</td><td>01010111</td><td><code>&amp;#87;</code></td><td></td><td>W</td><td>Uppercase W</td></tr>
<tr>
<td>88</td><td>58</td><td>01011000</td><td><code>&amp;#88;</code></td><td></td><td>X</td><td>Uppercase X</td></tr>
<tr>
<td>89</td><td>59</td><td>01011001</td><td><code>&amp;#89;</code></td><td></td><td>Y</td><td>Uppercase Y</td></tr>
<tr>
<td>90</td><td>5A</td><td>01011010</td><td><code>&amp;#90;</code></td><td></td><td>Z</td><td>Uppercase Z</td></tr>
<tr>
<td>91</td><td>5B</td><td>01011011</td><td><code>&amp;#91;</code></td><td></td><td>[</td><td>Left square bracket</td></tr>
<tr>
<td>92</td><td>5C</td><td>01011100</td><td><code>&amp;#92;</code></td><td></td><td>\</td><td>backslash</td></tr>
<tr>
<td>93</td><td>5D</td><td>01011101</td><td><code>&amp;#93;</code></td><td></td><td>]</td><td>Right square bracket</td></tr>
<tr>
<td>94</td><td>5E</td><td>01011110</td><td><code>&amp;#94;</code></td><td></td><td>^</td><td>Caret / circumflex</td></tr>
<tr>
<td>95</td><td>5F</td><td>01011111</td><td><code>&amp;#95;</code></td><td></td><td>_</td><td>Underscore</td></tr>
<tr>
<td>96</td><td>60</td><td>01100000</td><td><code>&amp;#96;</code></td><td></td><td>`</td><td>Grave / accent</td></tr>
<tr>
<td>97</td><td>61</td><td>01100001</td><td><code>&amp;#97;</code></td><td></td><td>a</td><td>Lowercase a</td></tr>
<tr>
<td>98</td><td>62</td><td>01100010</td><td><code>&amp;#98;</code></td><td></td><td>b</td><td>Lowercase b</td></tr>
<tr>
<td>99</td><td>63</td><td>01100011</td><td><code>&amp;#99;</code></td><td></td><td>c</td><td>Lowercase c</td></tr>
<tr>
<td>100</td><td>64</td><td>01100100</td><td><code>&amp;#100;</code></td><td></td><td>d</td><td>Lowercase d</td></tr>
<tr>
<td>101</td><td>65</td><td>01100101</td><td><code>&amp;#101;</code></td><td></td><td>e</td><td>Lowercase e</td></tr>
<tr>
<td>102</td><td>66</td><td>01100110</td><td><code>&amp;#102;</code></td><td></td><td>f</td><td>Lowercase</td></tr>
<tr>
<td>103</td><td>67</td><td>01100111</td><td><code>&amp;#103;</code></td><td></td><td>g</td><td>Lowercase g</td></tr>
<tr>
<td>104</td><td>68</td><td>01101000</td><td><code>&amp;#104;</code></td><td></td><td>h</td><td>Lowercase h</td></tr>
<tr>
<td>105</td><td>69</td><td>01101001</td><td><code>&amp;#105;</code></td><td></td><td>i</td><td>Lowercase i</td></tr>
<tr>
<td>106</td><td>6A</td><td>01101010</td><td><code>&amp;#106;</code></td><td></td><td>j</td><td>Lowercase j</td></tr>
<tr>
<td>107</td><td>6B</td><td>01101011</td><td><code>&amp;#107;</code></td><td></td><td>k</td><td>Lowercase k</td></tr>
<tr>
<td>108</td><td>6C</td><td>01101100</td><td><code>&amp;#108;</code></td><td></td><td>l</td><td>Lowercase l</td></tr>
<tr>
<td>109</td><td>6D</td><td>01101101</td><td><code>&amp;#109;</code></td><td></td><td>m</td><td>Lowercase m</td></tr>
<tr>
<td>110</td><td>6E</td><td>01101110</td><td><code>&amp;#110;</code></td><td></td><td>n</td><td>Lowercase n</td></tr>
<tr>
<td>111</td><td>6F</td><td>01101111</td><td><code>&amp;#111;</code></td><td></td><td>o</td><td>Lowercase o</td></tr>
<tr>
<td>112</td><td>70</td><td>01110000</td><td><code>&amp;#112;</code></td><td></td><td>p</td><td>Lowercase p</td></tr>
<tr>
<td>113</td><td>71</td><td>01110001</td><td><code>&amp;#113;</code></td><td></td><td>q</td><td>Lowercase q</td></tr>
<tr>
<td>114</td><td>72</td><td>01110010</td><td><code>&amp;#114;</code></td><td></td><td>r</td><td>Lowercase r</td></tr>
<tr>
<td>115</td><td>73</td><td>01110011</td><td><code>&amp;#115;</code></td><td></td><td>s</td><td>Lowercase s</td></tr>
<tr>
<td>116</td><td>74</td><td>01110100</td><td><code>&amp;#116;</code></td><td></td><td>t</td><td>Lowercase t</td></tr>
<tr>
<td>117</td><td>75</td><td>01110101</td><td><code>&amp;#117;</code></td><td></td><td>u</td><td>Lowercase u</td></tr>
<tr>
<td>118</td><td>76</td><td>01110110</td><td><code>&amp;#118;</code></td><td></td><td>v</td><td>Lowercase v</td></tr>
<tr>
<td>119</td><td>77</td><td>01110111</td><td><code>&amp;#119;</code></td><td></td><td>w</td><td>Lowercase w</td></tr>
<tr>
<td>120</td><td>78</td><td>01111000</td><td><code>&amp;#120;</code></td><td></td><td>x</td><td>Lowercase x</td></tr>
<tr>
<td>121</td><td>79</td><td>01111001</td><td><code>&amp;#121;</code></td><td></td><td>y</td><td>Lowercase y</td></tr>
<tr>
<td>122</td><td>7A</td><td>01111010</td><td><code>&amp;#122;</code></td><td></td><td>z</td><td>Lowercase z</td></tr>
<tr>
<td>123</td><td>7B</td><td>01111011</td><td><code>&amp;#123;</code></td><td></td><td>{</td><td>Left curly bracket</td></tr>
<tr>
<td>124</td><td>7C</td><td>01111100</td><td><code>&amp;#124;</code></td><td></td><td>\</td><td></td><td>Vertical bar</td></tr>
<tr>
<td>125</td><td>7D</td><td>01111101</td><td><code>&amp;#125;</code></td><td></td><td>}</td><td>Right curly bracket</td></tr>
<tr>
<td>126</td><td>7E</td><td>01111110</td><td><code>&amp;#126;</code></td><td></td><td>~</td><td>Tilde</td></tr>
<tr>
<td>127</td><td>7F</td><td>01111111</td><td><code>&amp;#127;</code></td><td></td><td>DEL</td><td>Delete</td></tr>
</tbody>
</table>
</div><p>And here's the extended ASCII table for the web:</p>
<div class="hn-table">
<table>
<thead>
<tr>
<td>Decimal</td><td>Hex</td><td>Binary</td><td>HTML Number</td><td>HTML Name</td><td>Character</td><td>Description</td></tr>
</thead>
<tbody>
<tr>
<td>128</td><td>80</td><td>10000000</td><td><code>&amp;#128;</code></td><td><code>&amp;euro;</code></td><td>€</td><td>Euro sign</td></tr>
<tr>
<td>129</td><td>81</td><td>10000001</td><td></td><td></td><td></td><td></td></tr>
<tr>
<td>130</td><td>82</td><td>10000010</td><td><code>&amp;#130;</code></td><td><code>&amp;sbquo;</code></td><td>‚</td><td>Single low-9 quotation mark</td></tr>
<tr>
<td>131</td><td>83</td><td>10000011</td><td><code>&amp;#131;</code></td><td><code>&amp;fnof;</code></td><td>ƒ</td><td>Latin small letter f with hook</td></tr>
<tr>
<td>132</td><td>84</td><td>10000100</td><td><code>&amp;#132;</code></td><td><code>&amp;bdquo;</code></td><td>„</td><td>Double low-9 quotation mark</td></tr>
<tr>
<td>133</td><td>85</td><td>10000101</td><td><code>&amp;#133;</code></td><td><code>&amp;hellip;</code></td><td>…</td><td>Horizontal ellipsis</td></tr>
<tr>
<td>134</td><td>86</td><td>10000110</td><td><code>&amp;#134;</code></td><td><code>&amp;dagger;</code></td><td>†</td><td>Dagger</td></tr>
<tr>
<td>135</td><td>87</td><td>10000111</td><td><code>&amp;#135;</code></td><td><code>&amp;Dagger;</code></td><td>‡</td><td>Double dagger</td></tr>
<tr>
<td>136</td><td>88</td><td>10001000</td><td><code>&amp;#136;</code></td><td><code>&amp;circ;</code></td><td>ˆ</td><td>Modifier letter circumflex accent</td></tr>
<tr>
<td>137</td><td>89</td><td>10001001</td><td><code>&amp;#137;</code></td><td><code>&amp;permil;</code></td><td>‰</td><td>Per mille sign</td></tr>
<tr>
<td>138</td><td>8A</td><td>10001010</td><td><code>&amp;#138;</code></td><td><code>&amp;Scaron;</code></td><td>Š</td><td>Latin capital letter S with caron</td></tr>
<tr>
<td>139</td><td>8B</td><td>10001011</td><td><code>&amp;#139;</code></td><td><code>&amp;lsaquo;</code></td><td>‹</td><td>Single left-pointing angle quotation</td></tr>
<tr>
<td>140</td><td>8C</td><td>10001100</td><td><code>&amp;#140;</code></td><td><code>&amp;OElig;</code></td><td>Œ</td><td>Latin capital ligature OE</td></tr>
<tr>
<td>141</td><td>8D</td><td>10001101</td><td></td><td></td><td></td><td></td></tr>
<tr>
<td>142</td><td>8E</td><td>10001110</td><td><code>&amp;#142;</code></td><td></td><td>Ž</td><td>Latin capital letter Z with caron</td></tr>
<tr>
<td>143</td><td>8F</td><td>10001111</td><td></td><td></td><td></td><td></td></tr>
<tr>
<td>144</td><td>90</td><td>10010000</td><td></td><td></td><td></td><td></td></tr>
<tr>
<td>145</td><td>91</td><td>10010001</td><td><code>&amp;#145;</code></td><td><code>&amp;lsquo;</code></td><td>‘</td><td>Left single quotation mark</td></tr>
<tr>
<td>146</td><td>92</td><td>10010010</td><td><code>&amp;#146;</code></td><td><code>&amp;rsquo;</code></td><td>’</td><td>Right single quotation mark</td></tr>
<tr>
<td>147</td><td>93</td><td>10010011</td><td><code>&amp;#147;</code></td><td><code>&amp;ldquo;</code></td><td>“</td><td>Left double quotation mark</td></tr>
<tr>
<td>148</td><td>94</td><td>10010100</td><td><code>&amp;#148;</code></td><td><code>&amp;rdquo;</code></td><td>”</td><td>Right double quotation mark</td></tr>
<tr>
<td>149</td><td>95</td><td>10010101</td><td><code>&amp;#149;</code></td><td><code>&amp;bull;</code></td><td>•</td><td>Bullet</td></tr>
<tr>
<td>150</td><td>96</td><td>10010110</td><td><code>&amp;#150;</code></td><td><code>&amp;ndash;</code></td><td>–</td><td>En dash</td></tr>
<tr>
<td>151</td><td>97</td><td>10010111</td><td><code>&amp;#151;</code></td><td><code>&amp;mdash;</code></td><td>—</td><td>Em dash</td></tr>
<tr>
<td>152</td><td>98</td><td>10011000</td><td><code>&amp;#152;</code></td><td><code>&amp;tilde;</code></td><td>˜</td><td>Small tilde</td></tr>
<tr>
<td>153</td><td>99</td><td>10011001</td><td><code>&amp;#153;</code></td><td><code>&amp;trade;</code></td><td>™</td><td>Trademark sign</td></tr>
<tr>
<td>154</td><td>9A</td><td>10011010</td><td><code>&amp;#154;</code></td><td><code>&amp;scaron;</code></td><td>š</td><td>Latin small letter S with caron</td></tr>
<tr>
<td>155</td><td>9B</td><td>10011011</td><td><code>&amp;#155;</code></td><td><code>&amp;rsaquo;</code></td><td>›</td><td>Single right-pointing angle quotation mark</td></tr>
<tr>
<td>156</td><td>9C</td><td>10011100</td><td><code>&amp;#156;</code></td><td><code>&amp;oelig;</code></td><td>œ</td><td>Latin small ligature oe</td></tr>
<tr>
<td>157</td><td>9D</td><td>10011101</td><td></td><td></td><td></td><td></td></tr>
<tr>
<td>158</td><td>9E</td><td>10011110</td><td><code>&amp;#158;</code></td><td></td><td>ž</td><td>Latin small letter z with caron</td></tr>
<tr>
<td>159</td><td>9F</td><td>10011111</td><td><code>&amp;#159;</code></td><td><code>&amp;Yuml;</code></td><td>Ÿ</td><td>Latin capital letter Y with diaeresis</td></tr>
<tr>
<td>160</td><td>A0</td><td>10100000</td><td><code>&amp;#160;</code></td><td><code>&amp;nbsp;</code></td><td>NBSP</td><td>Non-breaking space</td></tr>
<tr>
<td>161</td><td>A1</td><td>10100001</td><td><code>&amp;#161;</code></td><td><code>&amp;iexcl;</code></td><td>¡</td><td>Inverted exclamation mark</td></tr>
<tr>
<td>162</td><td>A2</td><td>10100010</td><td><code>&amp;#162;</code></td><td><code>&amp;cent;</code></td><td>¢</td><td>Cent sign</td></tr>
<tr>
<td>163</td><td>A3</td><td>10100011</td><td><code>&amp;#163;</code></td><td><code>&amp;pound;</code></td><td>£</td><td>Pound sign</td></tr>
<tr>
<td>164</td><td>A4</td><td>10100100</td><td><code>&amp;#164;</code></td><td><code>&amp;curren;</code></td><td>¤</td><td>Currency sign</td></tr>
<tr>
<td>165</td><td>A5</td><td>10100101</td><td><code>&amp;#165;</code></td><td><code>&amp;yen;</code></td><td>¥</td><td>Yen sign</td></tr>
<tr>
<td>166</td><td>A6</td><td>10100110</td><td><code>&amp;#166;</code></td><td><code>&amp;brvbar;</code></td><td>¦</td><td>Pipe, broken vertical bar</td></tr>
<tr>
<td>167</td><td>A7</td><td>10100111</td><td><code>&amp;#167;</code></td><td><code>&amp;sect;</code></td><td>§</td><td>Section sign</td></tr>
<tr>
<td>168</td><td>A8</td><td>10101000</td><td><code>&amp;#168;</code></td><td><code>&amp;uml;</code></td><td>¨</td><td>Spacing diaeresis - umlaut</td></tr>
<tr>
<td>169</td><td>A9</td><td>10101001</td><td><code>&amp;#169;</code></td><td><code>&amp;copy;</code></td><td>©</td><td>Copyright sign</td></tr>
<tr>
<td>170</td><td>AA</td><td>10101010</td><td><code>&amp;#170;</code></td><td><code>&amp;ordf;</code></td><td>ª</td><td>Feminine ordinal indicator</td></tr>
<tr>
<td>171</td><td>AB</td><td>10101011</td><td><code>&amp;#171;</code></td><td><code>&amp;laquo;</code></td><td>«</td><td>Left double angle quotes</td></tr>
<tr>
<td>172</td><td>AC</td><td>10101100</td><td><code>&amp;#172;</code></td><td><code>&amp;not;</code></td><td>¬</td><td>Not sign</td></tr>
<tr>
<td>173</td><td>AD</td><td>10101101</td><td><code>&amp;#173;</code></td><td><code>&amp;shy;</code></td><td>­</td><td>Soft hyphen</td></tr>
<tr>
<td>174</td><td>AE</td><td>10101110</td><td><code>&amp;#174;</code></td><td><code>&amp;reg;</code></td><td>®</td><td>Registered trade mark sign</td></tr>
<tr>
<td>175</td><td>AF</td><td>10101111</td><td><code>&amp;#175;</code></td><td><code>&amp;macr;</code></td><td>¯</td><td>Spacing macron - overline</td></tr>
<tr>
<td>176</td><td>B0</td><td>10110000</td><td><code>&amp;#176;</code></td><td><code>&amp;deg;</code></td><td>°</td><td>Degree sign</td></tr>
<tr>
<td>177</td><td>B1</td><td>10110001</td><td><code>&amp;#177;</code></td><td><code>&amp;plusmn;</code></td><td>±</td><td>Plus-or-minus sign</td></tr>
<tr>
<td>178</td><td>B2</td><td>10110010</td><td><code>&amp;#178;</code></td><td><code>&amp;sup2;</code></td><td>²</td><td>Superscript two - squared</td></tr>
<tr>
<td>179</td><td>B3</td><td>10110011</td><td><code>&amp;#179;</code></td><td><code>&amp;sup3;</code></td><td>³</td><td>Superscript three - cubed</td></tr>
<tr>
<td>180</td><td>B4</td><td>10110100</td><td><code>&amp;#180;</code></td><td><code>&amp;acute;</code></td><td>´</td><td>Acute accent - spacing acute</td></tr>
<tr>
<td>181</td><td>B5</td><td>10110101</td><td><code>&amp;#181;</code></td><td><code>&amp;micro;</code></td><td>µ</td><td>Micro sign</td></tr>
<tr>
<td>182</td><td>B6</td><td>10110110</td><td><code>&amp;#182;</code></td><td><code>&amp;para;</code></td><td>¶</td><td>Pilcrow sign - paragraph sign</td></tr>
<tr>
<td>183</td><td>B7</td><td>10110111</td><td><code>&amp;#183;</code></td><td><code>&amp;middot;</code></td><td>·</td><td>Middle dot - Georgian comma</td></tr>
<tr>
<td>184</td><td>B8</td><td>10111000</td><td><code>&amp;#184;</code></td><td><code>&amp;cedil;</code></td><td>¸</td><td>Spacing cedilla</td></tr>
<tr>
<td>185</td><td>B9</td><td>10111001</td><td><code>&amp;#185;</code></td><td><code>&amp;sup1;</code></td><td>¹</td><td>Superscript one</td></tr>
<tr>
<td>186</td><td>BA</td><td>10111010</td><td><code>&amp;#186;</code></td><td><code>&amp;ordm;</code></td><td>º</td><td>Masculine ordinal indicator</td></tr>
<tr>
<td>187</td><td>BB</td><td>10111011</td><td><code>&amp;#187;</code></td><td><code>&amp;raquo;</code></td><td>»</td><td>Right double angle quotes</td></tr>
<tr>
<td>188</td><td>BC</td><td>10111100</td><td><code>&amp;#188;</code></td><td><code>&amp;frac14;</code></td><td>¼</td><td>Fraction one quarter</td></tr>
<tr>
<td>189</td><td>BD</td><td>10111101</td><td><code>&amp;#189;</code></td><td><code>&amp;frac12;</code></td><td>½</td><td>Fraction one half</td></tr>
<tr>
<td>190</td><td>BE</td><td>10111110</td><td><code>&amp;#190;</code></td><td><code>&amp;frac34;</code></td><td>¾</td><td>Fraction three quarters</td></tr>
<tr>
<td>191</td><td>BF</td><td>10111111</td><td><code>&amp;#191;</code></td><td><code>&amp;iquest;</code></td><td>¿</td><td>Inverted question mark</td></tr>
<tr>
<td>192</td><td>C0</td><td>11000000</td><td><code>&amp;#192;</code></td><td><code>&amp;Agrave;</code></td><td>À</td><td>Latin capital letter A with grave</td></tr>
<tr>
<td>193</td><td>C1</td><td>11000001</td><td><code>&amp;#193;</code></td><td><code>&amp;Aacute;</code></td><td>Á</td><td>Latin capital letter A with acute</td></tr>
<tr>
<td>194</td><td>C2</td><td>11000010</td><td><code>&amp;#194;</code></td><td><code>&amp;Acirc;</code></td><td>Â</td><td>Latin capital letter A with circumflex</td></tr>
<tr>
<td>195</td><td>C3</td><td>11000011</td><td><code>&amp;#195;</code></td><td><code>&amp;Atilde;</code></td><td>Ã</td><td>Latin capital letter A with tilde</td></tr>
<tr>
<td>196</td><td>C4</td><td>11000100</td><td><code>&amp;#196;</code></td><td><code>&amp;Auml;</code></td><td>Ä</td><td>Latin capital letter A with diaeresis</td></tr>
<tr>
<td>197</td><td>C5</td><td>11000101</td><td><code>&amp;#197;</code></td><td><code>&amp;Aring;</code></td><td>Å</td><td>Latin capital letter A with ring above</td></tr>
<tr>
<td>198</td><td>C6</td><td>11000110</td><td><code>&amp;#198;</code></td><td><code>&amp;AElig;</code></td><td>Æ</td><td>Latin capital letter AE</td></tr>
<tr>
<td>199</td><td>C7</td><td>11000111</td><td><code>&amp;#199;</code></td><td><code>&amp;Ccedil;</code></td><td>Ç</td><td>Latin capital letter C with cedilla</td></tr>
<tr>
<td>200</td><td>C8</td><td>11001000</td><td><code>&amp;#200;</code></td><td><code>&amp;Egrave;</code></td><td>È</td><td>Latin capital letter E with grave</td></tr>
<tr>
<td>201</td><td>C9</td><td>11001001</td><td><code>&amp;#201;</code></td><td><code>&amp;Eacute;</code></td><td>É</td><td>Latin capital letter E with acute</td></tr>
<tr>
<td>202</td><td>CA</td><td>11001010</td><td><code>&amp;#202;</code></td><td><code>&amp;Ecirc;</code></td><td>Ê</td><td>Latin capital letter E with circumflex</td></tr>
<tr>
<td>203</td><td>CB</td><td>11001011</td><td><code>&amp;#203;</code></td><td><code>&amp;Euml;</code></td><td>Ë</td><td>Latin capital letter E with diaeresis</td></tr>
<tr>
<td>204</td><td>CC</td><td>11001100</td><td><code>&amp;#204;</code></td><td><code>&amp;Igrave;</code></td><td>Ì</td><td>Latin capital letter I with grave</td></tr>
<tr>
<td>205</td><td>CD</td><td>11001101</td><td><code>&amp;#205;</code></td><td><code>&amp;Iacute;</code></td><td>Í</td><td>Latin capital letter I with acute</td></tr>
<tr>
<td>206</td><td>CE</td><td>11001110</td><td><code>&amp;#206;</code></td><td><code>&amp;Icirc;</code></td><td>Î</td><td>Latin capital letter I with circumflex</td></tr>
<tr>
<td>207</td><td>CF</td><td>11001111</td><td><code>&amp;#207;</code></td><td><code>&amp;Iuml;</code></td><td>Ï</td><td>Latin capital letter I with diaeresis</td></tr>
<tr>
<td>208</td><td>D0</td><td>11010000</td><td><code>&amp;#208;</code></td><td><code>&amp;ETH;</code></td><td>Ð</td><td>Latin capital letter ETH</td></tr>
<tr>
<td>209</td><td>D1</td><td>11010001</td><td><code>&amp;#209;</code></td><td><code>&amp;Ntilde;</code></td><td>Ñ</td><td>Latin capital letter N with tilde</td></tr>
<tr>
<td>210</td><td>D2</td><td>11010010</td><td><code>&amp;#210;</code></td><td><code>&amp;Ograve;</code></td><td>Ò</td><td>Latin capital letter O with grave</td></tr>
<tr>
<td>211</td><td>D3</td><td>11010011</td><td><code>&amp;#211;</code></td><td><code>&amp;Oacute;</code></td><td>Ó</td><td>Latin capital letter O with acute</td></tr>
<tr>
<td>212</td><td>D4</td><td>11010100</td><td><code>&amp;#212;</code></td><td><code>&amp;Ocirc;</code></td><td>Ô</td><td>Latin capital letter O with circumflex</td></tr>
<tr>
<td>213</td><td>D5</td><td>11010101</td><td><code>&amp;#213;</code></td><td><code>&amp;Otilde;</code></td><td>Õ</td><td>Latin capital letter O with tilde</td></tr>
<tr>
<td>214</td><td>D6</td><td>11010110</td><td><code>&amp;#214;</code></td><td><code>&amp;Ouml;</code></td><td>Ö</td><td>Latin capital letter O with diaeresis</td></tr>
<tr>
<td>215</td><td>D7</td><td>11010111</td><td><code>&amp;#215;</code></td><td><code>&amp;times;</code></td><td>×</td><td>Multiplication sign</td></tr>
<tr>
<td>216</td><td>D8</td><td>11011000</td><td><code>&amp;#216;</code></td><td><code>&amp;Oslash;</code></td><td>Ø</td><td>Latin capital letter O with slash</td></tr>
<tr>
<td>217</td><td>D9</td><td>11011001</td><td><code>&amp;#217;</code></td><td><code>&amp;Ugrave;</code></td><td>Ù</td><td>Latin capital letter U with grave</td></tr>
<tr>
<td>218</td><td>DA</td><td>11011010</td><td><code>&amp;#218;</code></td><td><code>&amp;Uacute;</code></td><td>Ú</td><td>Latin capital letter U with acute</td></tr>
<tr>
<td>219</td><td>DB</td><td>11011011</td><td><code>&amp;#219;</code></td><td><code>&amp;Ucirc;</code></td><td>Û</td><td>Latin capital letter U with circumflex</td></tr>
<tr>
<td>220</td><td>DC</td><td>11011100</td><td><code>&amp;#220;</code></td><td><code>&amp;Uuml;</code></td><td>Ü</td><td>Latin capital letter U with diaeresis</td></tr>
<tr>
<td>221</td><td>DD</td><td>11011101</td><td><code>&amp;#221;</code></td><td><code>&amp;Yacute;</code></td><td>Ý</td><td>Latin capital letter Y with acute</td></tr>
<tr>
<td>222</td><td>DE</td><td>11011110</td><td><code>&amp;#222;</code></td><td><code>&amp;THORN;</code></td><td>Þ</td><td>Latin capital letter THORN</td></tr>
<tr>
<td>223</td><td>DF</td><td>11011111</td><td><code>&amp;#223;</code></td><td><code>&amp;szlig;</code></td><td>ß</td><td>Latin small letter sharp s - ess-zed</td></tr>
<tr>
<td>224</td><td>E0</td><td>11100000</td><td><code>&amp;#224;</code></td><td><code>&amp;agrave;</code></td><td>à</td><td>Latin small letter a with grave</td></tr>
<tr>
<td>225</td><td>E1</td><td>11100001</td><td><code>&amp;#225;</code></td><td><code>&amp;aacute;</code></td><td>á</td><td>Latin small letter a with acute</td></tr>
<tr>
<td>226</td><td>E2</td><td>11100010</td><td><code>&amp;#226;</code></td><td><code>&amp;acirc;</code></td><td>â</td><td>Latin small letter a with circumflex</td></tr>
<tr>
<td>227</td><td>E3</td><td>11100011</td><td><code>&amp;#227;</code></td><td><code>&amp;atilde;</code></td><td>ã</td><td>Latin small letter a with tilde</td></tr>
<tr>
<td>228</td><td>E4</td><td>11100100</td><td><code>&amp;#228;</code></td><td><code>&amp;auml;</code></td><td>ä</td><td>Latin small letter a with diaeresis</td></tr>
<tr>
<td>229</td><td>E5</td><td>11100101</td><td><code>&amp;#229;</code></td><td><code>&amp;aring;</code></td><td>å</td><td>Latin small letter a with ring above</td></tr>
<tr>
<td>230</td><td>E6</td><td>11100110</td><td><code>&amp;#230;</code></td><td><code>&amp;aelig;</code></td><td>æ</td><td>Latin small letter ae</td></tr>
<tr>
<td>231</td><td>E7</td><td>11100111</td><td><code>&amp;#231;</code></td><td><code>&amp;ccedil;</code></td><td>ç</td><td>Latin small letter c with cedilla</td></tr>
<tr>
<td>232</td><td>E8</td><td>11101000</td><td><code>&amp;#232;</code></td><td><code>&amp;egrave;</code></td><td>è</td><td>Latin small letter e with grave</td></tr>
<tr>
<td>233</td><td>E9</td><td>11101001</td><td><code>&amp;#233;</code></td><td><code>&amp;eacute;</code></td><td>é</td><td>Latin small letter e with acute</td></tr>
<tr>
<td>234</td><td>EA</td><td>11101010</td><td><code>&amp;#234;</code></td><td><code>&amp;ecirc;</code></td><td>ê</td><td>Latin small letter e with circumflex</td></tr>
<tr>
<td>235</td><td>EB</td><td>11101011</td><td><code>&amp;#235;</code></td><td><code>&amp;euml;</code></td><td>ë</td><td>Latin small letter e with diaeresis</td></tr>
<tr>
<td>236</td><td>EC</td><td>11101100</td><td><code>&amp;#236;</code></td><td><code>&amp;igrave;</code></td><td>ì</td><td>Latin small letter i with grave</td></tr>
<tr>
<td>237</td><td>ED</td><td>11101101</td><td><code>&amp;#237;</code></td><td><code>&amp;iacute;</code></td><td>í</td><td>Latin small letter i with acute</td></tr>
<tr>
<td>238</td><td>EE</td><td>11101110</td><td><code>&amp;#238;</code></td><td><code>&amp;icirc;</code></td><td>î</td><td>Latin small letter i with circumflex</td></tr>
<tr>
<td>239</td><td>EF</td><td>11101111</td><td><code>&amp;#239;</code></td><td><code>&amp;iuml;</code></td><td>ï</td><td>Latin small letter i with diaeresis</td></tr>
<tr>
<td>240</td><td>F0</td><td>11110000</td><td><code>&amp;#240;</code></td><td><code>&amp;eth;</code></td><td>ð</td><td>Latin small letter eth</td></tr>
<tr>
<td>241</td><td>F1</td><td>11110001</td><td><code>&amp;#241;</code></td><td><code>&amp;ntilde;</code></td><td>ñ</td><td>Latin small letter n with tilde</td></tr>
<tr>
<td>242</td><td>F2</td><td>11110010</td><td><code>&amp;#242;</code></td><td><code>&amp;ograve;</code></td><td>ò</td><td>Latin small letter o with grave</td></tr>
<tr>
<td>243</td><td>F3</td><td>11110011</td><td><code>&amp;#243;</code></td><td><code>&amp;oacute;</code></td><td>ó</td><td>Latin small letter o with acute</td></tr>
<tr>
<td>244</td><td>F4</td><td>11110100</td><td><code>&amp;#244;</code></td><td><code>&amp;ocirc;</code></td><td>ô</td><td>Latin small letter o with circumflex</td></tr>
<tr>
<td>245</td><td>F5</td><td>11110101</td><td><code>&amp;#245;</code></td><td><code>&amp;otilde;</code></td><td>õ</td><td>Latin small letter o with tilde</td></tr>
<tr>
<td>246</td><td>F6</td><td>11110110</td><td><code>&amp;#246;</code></td><td><code>&amp;ouml;</code></td><td>ö</td><td>Latin small letter o with diaeresis</td></tr>
<tr>
<td>247</td><td>F7</td><td>11110111</td><td><code>&amp;#247;</code></td><td><code>&amp;divide;</code></td><td>÷</td><td>Division sign</td></tr>
<tr>
<td>248</td><td>F8</td><td>11111000</td><td><code>&amp;#248;</code></td><td><code>&amp;oslash;</code></td><td>ø</td><td>Latin small letter o with slash</td></tr>
<tr>
<td>249</td><td>F9</td><td>11111001</td><td><code>&amp;#249;</code></td><td><code>&amp;ugrave;</code></td><td>ù</td><td>Latin small letter u with grave</td></tr>
<tr>
<td>250</td><td>FA</td><td>11111010</td><td><code>&amp;#250;</code></td><td><code>&amp;uacute;</code></td><td>ú</td><td>Latin small letter u with acute</td></tr>
<tr>
<td>251</td><td>FB</td><td>11111011</td><td><code>&amp;#251;</code></td><td><code>&amp;ucirc;</code></td><td>û</td><td>Latin small letter u with circumflex</td></tr>
<tr>
<td>252</td><td>FC</td><td>11111100</td><td><code>&amp;#252;</code></td><td><code>&amp;uuml;</code></td><td>ü</td><td>Latin small letter u with diaeresis</td></tr>
<tr>
<td>253</td><td>FD</td><td>11111101</td><td><code>&amp;#253;</code></td><td><code>&amp;yacute;</code></td><td>ý</td><td>Latin small letter y with acute</td></tr>
<tr>
<td>254</td><td>FE</td><td>11111110</td><td><code>&amp;#254;</code></td><td><code>&amp;thorn;</code></td><td>þ</td><td>Latin small letter thorn</td></tr>
<tr>
<td>255</td><td>FF</td><td>11111111</td><td><code>&amp;#255;</code></td><td><code>&amp;yuml;</code></td><td>ÿ</td><td>Latin small letter y with diaeresis</td></tr>
</tbody>
</table>
</div><p>Sources for both tables: <a target="_blank" href="https://en.wikipedia.org/wiki/Wikipedia:ASCII">ASCII</a>, <a target="_blank" href="https://en.wikipedia.org/wiki/Windows-1252">Windows-1252</a>, and <a target="_blank" href="https://www.ascii-code.com/">ASCII Code - The extended ASCII table</a></p>
<p>Note that there are several other extended ASCII tables like ISO 8859, ISO 8859-1, ISO 8859-2, and so on. The extended table above is based on Windows-1252 ASCII table, and is what web browsers used before UTF-8 was created.</p>
<p>Even though we've largely moved past ASCII and its limitations to modern character encodings like UTF-8, all of the HTML values in the tables above will still work on current browsers.</p>
<p>If you'd like to learn more about character encoding, ASCII, and unicode characters, check out <a target="_blank" href="https://www.freecodecamp.org/news/everything-you-need-to-know-about-encoding/">this article</a>.</p>
<h2 id="heading-how-to-use-ascii-characters-in-html">How to Use ASCII Characters in HTML</h2>
<p>ASCII characters can be useful for web developers, like if you need to manually insert whitespace or a special character into your HTML.</p>
<p>If you look at the tables above, you'll see that every ASCII character has an HTML entity number, and some also have an HTML entity name.</p>
<p>Each HTML entity number and name starts with an ampersand (&amp;) and ends with a semicolon (;).</p>
<p>You can use these anywhere in your HTML to reliably render that character, no matter what the a person's browser language is set to.</p>
<p>In general, it's recommended to use the HTML entity name whenever possible – they're easier to remember, and are self-descriptive for any other developers that read your code.</p>
<p>For example, if you need to render the Euro currency sign (€), the HTML entity name <code>&amp;euro;</code> is much easier to remember than <code>&amp;#128;</code>.</p>
<p>Here are some of the more common ASCII characters you'll use in HTML, along with some examples.</p>
<h3 id="heading-how-to-use-the-non-breaking-space-character-code">How to Use the <code>&amp;nbsp;</code> Non-Breaking Space Character Code</h3>
<p>There are times when you'll want to add a space, but want to keep other words or characters together, even if there's a limited amount of horizontal space.</p>
<p>An easy way to do this would be to use a non-breaking space character, for example:</p>
<pre><code class="lang-html"><span class="hljs-tag">&lt;<span class="hljs-name">span</span>&gt;</span>Superpower:<span class="hljs-symbol">&amp;nbsp;</span>listening<span class="hljs-tag">&lt;/<span class="hljs-name">span</span>&gt;</span>
</code></pre>
<p>Which renders the following:</p>
<p><span>Superpower:&nbsp;listening</span></p>
<p>Sure, it looks like there's a normal space between the colon and the "l" in "listening", but the <code>&amp;nbsp;</code> character makes it so that the line will never break there.</p>
<p>For example, here's that code with an outline around the <code>span</code> element, and with a width of 150 pixels:</p>
<p><span>Superpower:&nbsp;listening</span></p>
<p>With a normal space character, the line would break like this:</p>
<p><span>Superpower: listening</span></p>
<p>You can even insert several non-breaking spaces in a row to create make-shift text padding:</p>
<pre><code class="lang-html"><span class="hljs-tag">&lt;<span class="hljs-name">span</span>&gt;</span>Superpower:<span class="hljs-symbol">&amp;nbsp;</span><span class="hljs-symbol">&amp;nbsp;</span><span class="hljs-symbol">&amp;nbsp;</span>listening<span class="hljs-tag">&lt;/<span class="hljs-name">span</span>&gt;</span>
</code></pre>
<h3 id="heading-how-to-make-a-newline-in-hmtl-using-the-newline-character-code">How to Make a Newline in HMTL using the <code>&amp;#13;</code> Newline Character Code</h3>
<p>While you can use JavaScript to render <code>\n</code> as a newline in HTML, that's not always an option. You might only have access to the HTML code, or just want to keep things simple.</p>
<p>In that case, you can use the newline / line feed character code to force a newline:</p>
<pre><code class="lang-html"><span class="hljs-tag">&lt;<span class="hljs-name">div</span> <span class="hljs-attr">style</span>=<span class="hljs-string">"margin-bottom: 1.5em;"</span>&gt;</span>
  <span class="hljs-tag">&lt;<span class="hljs-name">label</span> <span class="hljs-attr">for</span>=<span class="hljs-string">"example-1"</span>&gt;</span>Example 1: <span class="hljs-tag">&lt;/<span class="hljs-name">label</span>&gt;</span>
  <span class="hljs-tag">&lt;<span class="hljs-name">textarea</span> <span class="hljs-attr">name</span>=<span class="hljs-string">"example-1"</span> <span class="hljs-attr">id</span>=<span class="hljs-string">"example-1"</span>&gt;</span>Hello<span class="hljs-symbol">&amp;#10;</span>freeCodeCamp<span class="hljs-tag">&lt;/<span class="hljs-name">textarea</span>&gt;</span>
<span class="hljs-tag">&lt;/<span class="hljs-name">div</span>&gt;</span>
</code></pre>
<p>Which renders the following:</p>
<div>
  Example 1: 
  
</div>


<p>And yes, you can use these back-to-back, too:</p>
<pre><code class="lang-html"><span class="hljs-tag">&lt;<span class="hljs-name">div</span> <span class="hljs-attr">style</span>=<span class="hljs-string">"margin-bottom: 1.5em;"</span>&gt;</span>
  <span class="hljs-tag">&lt;<span class="hljs-name">label</span> <span class="hljs-attr">for</span>=<span class="hljs-string">"example-2"</span>&gt;</span>Example 2: <span class="hljs-tag">&lt;/<span class="hljs-name">label</span>&gt;</span>
  <span class="hljs-tag">&lt;<span class="hljs-name">textarea</span> <span class="hljs-attr">name</span>=<span class="hljs-string">"example-2"</span> <span class="hljs-attr">id</span>=<span class="hljs-string">"example-2"</span> <span class="hljs-attr">style</span>=<span class="hljs-string">"height: 150px;"</span>&gt;</span>Hello<span class="hljs-symbol">&amp;#10;</span><span class="hljs-symbol">&amp;#10;</span><span class="hljs-symbol">&amp;#10;</span>freeCodeCamp<span class="hljs-tag">&lt;/<span class="hljs-name">textarea</span>&gt;</span>
<span class="hljs-tag">&lt;/<span class="hljs-name">div</span>&gt;</span>
</code></pre>
<div>
  Example 2: 
  
</div>


<p>However, note that the <code>&amp;#10;</code> character doesn't override the default styling of the element it's used in. For example, the <code>p</code> element doesn't allow line breaks within the element – you'd have to create another paragraph element:</p>
<pre><code class="lang-html"><span class="hljs-tag">&lt;<span class="hljs-name">p</span> <span class="hljs-attr">style</span>=<span class="hljs-string">"outline: red 1px solid;"</span>&gt;</span>This is paragraph text and <span class="hljs-symbol">&amp;#010;</span> whoops there is a new line.<span class="hljs-tag">&lt;/<span class="hljs-name">p</span>&gt;</span>
</code></pre>
<p>The code above renders everything to a single line:</p>
<p>This is paragraph text and 
 whoops there is a new line.</p>


<p>To override this behavior, just set the <code>white-space</code> property to <code>pre-wrap</code>:</p>
<pre><code class="lang-html"><span class="hljs-tag">&lt;<span class="hljs-name">p</span> <span class="hljs-attr">style</span>=<span class="hljs-string">"outline: red 1px solid; white-space: pre-wrap;"</span>&gt;</span>This is paragraph text and <span class="hljs-symbol">&amp;#010;</span> whoops there is a new line.<span class="hljs-tag">&lt;/<span class="hljs-name">p</span>&gt;</span>
</code></pre>
<p>This is paragraph text and 
 whoops there is a new line.</p>


<h2 id="heading-thanks-for-reading">Thanks for Reading</h2>
<p>If you found this helpful, please share it with your friends so more people can get started using ASCII characters.</p>
<p>Also, if you liked this article, let me know over on <a target="_blank" href="https://twitter.com/kriskoishigawa">Twitter</a>.</p>
 ]]>
                </content:encoded>
            </item>
        
            <item>
                <title>
                    <![CDATA[ Unicode Characters – What Every Developer Should Know About Encoding ]]>
                </title>
                <description>
                    <![CDATA[ If you are coding an international app that uses multiple languages, you'll need to know about encoding. Or even if you're just curious how words end up on your screen – yep, that's encoding, too. I'll explain a brief history of encoding in this arti... ]]>
                </description>
                <link>https://www.freecodecamp.org/news/everything-you-need-to-know-about-encoding/</link>
                <guid isPermaLink="false">66bc55d2cd8a65d579e3aa06</guid>
                
                    <category>
                        <![CDATA[ ascii ]]>
                    </category>
                
                    <category>
                        <![CDATA[ binary ]]>
                    </category>
                
                    <category>
                        <![CDATA[ encoding ]]>
                    </category>
                
                    <category>
                        <![CDATA[ unicode ]]>
                    </category>
                
                <dc:creator>
                    <![CDATA[ Kealan Parr ]]>
                </dc:creator>
                <pubDate>Mon, 01 Mar 2021 16:01:00 +0000</pubDate>
                <media:content url="https://www.freecodecamp.org/news/content/images/2020/12/Title.png" medium="image" />
                <content:encoded>
                    <![CDATA[ <p>If you are coding an international app that uses multiple languages, you'll need to know about encoding. Or even if you're just curious how words end up on your screen – yep, that's encoding, too.</p>
<p>I'll explain a brief history of encoding in this article (and I'll discuss how little standardisation there was) and then I'll talk about what we use now. I'll also cover some <strong>Computer Science</strong> theory you need to understand.</p>
<h2 id="heading-introduction-to-encoding">Introduction to Encoding</h2>
<p>A computer only can understand binary. Binary is the language of computers, and is made up of <code>0</code>'s and <code>1</code>'s. There is nothing else allowed. One digit is called a <code>bit</code>, and a <code>byte</code> is 8 bits. So 8 <code>0</code>'s or <code>1</code>'s make up one <code>byte</code>.</p>
<p>Everything eventually ends up as binary – programming languages, mouse moves, typing, and all the words on the screen.</p>
<p>If all the text you're reading was once binary too, then how do we turn binary into text? Let's look at what we used to do back in the beginning.</p>
<h2 id="heading-a-brief-history-of-encoding">A Brief History of Encoding</h2>
<p>In the early days of the internet, it was English only. We didn't need to worry about any other characters and the <strong>American Standard Code for Information Interchange</strong> (<strong>ASCII</strong>) was the character encoding that fit this purpose. </p>
<p><strong>ASCII</strong> is a mapping, from binary to alphanumeric characters. So when the PC receives binary:</p>
<pre><code><span class="hljs-number">01001000</span> <span class="hljs-number">01100101</span> <span class="hljs-number">01101100</span> <span class="hljs-number">01101100</span> <span class="hljs-number">01101111</span> <span class="hljs-number">00100000</span> <span class="hljs-number">01110111</span> <span class="hljs-number">01101111</span> <span class="hljs-number">01110010</span> <span class="hljs-number">01101100</span> <span class="hljs-number">01100100</span>
</code></pre><p>With <strong>ASCII</strong> it can translate that into "Hello world".</p>
<p>One byte (eight bits) was large enough to fit every English character, and some control characters too. Some of these control characters were used for instruments called teleprinters, so at the time they were useful (not so much now!) </p>
<p>But the control characters were things like  7 (<code>111</code> in binary) that would make a bell sound on your PC, 8 (<code>1000</code> in binary) that would print over the last character it just printed, or 12 (<code>1100</code> in binary) that would clear a video terminal from all the text just written.</p>
<p>Computers at this time were using 8 bits for one byte (they didn't always), so there were no issues. We could store all our control characters, all our numbers, all the English characters and have some left! Because one byte can encode 255 characters, and ASCII only needed 127 characters. So we had 128 encodings that were unused.</p>
<p>Let's look at an ASCII table here to see every character. All lowercase and uppercase A-Z and 0-9 were encoded to binary numbers. Remember the first 32 are unprintable control characters.</p>
<h2 id="heading-ascii-character-table">ASCII Character Table</h2>
<p><img src="https://www.freecodecamp.org/news/content/images/2020/12/image-172.png" alt="Image" width="600" height="400" loading="lazy"></p>
<p>Can you see how it ends with 127? We have some spare room at the end.</p>
<h1 id="heading-issues-with-ascii">Issues with ASCII</h1>
<p>The spare characters were 127 through to 255. People began to think about what would be best to fill those remaining characters. <strong>But everyone had different ideas about what those final characters should be.</strong></p>
<p>The American National Standards Institute (<strong>ANSI</strong> - don't get confused with <strong>ASCII</strong>) is a standards body for establishing standards across lots of different fields. They decided what everyone was doing with 0-127, which is what <strong>ASCII</strong> was already doing. But the rest were open.</p>
<p>No one was debating what 0-127 in the <strong>ASCII</strong> encoding was. The problem was with the <strong>spare ones</strong>.</p>
<p>Below is what the first IBM computers did with the 128-255 encodings for ASCII.</p>
<p><img src="https://www.freecodecamp.org/news/content/images/2020/12/image-169.png" alt="Image" width="600" height="400" loading="lazy">
<em>Some squiggles, some background icons, math operators and some accented characters like é.</em></p>
<p>But other computers didn't all follow this. And everyone wanted to implement their own encodings for the end of <strong>ASCII</strong>.</p>
<p>These different endings for <strong>ASCII</strong> were called <strong>code pages</strong>.</p>
<h3 id="heading-what-are-ascii-code-pages">What are ASCII Code Pages?</h3>
<p><a target="_blank" href="https://www.aivosto.com/articles/charsets-codepages.html">Here's</a> a collection of over 465 different codepages! You can see that there were multiple codepages <strong>EVEN</strong> <strong>for the same language</strong>. Greek and Chinese both have multiple codepages, for example.</p>
<p>So how on EARTH were we ever going to standardise this? Or make it work between differing languages? Between the same language with different codepages? In a non English language? </p>
<p>Chinese has over 100,000 different characters. We don't even have enough spare characters for Chinese, let alone agreeing that the final characters should be Chinese ones. This isn't looking so good.</p>
<p>This problem even has its own term: <strong>Mojibake</strong>.</p>
<p>It's garbled text you may sometimes see from decoding text, but using the wrong decoding. It means <strong>character transformation</strong> in Japanese.</p>
<p><img src="https://www.freecodecamp.org/news/content/images/2020/12/image-171.png" alt="Image" width="600" height="400" loading="lazy">
<em>Example of completely garbled text (mojibake).</em></p>
<h2 id="heading-this-sounds-a-little-insane">This sounds a little insane...</h2>
<p>Exactly! We will have zero chance of reliably interchanging data.</p>
<p>The internet is just a huge connection of computers around the world. Imagine if all these countries decided what they each thought the standards should be. If the Greek computers only accepted Greek and the English computers only sent English...? You would just be shouting into an empty cave. No one would understand you. And no one would be able to decode the nonsense.</p>
<p>ASCII wasn't fit for real life use. In a global, connected internet, we had to evolve, or else forever deal with hundreds of codepages.</p>
<p>��� <strong>Unless you</strong> ������ <strong>fancied trying</strong> ��� <strong>to</strong> ��� <strong>read paragraphs like this.</strong> �֎֏0590֐��׀ׁׂ׃ׅׄ׆ׇ</p>
<h2 id="heading-along-came-unicode">Along Came Unicode</h2>
<p>Unicode is sometimes called the <a target="_blank" href="https://en.wikipedia.org/wiki/Universal_Coded_Character_Set">Universal Coded Character Set</a> (UCS), or even ISO/IEC 10646. But Unicode is its more common name.</p>
<p>But, this is where Unicode entered the scene to help solve the problems that <strong>encoding</strong> and <strong>code pages</strong> were causing.</p>
<p>Unicode is made up of lots of <strong>code points</strong> (mapping lots of characters from around the world to a key that all computers can reference.) A collection of <strong>code points</strong> is called a <strong>character set</strong> - which is what Unicode is.</p>
<p>We can map something abstract to a letter we want to reference. And it does every character! Even <a target="_blank" href="https://unicode.org/charts/PDF/U13000.pdf">Egyptian Hieroglyphs</a>.</p>
<p>Some people did all the hard work of mapping what each character would be (in all the languages) to a key that we could all access. They look like this:</p>
<p><strong>"Hello World"</strong> </p>
<h6 id="heading-u0048-latin-capital-letter-h">U+0048 : LATIN CAPITAL LETTER H</h6>
<p>U+0065 : LATIN SMALL LETTER E<br>U+006C : LATIN SMALL LETTER L<br>U+006C : LATIN SMALL LETTER L<br>U+006F : LATIN SMALL LETTER O<br>U+0020 : SPACE [SP]<br>U+0057 : LATIN CAPITAL LETTER W<br>U+006F : LATIN SMALL LETTER O<br>U+0072 : LATIN SMALL LETTER R<br>U+006C : LATIN SMALL LETTER L<br>U+0064 : LATIN SMALL LETTER D</p>
<p>The U+ lets us know it's the Unicode standard, and the number is what results when the binary get's transformed to numbers. It uses <a target="_blank" href="https://www.bbc.co.uk/bitesize/guides/zp73wmn/revision/1#:~:text=Hexadecimal%20(or%20hex)%20is%20a,values%20in%20binary%20and%20denary.">hexadecimal</a> notation which is just a simpler way of representing binary numbers. You don't have to worry too much about the hexadecimal here, though. </p>
<p><a target="_blank" href="https://www.babelstone.co.uk/Unicode/whatisit.html">Here's</a> a link where you can type whatever you want into the text box, and see the Unicode character encoding. Or look at all 143,859 Unicode character points <a target="_blank" href="https://unicode-table.com/en/">here</a>. You can also see where each character is from in the world!</p>
<p>I just want to be clear. At this point we have a big dictionary of <strong>code points</strong> mapping to characters. A really big <strong>character set</strong>. Nothing more. </p>
<p><strong>There's one final ingredient we need to add to our mix.</strong></p>
<h2 id="heading-unicode-transform-protocol-utf">Unicode Transform Protocol (UTF)</h2>
<p>UTF is a way we encode Unicode code points. The UTF encodings are defined by the Unicode standard, and are able to encode every single Unicode <strong>code point</strong> we need.</p>
<p>But there are different types of UTF standards. They differ depending on the amount of bytes used to encode one <strong>code point</strong>. It also depends on whether you're using <strong>UTF-8</strong> (one byte per code point), <strong>UTF-16</strong> (two bytes per code point) or <strong>UTF-32</strong> (four bytes per code point).</p>
<p>If we have these different encodings, how do we know which encoding a file will use? There's a thing called a <strong>Byte Order Mark</strong> (<strong>BOM</strong>) - sometimes referred to as an <strong>Encoding Signature</strong>. The <strong>BOM</strong> is a two-byte marker at the beginning of a file that tells what encoding the file is using.</p>
<p><strong>UTF-8</strong> is the most used on the internet, and is also specified in HTML5 as the preferred encoding for new documents, so I'll spend the most time explaining this one.</p>
<p><img src="https://www.freecodecamp.org/news/content/images/2020/12/image-163.png" alt="Image" width="600" height="400" loading="lazy">
<em>You can see in the <a target="_blank" href="https://en.wikipedia.org/wiki/UTF-8#/media/File:Utf8webgrowth.svg">diagram </a>even from 2012, UTF-8 was widely becoming the most used encoding. And for the web it still is.</em></p>
<p><img src="https://www.freecodecamp.org/news/content/images/2020/12/image-179.png" alt="Image" width="600" height="400" loading="lazy">
_W3 <a target="_blank" href="https://w3techs.com/technologies/cross/character_encoding/ranking">diagram </a>to show how well used UTF-8 is used on a variety of websites._</p>
<h2 id="heading-what-is-utf-8-and-how-does-it-work">What is UTF-8 and How Does it Work?</h2>
<p><strong>UTF-8</strong> encodes all the Unicode code points from 0-127 in 1 byte (the same as <strong>ASCII</strong>). This means that if you were coding your program using <strong>ASCII</strong>, and your users used <strong>UTF-8,</strong> they <em>wouldn't notice anything was wrong</em>. Everything would just work. </p>
<p>Just remember how strong a selling point this is. We needed to remain <strong>ASCII</strong> backwards compatible while <strong>UTF-8</strong> was being implemented and used by everyone. It doesn't break anything currently being used.</p>
<p>Because it's called <strong>UTF-8</strong>, remember that's the minimum number of bits (8 bits being one byte!) that a <strong>code point</strong> will be. There are other Unicode characters that are stored in multiple bytes (up to 6 bytes depending on the character). This is what people mean when the encoding is called <strong>variable length</strong>.</p>
<p>It might be more, depending on the language. English is 1 byte. <a target="_blank" href="https://design215.com/toolbox/ascii-utf8.php">European (Latin), Hebrew and Arabic</a> are represented with 2 bytes. 3 bytes are used for <a target="_blank" href="https://design215.com/toolbox/utf8-3byte-characters.php">Chinese, Japanese, Korean and other Asian characters</a><em>.</em> You get the idea. </p>
<p>When you need a character to span more than one byte, you have a bit combination to identify a continuation sign, saying this character is continued over the next several bytes. So you’ll still only use one byte per character for English, but if you need a document to contain some foreign characters, you can do that too.</p>
<p>And now, wonderfully, we can all agree on what the <a target="_blank" href="https://en.wikipedia.org/wiki/Cuneiform_(Unicode_block)">Sumerian cuneiform characters</a> encoding is (𒀵 𒁷𒂅 𒐤), as well as some <a target="_blank" href="https://unicode.org/emoji/charts/full-emoji-list.html">emoji's</a> 😉😉 so we can all communicate!</p>
<p>The high level overview is: You first read the <strong>BOM</strong> so you know your encoding. You decode the file into Unicode <strong>code points</strong>, and then represent the characters from the Unicode character set into characters drawn onto the screen.</p>
<h2 id="heading-a-final-word-about-utf">A Final Word About UTF</h2>
<p>Remember, encoding is <strong>key</strong>. If I send the complete wrong encoding you can't read anything. Be aware of it when receiving or sending data. Often it is abstracted away in the tools you use everyday, but as programmers it's important to understand what is happening under the hood. </p>
<p>How do we specify our encodings, then? Because HTML is written in English, and almost all encodings can deal with English fine. We can embed it right at the top in the <code>&lt;head&gt;</code> section.</p>
<pre><code class="lang-html"><span class="hljs-tag">&lt;<span class="hljs-name">html</span> <span class="hljs-attr">lang</span>=<span class="hljs-string">"en"</span>&gt;</span>
<span class="hljs-tag">&lt;<span class="hljs-name">head</span>&gt;</span>
  <span class="hljs-tag">&lt;<span class="hljs-name">meta</span> <span class="hljs-attr">charset</span>=<span class="hljs-string">"utf-8"</span>&gt;</span>
<span class="hljs-tag">&lt;/<span class="hljs-name">head</span>&gt;</span>
</code></pre>
<p>It's important to do this at the very start of the <code>&lt;head&gt;</code>, as the parsing of the <a target="_blank" href="https://html.spec.whatwg.org/multipage/parsing.html#determining-the-character-encoding">HTML may have to start again</a> if the encoding it's currently using is wrong.</p>
<p>We also can get the encoding from the <a target="_blank" href="https://developer.mozilla.org/en-US/docs/Web/HTTP/Headers/Content-Type">Content-Type</a> header from the HTTP request/ response.</p>
<p>If an HTML document doesn't contain the encoding tag, the <a target="_blank" href="https://html.spec.whatwg.org/multipage/parsing.html#determining-the-character-encoding">HTML5 spec</a> has some interesting ways it can guess the encoding called <a target="_blank" href="https://encoding.spec.whatwg.org/#bom-sniff"><strong>BOM sniffing</strong></a>. This is where it guesses the encoding from the <strong>Byte Order Mark</strong> (<strong>BOM</strong>) we discussed earlier. </p>
<h2 id="heading-so-is-that-it">So is that it?</h2>
<p>Unicode isn't finished. Like any standard, we add, remove and make new proposals to the standard. No specification is ever considered "complete".</p>
<p>There are generally 1 or 2 release a year, and you can find them <a target="_blank" href="https://unicode.org/history/publicationdates.html">here</a>.</p>
<p>Recently I read about a very interesting bug around <a target="_blank" href="https://twitter.com/availablegreen/status/1332774350613835779">Twitter rendering Russian Unicode characters incorrectly</a>. </p>
<p>If you have read this far, congratulations – it's a lot to digest.</p>
<p>I would encourage you to do one last piece of homework. </p>
<p>Look at how broken websites can really be when the encoding is wrong. I used <a target="_blank" href="https://chrome.google.com/webstore/detail/set-character-encoding/bpojelgakakmcfmjfilgdlmhefphglae?hl=en">this</a> Google Chrome extension and changed my encoding and tried to read webpages. The message was completely unclear. Try and read this article. Try and navigate Wikipedia. See <strong>Mojibake</strong> for yourself.</p>
<p>It helps to see how important encoding truly is.</p>
<p><img src="https://www.freecodecamp.org/news/content/images/2020/12/image-164.png" alt="Image" width="600" height="400" loading="lazy"></p>
<h2 id="heading-conclusion">Conclusion</h2>
<p>In my time spent researching and trying to simplify this article, I learned about <a target="_blank" href="https://en.wikipedia.org/wiki/Michael_Everson#">Michael Everson</a>. Since 1993, he has proposed over 200 Unicode changes, and has added thousands of characters to the standard. As of 2003, he was credited as the leading contributor of Unicode proposals. He is one huge reason why Unicode is what it is. Very impressive, and he has done a great deal for the Internet as we know it.</p>
<p>I hope this has explained a good overview of why we need encodings, what problems encoding solves, and what happens when it goes wrong.</p>
<p>I share my writing on <a target="_blank" href="https://twitter.com/kealanparr">Twitter</a> if you enjoyed this article and want to see more.</p>
 ]]>
                </content:encoded>
            </item>
        
    </channel>
</rss>
