String to Charcode
Convert each character in a string to its numeric character code.
About String to Charcode
String to Charcode converts each character in a text string to its numeric Unicode code point, ASCII value, or UTF-16 code unit in decimal, hexadecimal, or octal format, and performs the reverse conversion from numeric codes back to characters. Understanding the numeric representation of characters is essential for diagnosing encoding issues, constructing escape sequences in source code, and working with character sets at the byte level. The tool correctly handles multi-byte Unicode characters including emoji, CJK ideographs, and supplementary plane code points, displaying both the JavaScript charCodeAt value and the full Unicode codePointAt value for characters above U+FFFF to avoid surrogate-pair confusion.
How to Use
Type or paste your text into the input field and the numeric code for each character appears instantly as a space-separated list. Choose the numeric base format from the selector: decimal for standard ASCII table lookups, hexadecimal in U+XXXX format for Unicode documentation, or octal for C and shell escape sequences. To convert codes back to characters, switch to decode mode, enter the space-separated numeric codes in the chosen base, and click Convert. The tool shows both the JavaScript charCodeAt and codePointAt values for any character to clarify surrogate pair encoding for supplementary plane characters.
Common Use Cases
- Diagnosing character encoding bugs in web applications by inspecting the exact code points of unexpected or garbled characters
- Finding Unicode code points for special symbols, mathematical operators, arrows, and emoji for use in HTML entities or escape sequences
- Generating C, Java, or JavaScript Unicode or ASCII escape sequences from characters that cannot be typed directly in source code
- Detecting hidden non-printable characters, zero-width joiners, or control codes invisibly embedded in pasted text or API responses
- Verifying correct character encoding of internationalized strings by comparing expected versus actual Unicode code point sequences