Text to Decimal
Convert text into decimal character codes. Each character becomes its decimal code point, separated by spaces, updating live.
0 characters
0 characters
About Text to Decimal
This tool converts text into its corresponding sequence of decimal character codes. Every character you see on a digital screen is represented by a number, and this utility reveals that underlying numerical value. It processes an input string and outputs the unique integer, or code point[6], for each character based on the universal Unicode[14] standard. This process is fundamental for debugging data transmission, analyzing text for security vulnerabilities like homoglyph[9] attacks, creating numeric character references for web content, or simply for educational exploration into how computers handle text.
The modern standard for text representation is Unicode, a comprehensive system managed by the Unicode Consortium[19]. It assigns a unique number, the code point, to virtually every character, symbol, and emoji from modern and historic scripts. These code points are abstract integers, typically represented in documentation as U+ followed by hexadecimal digits, for example U+0041 for 'A'. This tool translates those code points into their base-10 (decimal) equivalent, so U+0041 becomes 65. Understanding this direct mapping is the first step to mastering digital text processing.
It is crucial to distinguish between a character's code point and its character encoding[4]. A code point is the abstract identity of a character (e.g., 128512 for 'π'). An encoding, such as UTF-8[17], UTF-16[15], or UTF-32[16], is the specific method used to represent that integer code point as a sequence of one or more bytes[3] in computer memory or during data transmission. UTF-8, defined in RFC 3629[21], is the dominant encoding on the web and uses a variable number of bytes, making it highly efficient. This tool displays the conceptual code point value, not the specific byte sequence of a particular encoding scheme.
The foundation of modern character encoding is ASCII[2] (American Standard Code for Information Interchange), a 7-bit code standardized by the ANSI[1] in the 1960s and documented in standards like FIPS PUB 1-2. It defines 128 characters, including English letters, numbers, and control codes. Unicode was designed as a superset of ASCII, meaning the first 128 Unicode code points (0 to 127) are identical to the ASCII character set, ensuring backward compatibility. Before Unicode's widespread adoption, numerous other encodings like the ISO/IEC 8859[10] family were used, leading to frequent interoperability problems that Unicode was created to solve.
The decimal values produced by this tool have direct practical applications. They are used to create numeric character references[5] in HTML, XML, and other markup languages, for example `☃` for a snowman (β). This is essential for displaying characters that may be difficult to type or could be misinterpreted by a parser. Developers and security analysts also use these values to inspect strings for non-printing characters, validate input, and ensure data integrity across different systems and platforms, preventing errors and potential security exploits.
How to Use
- Enter or paste the text you wish to convert into the primary input field.
- Select a separator (such as a space, comma, or newline) to place between the output decimal numbers.
- Click the 'Convert' button to initiate the character code lookup.
- The resulting sequence of decimal code points will be displayed in the output area.
- Use the 'Copy' button to transfer the decimal sequence to your clipboard for use in other applications.
Frequently Asked Questions
What is the difference between a character's decimal code and its UTF-8 representation?
The decimal code is the character's Unicode code point[6], an abstract integer value. UTF-8[17] is a variable-width encoding that represents this integer as a sequence of one to four 8-bit bytes[3]. For example, the character 'A' (code point 65) is a single byte in UTF-8, but the character 'π' (code point 128512) is represented by four bytes. This tool provides the code point value itself, not the byte-level encoding.
Are these decimal values the same as ASCII codes?
Yes, for the first 128 characters. The Unicode[14] standard maintains backward compatibility with ASCII[2]. Therefore, the Unicode code points from 0 to 127 are numerically identical to their corresponding ASCII codes.
What is the maximum possible decimal value for a Unicode character?
The Unicode standard defines code points in the range from 0 to 1,114,111 (or 10FFFF in hexadecimal[8]). This space is organized into 17 planes[11] of 65,536 code points each. Not all of these code points are currently assigned to characters.
How are emojis represented in decimal?
Emojis are Unicode characters with assigned code points. Most are located in the Supplementary Multilingual Plane[12] and have high decimal values. For instance, the 'Grinning Face' emoji (π) has the decimal code point 128512. Complex emojis can also be formed by a sequence of multiple code points, often joined by a Zero-Width Joiner[18] (decimal 8205).
What is a numeric character reference in HTML?
A numeric character reference[20] is a markup construct used in HTML to specify a character by its Unicode code point. It is formatted as `` followed by the decimal code point and a semicolon. For example, `€` renders as the Euro sign (β¬). This tool's output is ideal for generating these references.
How does the tool handle surrogate pairs?
This tool correctly interprets characters that would be encoded as surrogate pairs[13] in UTF-16[15]. Instead of showing the two surrogate values, it provides the single, correct code point for the character. For example, for the character 'π·' (U+10437), it outputs its true code point, 66615, not the surrogate pair values.
What happens with combining characters?
A combining character[7] is a distinct Unicode character that modifies the appearance of the preceding base character. The tool will output a separate decimal code for the base character and for each subsequent combining character. For example, 'a' followed by a combining ring above (aΜ) will result in two decimal codes: 97 and 778.
Sources (21)
- Wikipedia: American National Standards Institute
- Wikipedia: ASCII
- Wikipedia: Byte
- Wikipedia: Character encoding
- Wikipedia: Character entity reference
- Wikipedia: Code point
- Wikipedia: Combining character
- Wikipedia: Hexadecimal
- Wikipedia: Homoglyph
- Wikipedia: ISO/IEC 8859
- Wikipedia: Plane (Unicode)
- Wikipedia: Supplementary Multilingual Plane
- Wikipedia: Surrogate pair
- Wikipedia: Unicode
- Wikipedia: UTF-16
- Wikipedia: UTF-32
- Wikipedia: UTF-8
- Wikipedia: Zero-width joiner
- The Unicode Consortium
- WHATWG: HTML Living Standard - Numeric character reference
- IETF RFC 3629: UTF-8
About Matt George
I'm Matt George, a software engineer in the startup space. I run my own shop building software for early-stage founders, and I love making free tools and experiences that people actually use. Enjoy using Text to Decimal!