Loading tool…
Convert non-ASCII text to \uXXXX escape sequences (the kind used in JSON and most programming languages), or decode escapes back to characters.
Loading tool…
Unicode is a free, private online tool that lets you convert text to \uXXXX Unicode escape sequences used in JSON and source code, or decode them back. It runs entirely in your browser, so nothing you enter is uploaded to a server.
Privacy: this tool runs entirely in your browser. Your input is never sent to, received by, or stored on any server — there are no uploads and no tracking of what you enter.
A Unicode escape represents a character by its code point in a source-safe form, e.g. \u00e9 for é. Many languages and JSON use this so files can stay pure ASCII while still carrying any character.
Encoding replaces every character outside the printable ASCII range with \uXXXX. Decoding converts \uXXXX (and \xXX) sequences back to their characters.
JSON strings, JavaScript/Java/Python source, config files, and log output that has been ASCII-escaped for safe transport.
\uXXXX escapes, which is exactly how JSON represents them.\uXXXX and two-digit \xXX escapes.A Unicode escape represents a character by its code point in a plain-ASCII, source-code-safe form. The most common style is \uXXXX — a backslash, the letter u, and four hexadecimal digits — so 'é' becomes \u00e9. This lets files that must remain pure ASCII still carry any character in the world, which is why JSON and most programming languages support it.
Not every system handles raw non-ASCII bytes reliably. Older toolchains, certain config formats, log pipelines and copy-paste paths can mangle multibyte characters. Encoding them as \uXXXX sidesteps the problem entirely: the escaped text is plain ASCII that survives anywhere, and the receiving program decodes it back to the real character. It is also handy for making invisible or look-alike characters visible.
Encoding scans your text and replaces every character outside the printable ASCII range (and control characters) with its \uXXXX escape, leaving normal ASCII untouched. Decoding finds \uXXXX sequences (and two-digit \xXX escapes) and converts them back to characters. This makes it easy to both prepare strings for source code and read escaped strings pulled from JSON or logs.
Characters above U+FFFF — including most emoji — do not fit in a single four-digit escape. They are represented as a surrogate pair: two \uXXXX escapes that together encode one character. This is exactly how JSON represents them, so the escaped output is valid for pasting into JSON strings and JavaScript source, and it round-trips back to the original emoji when decoded.
Typical uses include embedding non-Latin text or symbols in source code, debugging why a JSON string shows \u00e9 instead of 'é', sanitising data for ASCII-only systems, and revealing hidden or confusable characters. Like every tool here, it runs locally in your browser with nothing uploaded.