---
slug: decimal-to-ascii-calculator
title: "Decimal to ASCII Converter"
category: developer
updated: 2026-11-17
canonical: https://calcseed.com/c/developer/decimal-to-ascii-calculator/
html: /c/developer/decimal-to-ascii-calculator/
---

# Decimal to ASCII Converter

Convert a decimal code point (0 to 255) to its ASCII character and hex value. Free and instant.

## Formula

```text
code point &rarr; character
```

## Inputs

| Variable | Type | Unit | Default |
| --- | --- | --- | --- |
| Code point | number |  | 65 |

## Outputs

| Result | Format |
| --- | --- |
| Character | primary |
| Character | text |
| Hex value | text |

## How it works

### What the converter returns

Enter a decimal value from 0 to 255 and the tool returns the character it names plus the same value in hex. The default **65** returns **A** and **41**. Values below 32 return control codes that have no visible glyph, and values from 128 to 255 return the Latin-1 character at that position rather than a plain ASCII letter. The number and the hex string always describe the same byte.

### From number to character, one lookup

A character set is a numbered list, and the code point is the row number. ASCII defines rows 0 through 127; Latin-1 extends the table to 255 by filling the upper half with accented letters and symbols. Converting decimal to a character is not arithmetic beyond the hex display, it is indexing into that list.

The hex output reveals the structure. The first 128 rows split into three readable bands: 32 is space, 48–57 are the digits, 65–90 are uppercase and 97–122 are lowercase. Writing the row number in hex, 65 becomes 41, which is the value an ASCII table prints in its hex column.

The hex is not zero-padded here, which catches people out. Decimal 65 gives two characters, 41, but decimal 9 gives a single character, 9, not 09. If you need a fixed two-digit byte value, pad it yourself: byte 9 is 09 and byte 32 is 20.

| Decimal | Hex | Character | Notes |
| --- | --- | --- | --- |
| 9 | 9 | tab | Control code, no visible glyph |
| 10 | A | line feed | Ends a line in Unix text files |
| 32 | 20 | space | First printable character |
| 48 | 30 | 0 | Start of the digit block |
| 65 | 41 | A | The default value |
| 90 | 5A | Z | End of the uppercase block |
| 97 | 61 | a | Lowercase block, 32 above A |
| 126 | 7E | ~ | Last printable ASCII character |
| 233 | E9 | &eacute; | Latin-1, outside plain ASCII |

The 233 row is where ASCII and Latin-1 part company. Values 128–255 are not part of the original 7-bit standard, and different systems disagree about what they mean: Windows-1252, ISO-8859-1 and Mac Roman all place different characters in the same slots. That disagreement is the root of most mojibake you see in old text files.

### Worked example at the default

The input is 65. In the ASCII table, 65 sits at the start of the uppercase block, so the character is A. For the hex value, divide by 16: 65 ÷ 16 = 4 remainder 1, giving digits 4 and 1, so the output is 41.

Check it the other way. Hex 41 is 4 × 16 + 1 = 65, and 65 is 32 places above 97, the code for a. Adding 32 flips bit 5 and switches case, which is why the gap between A and a is exactly one bit rather than an arbitrary number.

Now try 97. It returns a and 61, and 6 × 16 + 1 = 97. Try 10 and the output cell shows a line feed, which renders as a blank line rather than a glyph — the character exists but it moves the cursor instead of drawing ink.

### The three bands worth memorising

- Digits: 48 is 0 and 57 is 9, so any byte from 48 to 57 is a digit, never a letter
- Uppercase: 65 is A and 90 is Z, a block of exactly 26 values
- Lowercase: 97 is a and 122 is z, the same 26 values shifted by 32
- Punctuation sits in the gaps, for example 46 is a period and 64 is the at sign

Those three blocks cover most of what developers test for. A byte from 48 to 57 passes as a digit, one from 65 to 90 or 97 to 122 passes as a letter, and everything else is punctuation, whitespace or control. That is the check behind a hand-rolled isalnum function.

#### Case conversion without a table

Because the two letter blocks are 32 apart, adding 32 lowercases an uppercase letter and subtracting 32 uppercases a lowercase one. The operation works because 32 is a single bit, 00100000. It is also why the trick fails on accented letters: &eacute; is 233, and 233 + 32 = 265, which is outside the byte range entirely.

### Common mistakes

- Assuming 128–255 are ASCII: they are extended or Latin-1 code points, and the mapping varies by code page
- Reading the hex output as always two digits, when 9 returns a single 9 and needs padding to 09
- Confusing bit 5 with a constant offset: adding 32 changes case only inside the letter blocks
- Treating 0 as an empty string, when it is a null character that often truncates text in C
- Expecting a visible glyph for 0–31, which are control codes that move the cursor or ring a bell

#### Where this breaks in real files

A byte above 127 read with the wrong table shows the wrong glyph, which is the familiar sight of &Atilde;&copy; where an accented e should be. The bytes are intact; only the lookup table changed. UTF-8 makes this worse for legacy code, because a single character such as &eacute; becomes two bytes, C3 A9, and a 7-bit reader sees two separate characters instead of one.

### Clamping and rounding

Input is rounded to the nearest integer, then clamped to 0–255, so 64.6 becomes 65 and 300 becomes 255. Negative input becomes 0. The character is then produced from the clamped integer, so the hex output and the character always agree with each other even when the original input was out of range.

## FAQ

### What is a code point?

The numeric identifier assigned to a character in a character set. In ASCII the values run 0–127, extended to 255 in Latin-1, and 65 is the code point for A.

### What code point is the letter A?

65 in both ASCII and Unicode, which is 41 in hex. The whole uppercase block runs 65–90 for A through Z.

### Are ASCII and Unicode the same?

Only for the first 128 code points. Unicode keeps ASCII&rsquo;s values and extends the range to 1,114,111, so A is still 65 but &eacute; moves from 233 in Latin-1 to U+00E9 in Unicode.

### What is decimal 65 in ASCII?

Uppercase A, with a hex value of 41. That is the default of this calculator and the first letter of the uppercase block.

### Why does decimal 9 show a single hex digit?

The hex output is not padded, so 9 becomes 9 rather than 09. It is still one byte when stored; only the written form is shorter. Pad it yourself if you need a fixed width.

### What does decimal 32 return?

A space, with hex 20. It is the first printable character, so everything below 32 is a control code with no visible glyph.

### Why does 233 show &eacute; instead of a box?

Values 128–255 are outside ASCII and map to Latin-1, where 233 is &eacute;. A system using a different code page for that byte may show a different symbol.

### How many characters does ASCII define?

128, numbered 0 through 127. Of those, 95 are printable and 33 are control codes such as tab at 9 and line feed at 10.

### Can I enter a value above 255?

No. The input is clamped to 255, the top of the single-byte range, so 300 returns 255 and the character &yuml;.

## Method and sources

Methodology: Conversions and formats follow the relevant IETF RFCs and IEEE standards, including RFC 4648 for Base64 and RFC 791 for IPv4 addressing.

Last updated: 2026-11-17.
- ASCII character encoding, code points 0–255.
