Skip to content

ASCII Converter

Convert text to ASCII codes and ASCII codes to text.

Format:
Separator:

Code Examples

// Text to ASCII array
const text = "Hello";
const codes = [...text].map(c => c.charCodeAt(0));
// [72, 101, 108, 108, 111]

// ASCII array to text
String.fromCharCode(...codes);  // "Hello"

Frequently Asked Questions

How do I convert text to ASCII?

Each character has an ASCII code. 'A' = 65, 'a' = 97, '0' = 48, space = 32. Use the converter to see codes for any text.

What is the difference between ASCII and UTF-8?

ASCII defines 128 characters using 7 bits. UTF-8 is a Unicode encoding that is backward compatible with ASCII: the first 128 code points encode to identical single bytes, while other characters use 2-4 bytes.

Why is 'A' 65 and 'a' 97?

The ASCII designers placed uppercase and lowercase letters exactly 32 apart, so a single bit (0x20) switches case. That is why bitwise tricks like c | 0x20 lowercase a letter.

Related Tools

This tool runs entirely in your browser - nothing you enter is uploaded or stored.