How to Convert Characters to ASCII Codes

Learn how to convert characters to ASCII and Unicode values in decimal, hex, octal, and binary, plus how to read ASCII tables and encoding limits.

By Generatr Team

Every character you type maps to a number inside the computer. ASCII is the classic 7-bit map for English letters, digits, and control codes; modern systems extend that idea with Unicode so one shared code space covers world scripts and emoji. Converting a character to its code — or a code back to a character — is daily work when you debug encodings, parse protocols, or learn how text is stored.

This guide shows how decimal, hex, octal, and binary views of the same code relate, how to read an ASCII table, and where Unicode diverges from “plain ASCII.” Practice with the free ASCII value converter — bidirectional text ↔ codes, multi-base output, and reference ranges in the browser.

You will leave able to look up A as 65, explain why space is 32, and avoid treating every byte dump as if it were still 1970s ASCII-only text.

Free tool

Use the ASCII Value Converter now

Open the interactive ascii value converter in your browser — free, instant, no signup.

Open ASCII Value Converter

What Are ASCII Codes and Why Convert Them?

ASCII (American Standard Code for Information Interchange) assigns integers 0–127 to control characters and printable symbols used in early digital text. Uppercase A is 65, lowercase a is 97, digit 0 is 48, and newline historically appears as line feed 10 (with carriage return 13 in older Windows pairings).

  • Debugging — logs and packet captures show numbers; you need the glyph
  • Learning — CS courses ask “what is the ASCII of X?”
  • Protocols — some formats still speak 7-bit clean text
  • Validation — reject non-ASCII when a field must stay simple

Conversion is bidirectional: character → code for inspection, code → character for building strings or understanding escape sequences. Open the ASCII value converter and type a short word to see each character’s values side by side.

For pure base changes without character semantics (e.g. 255 as hex FF), use a number base converter guide and related base tools — same digits, different problem.

How Do Decimal, Hex, Octal, and Binary Codes Relate?

One code point is one integer. Bases are only notations for that integer:

  • Decimal — everyday form (65 for A)
  • Hexadecimal — compact for bytes; A is 0x41; two hex digits fit one byte
  • Octal — older Unix and C traditions; A is octal 101
  • Binary — bit pattern; 7-bit ASCII for A is 1000001 (often shown in 8 bits as 01000001)

When a hex dump shows 48 65 6c 6c 6f, each pair is one byte. Those values are decimal 72, 101, 108, 108, 111 — the ASCII for “Hello”. Learning to read hex is mostly grouping bits by four and memorizing common letters.

Practice translating the same code across bases in the converter, then cross-check arithmetic in a binary calculator when you care about bit operations on those values. Deeper binary place-value practice sits in the binary arithmetic guide.

Remember: bases do not change meaning. 0x41, 65, and 01000001 are the same abstract number selecting the same ASCII character.

How Do You Read an ASCII Table?

A full ASCII table lists codes 0–127 with names or glyphs. Split it into regions so you are not memorizing 128 isolated facts.

  • 0–31 — control codes (NUL, BEL, TAB, LF, CR, ESC, etc.); many are invisible in plain text editors
  • 32 — space, the first common printable
  • 33–47 / 58–64 / 91–96 / 123–126 — punctuation and symbols
  • 48–57 — digits 09 (digit character value is code − 48)
  • 65–90 — uppercase AZ
  • 97–122 — lowercase az (lowercase = uppercase + 32)
  • 127 — DEL

That +32 relationship between cases is why bit tricks and simple ciphers show up in textbooks. Digits and letters sit in contiguous runs so range checks ('0' <= c && c <= '9') work in C-like languages when the execution character set is ASCII-compatible — which UTF-8 is for these code points.

Use the converter’s reference table when you forget a control code. For signaling text over constrained channels in a human-audible form, a different mapping exists entirely — see the Morse code translator guide.

What Is Extended ASCII and Why Do Bytes Confuse People?

“Extended ASCII” loosely means 8-bit values 128–255 that vendors filled with extra symbols. There was never one universal extended table. DOS code pages, ISO-8859 variants, and Windows-1252 disagree on what byte 0xE9 means. That is why a file that looks fine on one machine shows mojibake on another.

  • 7-bit ASCII (0–127) — shared legacy core
  • Single-byte “extended” sets — many incompatible maps for 128–255
  • UTF-8 — variable-length Unicode; ASCII bytes stay one-byte and unchanged

When you convert “a character” today, ask whether you mean a Unicode code point or a byte in a specific encoding. The letter é is code point U+00E9; in UTF-8 it is the two-byte sequence C3 A9, not a single ASCII value.

If you must ship binary through text-only systems, people often Base64-encode the bytes — that is not character coding of letters, it is a transport alphabet. See how Base64 encoding works when the problem is “binary in email or JSON,” not “what number is Q?”

How Does Unicode Relate to ASCII?

Unicode assigns a code point to virtually every character in modern text. The first 128 Unicode code points are identical to ASCII. That compatibility is why UTF-8 is dominant: English text in UTF-8 is byte-for-byte ASCII, and multilingual text layers multi-byte sequences only where needed.

  • Code point — abstract number (e.g. U+1F600 for 😀)
  • Encoding — UTF-8 / UTF-16 / UTF-32 bytes that store that number
  • Grapheme cluster — what users think of as one “character” (emoji + modifiers can be several code points)

A good converter shows Unicode-aware values for non-ASCII input while still teaching the classic ASCII range. Do not assume string.length in every language counts user-perceived characters; some APIs count UTF-16 code units.

Hex notation also appears in colors (#RRGGBB), which is unrelated to letter codes even though both use hex digits — keep domains straight via the hex color conversion guide when your “hex” is a pixel, not a code point.

What Practical Tips Help When You Convert Text Daily?

Small habits prevent encoding bugs from becoming outages.

  1. Decide the encoding of every byte stream (UTF-8 unless you know otherwise).
  2. Prefer libraries that decode to Unicode strings before you inspect code points.
  3. When comparing to ASCII ranges, document that you mean code points 0–127.
  4. Watch for BOM markers and mixed line endings (LF vs CRLF) in files.
  5. Log both the glyph and the code when filing bugs about “weird characters.”
  6. Never “fix” mojibake by guessing code pages without a sample file.

Students: memorize the structure of the table (digits, upper, lower, +32 case shift) rather than all 128 rows. Engineers: unit-test boundary characters — NUL, space, DEL, non-ASCII, and emoji — in any parser that claims to accept “text.”

Drill lookups in the free ASCII value converter until decimal ↔ character is automatic for letters and digits, then practice hex until packet traces feel readable.

How Do You Use Generatr’s ASCII Value Converter?

Convert in either direction and read all base views at once.

  1. Open the free ASCII value converter.
  2. Enter text to see each character’s decimal, hex, octal, and binary codes.
  3. Or enter numeric codes to reverse the mapping to characters.
  4. Scan the ASCII reference table for controls and printable ranges you forget.
  5. Try extended or Unicode samples when you need more than basic English letters.
  6. Copy the representation your homework, ticket, or protocol doc expects.
  7. Cross-check multi-base values so a mistyped hex digit cannot hide.

Related tools: binary decimal hex converter for pure numbers, Morse code translator for symbolic text mapping, and Base64 encoder decoder for binary-safe text transport.

Step-by-Step Instructions

  1. 1Open the free ASCII value converter on Generatr.
  2. 2Type characters to convert them into numeric codes.
  3. 3Read decimal, hexadecimal, octal, and binary values for each character.
  4. 4Enter numeric codes when you need the reverse mapping to text.
  5. 5Use the ASCII reference table for control codes and printable ranges.
  6. 6Test non-ASCII or Unicode samples when your data is not plain English.
  7. 7Copy the base format required by your assignment, protocol, or debugger.
  8. 8Verify a second base (for example hex vs decimal) to catch typos.

Frequently Asked Questions

How do I convert a character to ASCII?+

Look up or compute its code point. In ASCII, uppercase A is 65, a is 97, and 0 is 48. An online ASCII converter shows decimal plus hex, octal, and binary for each character you type.

What is the difference between ASCII and Unicode?+

ASCII defines 128 values (0–127). Unicode covers a much larger set of characters worldwide. The first 128 Unicode code points match ASCII, which is why UTF-8 is backward compatible with plain ASCII text.

Why show hex, octal, and binary for the same character?+

They are the same integer in different bases. Hex is common in dumps and CSS-like contexts for bytes; binary shows bit patterns; octal appears in older Unix and C examples; decimal is easiest for mental math.

What is extended ASCII?+

A loose name for 8-bit characters above 127. Different systems used different maps, so byte 0xE9 may not mean the same symbol everywhere. Prefer Unicode (often UTF-8) for modern multilingual text.

Is space an ASCII character?+

Yes. Space is decimal 32 (hex 0x20). It is printable in the sense that it occupies horizontal room, but it has no inked glyph.

Is the ASCII value converter free?+

Yes. Convert characters and codes with multi-base output and table reference in your browser without an account.

Ready to try it yourself?

Use the free ASCII Value Converter — no download, no account.

Launch ASCII Value Converter