Search EverydayTab Tools

Type a tool name, tag, or category to quickly open any tool instantly.

EverydayTab
EverydayTab

Text to Unicode

Convert text to Unicode escape sequences

Original Text
Unicode Hex (\uXXXX)
\u0045\u0076\u0065\u0072\u0079\u0064\u0061\u0079\u0054\u0061\u0062\u0020\ud83d\ude80
HTML Decimal (&#D;)
EverydayTab ��
CSS Escape (\XXXX)
\0045\0076\0065\0072\0079\0064\0061\0079\0054\0061\0062\0020\d83d\de80
JS ES6 Escape (\u{X})
\u{45}\u{76}\u{65}\u{72}\u{79}\u{64}\u{61}\u{79}\u{54}\u{61}\u{62}\u{20}\u{1f680}

Encoding Reference

Unicode characters are often represented in code via escape sequences. \uXXXX is standard in most languages (C, Java, Python), &#...; is used for HTML rendering, and \u{...} is the modern ES6 JavaScript format that supports characters beyond the basic plane (like modern emojis).

About the Text to Unicode

Turn any text — including accented letters, non-Latin scripts, symbols and emoji — into escape sequences you can safely paste into source code, JSON, HTML, CSS or configuration files. Four output formats are generated at once, so you can grab exactly the notation your language expects. Conversion happens instantly in your browser.

The four output formats

  • Unicode hex (\uXXXX) — the classic 4-hex-digit escape used by Java, C#, JSON, Python and older JavaScript. Characters above U+FFFF (most emoji) are shown as surrogate pairs.
  • HTML decimal entity (&#NNNN;) — numeric character references that work in any HTML document regardless of its declared charset.
  • CSS escape (\XXXX) — the backslash-hex form used in CSS content properties, e.g. for icon fonts: content: "\f101".
  • JavaScript code point (\u{XXXXX}) — the ES6 syntax that expresses any code point directly, including emoji, without surrogate pairs.

Why escape text as Unicode?

Escaping guarantees that a character survives any file encoding, build step or transport. A source file saved as Latin-1 by mistake, a legacy database column, an email template, or a tool that strips non-ASCII bytes will all mangle a literal "é" or "→" — but \u00e9 and \u2192 are plain ASCII and cannot be corrupted. Escapes are also the safest way to embed zero-width or invisible characters (such as U+200B) in code so their presence is obvious to reviewers.

Unicode assigns every character a number called a code point, written U+ followed by hex. Code points up to U+FFFF fit in a single 16-bit unit and one \uXXXX escape; anything higher — most emoji, many CJK extension characters, mathematical alphanumerics — needs either a \u{...} escape or two \uXXXX surrogate escapes. This tool produces both forms so you can pick the one your runtime supports.

Common uses

  • Embedding symbols and emoji in JSON payloads and localisation files without encoding worries.
  • Writing CSS content strings for icon fonts and bullet characters.
  • Producing HTML entities for characters an editor or CMS refuses to save.
  • Debugging encoding issues by seeing exactly which code points a string contains.
  • Obfuscating or safely quoting strings in JavaScript and Python source.

How to use the Text to Unicode

  1. 1Type or paste text. Enter any text, including accented characters, symbols or emoji.
  2. 2Choose a format. Read the \uXXXX, &#NNNN;, CSS or \u{…} output — all are generated at once.
  3. 3Copy. Click the copy button next to the format you need and paste it into your code.

Frequently asked questions

Why does an emoji become two \uXXXX escapes?
Most emoji have code points above U+FFFF, which cannot fit in a single 16-bit escape. UTF-16 represents them as a surrogate pair, so \uXXXX notation needs two escapes. The ES6 \u{XXXXX} format shows the single true code point instead.
What is the difference between \u00e9 and é?
They encode the same character (é, U+00E9). \u00e9 is a hex escape for programming languages and JSON; é is a decimal numeric entity for HTML and XML.
How do I convert Unicode escapes back to text?
Paste the escaped string into the reverse direction of this tool, or into a JavaScript console as a quoted string — the runtime decodes the escapes. The HTML Entities tool also decodes &#...; references.
Does it work for Arabic, Hindi, Chinese and other scripts?
Yes. Every character has a Unicode code point, so text in any language is converted; combining marks and joined characters are output as their individual code points.
All Converters