Text to Unicode Converter
Find the Unicode code point of any character, or turn text into escape codes you can paste into source code, web pages and style sheets. Emoji and characters outside the basic range are handled correctly, and plain ASCII can be kept as it is.
How to Convert Text to Unicode
Quick answer: type or paste your text, pick a format such as U+ or \u, and copy the codes.
-
1
Type your text
Or paste it, or open a file.
-
2
Pick a format
U+, code escapes, HTML or style sheet.
-
3
Keep ASCII if needed
Only special characters are escaped.
-
4
Copy or download
Paste the codes where you need them.
What You Get
What Is a Unicode Code Point?
Unicode gives every character in every writing system its own number, called a code point. It is usually written as U+ followed by at least four hex digits: A is U+0041, é is U+00E9, the euro sign is U+20AC and the grinning face emoji is U+1F600. Knowing a character's code point lets you look it up, type it, and write it safely in places that do not accept the character itself.
The Six Formats
U+00E9 is the standard name used in documentation and character tables. \u00E9 is the escape used in JavaScript, JSON, Java and C#; characters above U+FFFF, such as emoji, become a pair of escapes, which is how those languages store them. \u{E9} is the modern escape that writes any code point in one piece. é is the HTML form for web pages and XML. \E9 is the style sheet form used in the content property. \U000000E9 is the long form used in Python and C.
Keeping Plain Text
Tick Keep plain letters, digits and symbols to escape only the characters that might cause problems, such as accents, curly quotes, symbols and emoji, while normal text stays readable. This is the usual choice when preparing strings for source code or configuration files saved in older encodings.
Example
"Café ☕" in U+ format becomes U+0043 U+0061 U+0066 U+00E9 U+0020 U+2615. In \u format with Keep plain text ticked, it becomes Caf\u00E9 \u2615, ready to paste into a JSON string. To read escapes back, use Unicode to Text.
Who Uses Unicode Codes?
Developers writing strings that must survive any file encoding, web designers adding icons and symbols with style sheet content, writers and translators checking unusual characters, font designers testing glyphs, and anyone curious about which emoji or symbol they are looking at. Code points are also the key to searching character tables and fixing look-alike characters, such as a Greek Ο that looks like the letter O.
Step by Step
Paste the text or the single character you want to look up. Choose the format that matches where the code will go: U+ for documents, \u for most program code and JSON, &#x…; for web pages, the style sheet form for icon content, or the long form for Python. Copy the result, or download it as a .txt file to keep with your project.
Good to Know
Some characters that look like one symbol are actually several code points, such as flags, skin-tone emoji and letters with separate accent marks; each part is shown on its own. Spaces are code points too (U+0020), so they appear in the output unless you keep plain text. For the stored bytes of the same text, see Text to Hex.
Private, Free and Instant
The converter is free and handles text up to 5 MB. There is no sign-up, no limit and nothing to install. The conversion runs inside your browser, so your text and data are never uploaded, logged or stored. The result updates as you type or paste, and you can open a text file from your device and download the result as a new .txt file. It works on Windows, Mac, Linux, Chromebooks, iPhone and Android, in any modern browser.
Writing Text as Unicode Code Points
Unicode assigns every character a code point, such as U+0041 for A and U+1F600 for a smiling face. Converting text to code points or escapes is useful when you must put non-ASCII characters into source code or JSON.
Formats
- \uXXXX for characters up to U+FFFF.
- Surrogate pairs for emoji in JSON.
- U+XXXX for documentation.
To read escapes, use Unicode to text.
Unicode Escapes in Practice
Developers use escapes to keep source files in plain ASCII while still using accented letters, symbols and emoji. Pairs of surrogates are needed for characters above U+FFFF in JSON, so one emoji may be written as two escape sequences.
For web use, you can also write characters as HTML entities such as é. In CSS, the escape is a backslash followed by the hex code. Check that your file is saved as UTF-8 so characters display correctly.
Frequently Asked Questions
Questions about Unicode code points