Character Code Converter
Input
characters: 4 · code points: 4 · UTF-8 bytes: 10
Emoji and rare CJK live above U+FFFF: they take two UTF-16 code units but one code point, which is why the two counts differ whenever the text contains them.
Encodings
| Char | Code point | Decimal | HTML entity | CSS escape | UTF-8 bytes | UTF-16 units | Binary | % |
|---|---|---|---|---|---|---|---|---|
| A | U+0041 | 65 | A | \0041 | 41 | 0041 | 01000001 | A |
| é | U+00E9 | 233 | é | \00E9 | c3 a9 | 00E9 | 11101001 | %C3%A9 |
| → | U+2192 | 8594 | → | \2192 | e2 86 92 | 2192 | 10000110010010 | %E2%86%92 |
| 😀 | U+1F600 | 128512 | 😀 | \1F600 | f0 9f 98 80 | D83D | 11111011000000000 | %F0%9F%98%80 |
HTML entity shown in hex form — decimal entities work everywhere too.
Copy-ready values
U+0041\0041 \u0041U+00E9\00E9 \u00E9U+2192\2192 \u2192U+1F600\1F600 \u{1F600}Design-tool tracking reminder: 4 character(s) at 16px can add 1.28px of width at 0.02em tracking.
You Might Also Need
The character code converter lists every encoding a character has, side by side: code point, decimal, HTML entity, CSS escape, JavaScript escape, UTF-8 bytes, UTF-16 units, percent-encoding and binary. It is the lookup table for anything that has to be written into code rather than typed.
What is Character Code Converter?
The character code converter takes a string and returns a table of encodings, one row per character, with the forms that different languages and file formats expect.
The columns are the useful part, and each exists because something in a codebase needs it.
- The code point in hexadecimal and in decimal, which is how a character is specified in documentation and in most APIs.
- The HTML entity in hexadecimal form, plus the CSS escape with its terminating space, which is the form that goes into a content declaration.
- The JavaScript escape, which differs for characters above the basic multilingual plane since they need the braces form.
- The UTF-8 byte sequence and the UTF-16 code units, which are the two byte-level counts that disagree about astral characters.
- The percent-encoded form and the binary value of the code point, which cover URL work and the occasional bit-level check.
The implementation detail worth knowing is that the table iterates by code point rather than by UTF-16 unit. Characters above the basic plane — emoji, rare CJK ideographs — are represented in JavaScript as a surrogate pair, and a naive loop over the string would report two broken halves instead of one correct value. Iterating by code point reports the real code point, and the readouts make the difference plain: the character count, the UTF-8 byte count and the UTF-16 unit count are three different numbers, and they diverge as soon as the text contains anything outside the basic plane.
Below the table, the first six characters get copy-ready rows carrying the CSS escape and the JavaScript escape with a copy button, which is the workflow the tool is built around: find the character, take its escape, paste it into a stylesheet. One subtlety is handled there rather than left to chance, which is that a CSS escape is terminated by a space, so the copy button trims it; when the next character in a declaration is a hexadecimal digit, that space has to be put back or the escape absorbs the following character.
Four limits are worth knowing before the table is treated as a specification.
- The conversion stops after the first two hundred characters, which is generous for a symbol lookup and short for a paragraph.
- The entity column shows the hexadecimal form only, since decimal entities work everywhere and the named forms are a separate catalogue.
- The binary column is the code point rather than the UTF-8 bytes, which is the common case for bit-level work but not the only reading of the word.
- The table lists encodings character by character, so it does not describe a whole string's size on the wire once a transport encoding is involved.
What it does provide is the one thing documentation rarely collects in a single view: every form a character can take, side by side, so the right one can be copied rather than derived. Paste a character, take the form the destination expects, and move on.
How to use Character Code Converter
- Paste the text or the single character into the input, then read the three counts to see whether anything sits outside the basic plane.
- Find the character's row and choose the column the destination needs: entity for markup, escape for stylesheets, bytes for storage or headers.
- Copy the escape from the ready-made row below the table rather than retyping it, and restore the terminating space if the next character is a hex digit.
- Check the character count against the byte count when sizing storage or a request, since the two differ as soon as non-ASCII characters appear.
When to use Character Code Converter vs related tools
Reach for it when a character has to be written into a stylesheet, a template or a JSON payload rather than typed, when a string's length behaves unexpectedly because it contains astral characters, or when a byte count is needed for a header or a storage calculation. The side-by-side columns save a round of documentation. For identifying an unknown character the Unicode character explorer gives the block context, the emoji Unicode mapper handles multi-code-point emoji sequences, and the special character picker covers the punctuation characters with their named entities.
Privacy & Security
This tool runs entirely in your browser — no data ever leaves your device. There is no server round-trip, no upload, no logging, and no account required. Your input is processed locally using client-side JavaScript and is never stored, transmitted, or accessible to anyone else. When you close the tab, everything disappears.