Capital Letter Counter
Count uppercase letters and find where the shouting is.
Convert text into Unicode escape sequences for code.
The Unicode Encoder converts characters into escape sequences in the notation each language actually uses — \uXXXX, \u{XXXX}, \UXXXXXXXX, CSS backslash escapes or U+ documentation form — with the option to escape only what needs it so source stays readable.
Sometimes a character cannot go directly into a source file. The file encoding is uncertain, the build pipeline mangles it, a code review would not show what it is, or the character is invisible and needs to be explicit. Escape sequences solve all four.
This produces them in the notation each language actually uses: \uXXXX for JavaScript and Java, \u{XXXX} for the modern JavaScript form that handles characters above the Basic Multilingual Plane, \UXXXXXXXX for Python, \XXXX for CSS, and U+XXXX for documentation. Only the characters that need escaping can be converted, leaving ASCII readable, which is almost always what makes source code better rather than worse.
JavaScript, modern braced JavaScript, Java, Python and CSS, plus the U+ form for documentation.
English text stays legible while the characters that need protecting are escaped.
Characters above U+FFFF are written correctly as pairs in the four-digit notation.
Inserted automatically when the next character is a hex digit, which CSS requires.
Anything produced here is read straight back by the Unicode Decoder.
The string you need to put into source code.
JavaScript, Java, Python, CSS or U+ documentation form.
Everything, or only the characters outside ASCII so the readable text stays readable.
The output is valid for the language you selected.
The four-digit form only reaches U+FFFF, so a character above that needs a surrogate pair — two escapes. The braced form, added in ES2015, takes the full code point directly and is clearer for emoji.
Because in the four-digit JavaScript notation it has to be written as a UTF-16 surrogate pair. Switch to the braced form or Python notation to get a single escape for the whole code point.
No. Escaping ASCII makes source code unreadable for no benefit. Escaping only non-ASCII gives you a file that is safe under any encoding while the English text stays legible.
A backslash followed by up to six hex digits, used inside content strings. It needs a trailing space when the next character is a hex digit, which the tool inserts automatically.
What people who use the Unicode Encoder think of it. Reviews come from visitors and are posted as written.
No ratings yet
Yours would be the first.
0 reviews
Newest first
No reviews yet
Be the first to rate the Unicode Encoder. It takes half a minute and no account.
Write the first reviewCount uppercase letters and find where the shouting is.
Convert text to lowercase, including accented and non-Latin letters.
Count words, characters, sentences and reading time as you type.
A readability grade based on characters rather than syllables.
Decode ROT13 and crack any Caesar cipher rotation.
Draw random letters, with or without vowels and repeats.
Randomise a text at the level you choose: lines, words or letters.
Turn a list of character codes back into readable text.