Unicode Converter
Convert text to Unicode code points.
About this tool
Paste text and get every non-ASCII character replaced by a \uXXXX escape, the form used in JSON and JavaScript strings. ASCII letters, digits and punctuation stay as they are. Emoji and other characters above U+FFFF become \u{...}.
How to use
How it works
For each character the tool reads its Unicode code point. Characters from 0 to 127 are kept. Code points up to U+FFFF are written as \u plus four lowercase hex digits. Larger code points are written in the ES6 form \u{1f600}, which JSON does not accept: a JSON parser expects a surrogate pair instead.
Worked example
Accents, CJK and emoji
- Input
- Héllo 世界 😀
- Output
- H\u00e9llo \u4e16\u754c \u{1f600}
- Walkthrough
- é is U+00E9, 世 is U+4E16, 界 is U+754C and the emoji is U+1F600, which needs the braced form.
Limitations
- This tool only encodes. It does not decode \u sequences back to text.
- Characters above U+FFFF use \u{...}, valid in JavaScript but not in strict JSON or Java.
- ASCII is never escaped.
Questions
How do I convert text to Unicode escapes?
What is the escape for é?
Why does an emoji show as \u{1f600}?
Can it convert escapes back to text?
Features
- Four-digit lowercase hex
- Braced form for emoji
- ASCII untouched
Related resources
Guides and videos from around the web—opens on YouTube or the publisher’s site.
Learn JSON - Full Crash Course
freeCodeCamp.org
JSON is the payload format behind many developer tools here.
Watch on YouTubeHow base64 encoding works
Andrew Schmelyun
Mental model for Base64 encode/decode tools.
Watch on YouTube
- Introducing JSON
json.org
Canonical JSON grammar for formatters and validators.
- Base64
MDN
When Base64 is appropriate versus raw binary transfer.