Unicode Escape Converter

Convert text to \uXXXX Unicode escapes, or decode them back.

Options

Examples

Questions

Why do plain letters stay as they are?

Escaping "A" as \u0041 is rarely useful, so only characters outside printable ASCII are escaped by default. Tick "Escape ASCII too" to escape everything.

Why does one emoji become two \u escapes?

JavaScript strings use UTF-16, where most emoji take two 16-bit units (a surrogate pair). Each unit gets its own escape, matching JSON.stringify and "\u…" string literals.

Is this the same as JSON string escaping?

For \uXXXX escapes, yes. Named escapes like \n and \t are handled by the String Escape tool instead.