Skip to content
ToolHub

Unicode Escape Encoder

Escape characters as \uXXXX sequences or HTML numeric entities.

⇄
EncodePro
Encoder & Decoder Tools
✨ Result
—
—
📤 Output
History 0
📋
No conversions yet
Your history will appear here

About the Unicode Escape Encoder

The Unicode Escape Encoder converts characters to \uXXXX escape sequences, the form used in JavaScript, JSON and Java strings, and also shows HTML hexadecimal entities. It is useful when a file or system only accepts plain ASCII.

Each UTF-16 code unit is escaped separately, so characters outside the Basic Multilingual Plane, such as most emoji, become two escapes (a surrogate pair), for example 🌍 becomes \uD83C\uDF0D.

How to use the Unicode Escape Encoder

  1. Paste the text.
  2. Copy the \u escapes, or the HTML entity version.

Example

Chinese characters

“世界” becomes \u4E16\u754C.

Frequently asked questions

Are the HTML entities valid for emoji?

Not as generated: they encode each half of the surrogate pair separately. For emoji in HTML, use the character itself in a UTF-8 page, or a single code point entity such as 🌍.

Does JSON require escaping non-ASCII text?

No. JSON allows UTF-8 text directly; escaping is optional and mainly for ASCII-only systems.

How do I reverse it?

Use the Unicode Escape Decoder.

Use ↑ ↓ to move, Enter to open.