Text to Unicode Converter — Code Points & Escapes

Convert text to Unicode code points — U+0041 style list and \u0041 escape sequences for JavaScript, Java and Python.

—

How it works

Every character maps to its Unicode code point (U+XXXX). Code points above U+FFFF (like most emoji) take two UTF-16 units — which is why '🙂'.length is 2 in JavaScript — and are written \u{1F642} in modern JS escape syntax.

Examples

InputOutput
AU+0041 · \u0041
éU+00E9 · \u00e9
🙂U+1F642 · \u{1F642} (2 UTF-16 units)

Frequently Asked Questions

What is the difference between a code point and an escape?

A code point (U+1F642) is the character's number in the Unicode standard — a fact. An escape (\u0041 or \u{1F642}) is how you write that number inside source code; the syntax depends on the language.

Why does an emoji count as two characters?

JavaScript strings are UTF-16, and code points above U+FFFF need a surrogate pair — two 16-bit units. Iterating with for...of (like this tool) gives true characters; s.length counts the units.

How do I use these escapes?

JavaScript/Java: \u0041 or \u{1F642}. Python: \u0041 or \U0001F642. HTML: A or 🙂. All represent the same code point.

Related Tools

JSON Formatter & ValidatorRandom Password Generator (Bulk)Unix Timestamp Converter (Epoch)CSV to JSON ConverterJSON to YAML ConverterMarkdown to HTML ConverterMD5 Hash GeneratorHTML Encoder / Decoder (Entities)Base64URL Encoder / DecoderBase64 to PDF ConverterHTML to Markdown Converter