Skip to main content

Emoji & Unicode Escape

Convert emoji and special characters to escape sequences for JavaScript, JSON, Python, Java, HTML, CSS and URLs, or turn escapes back into text. Private.

Text

Stays in your browser

Result

The result appears here.

Shortcuts: Ctrl+Enter run · Ctrl+Shift+C copy result · / search (use ⌘ on Mac)

Next steps

Done here? Use the Send to… menu on the result to carry it on to Unicode Character Inspector, Text to Binary / ASCII or JSON Escape.

Free Online Emoji & Unicode Escape

Write emoji and special characters in a form that is safe for code, data files and web pages, or turn escape codes back into readable text. Choose the style your language expects. It gives developers a quick browser-based way to solve a focused emoji & unicode escape task before moving the result into a project.

How to escape text

Choose Text to escapes, pick a style and paste your text. Letters and digits are kept as they are unless you turn off "Keep plain letters".

How to read escapes

Choose Escapes to text and paste the codes. Mixed styles are understood in one go.

Common mistakes

  • An emoji needs two \u codes in JavaScript and JSON: using only half of the pair gives a broken character.
  • CSS escapes end with a space (or need the next character to be a non-hex letter), or the following text is read as part of the code.

Frequently asked questions

Why does an emoji become two \u codes in JavaScript?
JavaScript and JSON store characters outside the basic range as a surrogate pair: two 16-bit codes. The "braces" format \u{1F600} writes the same emoji as a single code, which modern JavaScript supports.
Which format should I choose?
Use JavaScript or JSON for code and data files, Python for \U strings, HTML for web pages, CSS for the content property and URL for web addresses.
Can it read several escape styles at once?
Yes. In "Escapes to text" mode it understands \uXXXX, \u{…}, \UXXXXXXXX, &#x…; and &#…; and %XX in the same text.
Is my text uploaded?
No. The conversion runs in your browser.
How do I use this emoji & unicode escape tool?
Use the interactive controls above; processing stays in your browser and the result is intended as a practical starting point for development work.

More Code & Conversion

View all Code & Conversion tools →