simpliconvert logo simpliconvert Buy This Website

Text to Unicode Converter

Quick answer: a text-to-Unicode converter turns every character you type into its Unicode code point, written as a developer-ready escape: \u0041 for JavaScript, \0041 for CSS, A as an HTML entity, or U+0041 in documentation. Paste text into the tool below, pick one of five output formats, and copy the result — everything runs in your browser, so nothing is uploaded.

Encode text into Unicode escapes for JavaScript, CSS, HTML, or documentation — free, instant, private.

Unicode Encoder

How to Convert Text to Unicode

Converting takes about ten seconds. Paste or type text into the Source Text box and the result appears instantly — no button to press, conversion runs live as you type. Choose a Format Type: JavaScript (\uXXXX), CSS (\XXXX), HTML hex (&#xXXXX;), HTML decimal (&#XXXX;), or plain U+XXXX notation. Pick a Separator if you want one — None for a continuous string to paste into code, Space or Comma for scannable charts and debugging, New Line for spreadsheet-friendly output. Then hit Copy Result or Download to save the output as a text file.

What Unicode Is — and Why Developers Reach for It

Unicode is the universal catalog of written characters. Maintained by the Unicode Consortium, the current release (Unicode 17.0, September 2025) assigns a permanent number — a code point — to 159,801 characters across 172 scripts, from the Latin alphabet to CJK ideographs, symbols, and emoji. Code points run from U+0000 to U+10FFFF and never change: A is always U+0041, © is always U+00A9, and 😊 is always U+1F60A.

That permanence is why developers encode text as escapes. Source files pass through editors, build tools, databases, and APIs, and any hop can mangle a character if the file's encoding is misread — the classic mojibake problem where café arrives as café. An escape like \u00E9 is pure ASCII, so it survives every hop untouched and renders as é wherever it lands. When you cannot trust the pipeline, encoding the tricky characters is the safe move.

The Five Output Formats, Explained

Different languages expect different escape syntax. Here are the five formats this tool offers, and where each one fits.

JavaScript (\uXXXX)

The classic four-digit escape works inside JavaScript and JSON string literals: "\u00A9 2026" renders as "© 2026". JSON borrows this exact syntax, making it right for hand-writing or inspecting JSON payloads with non-ASCII text. For characters beyond the first 65,536 code points — most emoji — the tool emits the modern braced form instead: \u{1F60A}. Valid since ES2015, it spares you from hand-writing surrogate pairs. One caution: the braced form is not valid in Java string literals, even though Java shares the \uXXXX syntax for basic characters.

CSS (\XXXX)

Stylesheets use a backslash plus one to six hex digits, most often in the content property of ::before and ::after pseudo-elements. The tool outputs \2713 for a checkmark, ready to drop into content: "\2713";. One genuine CSS gotcha: if the character after your escape is itself a hex digit (0–9, A–F), CSS keeps consuming digits up to six, so terminate the escape with a space — content: "\2713 A"; renders "✓ A", while "\2713A" would be read as one five-digit escape. When in doubt, add the trailing space; CSS collapses it.

HTML entities: hex (&#xXXXX;) and decimal (&#XXXX;)

HTML entities let you embed any character directly in markup without worrying about the document's encoding. The hex form ✓ and the decimal form ✓ both render as ✓ in every browser. Reach for entities in raw HTML — email templates, CMS content, server-rendered pages — when you want a symbol like ©, →, or ★ to display correctly even if a charset declaration goes missing. They're also the safe way to include characters that have special meaning in HTML, since the entity form is never parsed as markup.

U+ notation (U+XXXX)

This is the standard way to talk about a character rather than use it in code: U+0041, U+00A9, U+1F60A. You'll see it in the Unicode charts, in bug reports ("the file contains U+FEFF, a byte-order mark"), and in documentation. Choose it for character tables and specs — anywhere the code point itself is the information.

Emojis and Characters Beyond the Basic Multilingual Plane

The first 65,536 code points — the Basic Multilingual Plane (BMP) — hold the world's major alphabets and common symbols, all fitting in four hex digits. Everything else lives in the sixteen supplementary planes: most emoji, historic scripts like Egyptian hieroglyphs, musical symbols, and tens of thousands of rare CJK ideographs. These "astral" characters need five or six hex digits, which is where naive converters break — they split the character into two meaningless halves called surrogates.

This tool doesn't do that. It iterates with full surrogate-pair awareness, so 😊 becomes a single U+1F60A in every format rather than a pair of broken \uD83D\uDE0A halves. One honest limitation applies to all code-point converters, though: some things that look like one character are really several code points glued together. A family emoji is person emoji joined by invisible zero-width joiners (U+200D); a flag is two regional-indicator letters. The tool encodes each code point separately — technically correct, since that's how the text is stored — but a ZWJ emoji won't come out as one tidy code.

Unicode, UTF-8, and UTF-16: Don't Mix Them Up

This confusion causes more encoding bugs than any other topic. Unicode is the catalog: character → number. UTF-8, UTF-16, and UTF-32 are encodings: number → bytes. UTF-8 is the web's workhorse — one byte for ASCII, up to four for everything else. UTF-16 is what JavaScript strings and Windows APIs use internally. The letter A is U+0041 in Unicode; it's the single byte 0x41 in UTF-8 and two bytes in UTF-16LE. This converter works at the catalog level — it gives you code points — so its output is identical no matter which UTF encoding your project uses. If you need the raw byte values instead, see our text-to-hex converter, which shows how characters are stored byte by byte.

Where Escaped Unicode Earns Its Keep

Internationalization. When an app ships in non-Latin scripts, developers often store UI strings as Unicode escapes in resource files. The strings survive version control, translation pipelines, and database transfers without a single corrupted character, then render natively at runtime.

Symbols outside the keyboard. Trademark signs, arrows, stars, checkmarks, currency symbols — the web is full of glyphs nobody can type. Encoding them as escapes or entities is faster than hunting through a character map, and the result stays searchable in code.

Debugging invisible characters. Zero-width spaces, byte-order marks, and lookalike characters from other scripts cause notorious "but it looks identical" bugs. Converting a suspicious string reveals exactly which code points are present — U+200B where you expected nothing is a eureka moment.

Configuration and data files. JSON, YAML, .properties files, and URL-adjacent contexts often restrict you to ASCII. Escapes let you include any character legally, which is why APIs and i18n frameworks lean on them.

Three Gotchas Worth Knowing

1. Composed vs. decomposed accented letters. The letter é can be a single precomposed code point (U+00E9) or the letter e plus a combining acute accent (U+0301). The converter encodes code points, not visual letters, so decomposed text yields two codes for what looks like one character. Both forms are valid Unicode; normalize your text first if the distinction matters.

2. The CSS trailing-space rule. A CSS escape greedily consumes up to six hex digits. If the next character in your content string is a hex digit, terminate the escape with a space or you'll silently reference the wrong character.

3. Not every platform renders every character. Unicode defines the code points; fonts and apps decide what you see. Brand-new emoji show as tofu boxes (▯) on devices that haven't updated yet, and some social platforms strip exotic formatting characters — certain combining marks and invisible characters vanish from Instagram bios and X posts even though they're valid Unicode. When a character matters, test it where your audience will see it.

Pair this tool with our Unicode to Text decoder to move in both directions, explore text to hex for the raw byte values behind each character, or try the Fancy Text Generator for stylized Unicode on social profiles.

Frequently Asked Questions

It reads each character you paste in, looks up that character's Unicode code point, which is the permanent number the Unicode Standard assigns it, and rewrites it in a format a programming language can use. The letter A is code point 65, so this tool can render it as \u0041 for JavaScript, A as an HTML entity, \0041 for CSS, or U+0041 in documentation notation. You pick the format, and the tool performs the lookup for every character, including symbols and emoji.

Match the format to where the text will live. Use the JavaScript \uXXXX form inside JS or JSON string literals. Use the CSS \XXXX form in stylesheet content properties, for example content: "\2713" to show a checkmark in a pseudo-element. Use the HTML hex or decimal entities when you need a symbol inside HTML markup without worrying about the file's character encoding. Use U+XXXX notation in documentation, bug reports, and character charts, where the code point itself is what readers expect rather than an escape sequence.

The classic \uXXXX form holds exactly four hex digits, which covers the first 65,536 code points. Characters beyond that range, including most emoji and many historic scripts, need five or six digits. Modern JavaScript (ES2015 and later) supports the braced form \u{...} for those characters, so this tool emits \u{1F60A} instead of forcing you to hand-write a surrogate pair. Note that the braced form is not valid everywhere: Java string literals, for example, still require surrogate pairs for characters outside the Basic Multilingual Plane.

Yes. The tool reads your text with full awareness of surrogate pairs, so an emoji like the grinning face is treated as one code point, U+1F60A, rather than two meaningless halves. All 159,801 characters in Unicode 17.0 are supported, from CJK ideographs to musical symbols and ancient scripts. One caveat: a ZWJ sequence such as a family emoji is really several code points joined by invisible joiner characters, so the tool encodes each code point separately rather than as a single unit.

Unicode is the catalog: it assigns every character a unique number called a code point, so the letter A is U+0041. UTF-8 is one way of storing those numbers as bytes, a variable-length encoding that uses one byte for plain ASCII text and up to four bytes for other characters. UTF-16 and UTF-32 are alternative encodings of the same catalog. This tool works at the code-point level, so its output is identical regardless of which UTF encoding your files happen to use.

It controls what goes between each converted character. None joins everything into one continuous string, which is what you usually want to paste into code. Space or Comma places a visible delimiter between codes, which is handy for character charts and debugging. New Line puts each character's code on its own row, making long conversions easy to scan or import into a spreadsheet.

No. The entire conversion runs in JavaScript inside your own browser, so your text never leaves your device. There is no account, no upload, and nothing is stored after you close the tab. That makes the tool safe for proprietary strings, API keys, and any other text you would rather not paste into a stranger's web form.

Some accented letters can be stored two ways: as one precomposed code point, where e with an acute accent is U+00E9, or as a base letter plus a combining mark, which is the letter e followed by U+0301. This converter works at the code-point level, so text in the decomposed form produces two codes where you might have expected one. For programming uses like escaping strings or embedding symbols, that is exactly correct, because each code point genuinely occupies its own slot in the encoded output.

Yes. SimpliConvert's companion tool, Unicode to Text, reverses the process: paste in escapes such as \u0048\u0065\u006C\u006C\u006F and get readable text back. The two tools are useful together when you receive escaped strings from an API response or a database dump and want to see what they actually say.

ASCII is a subset of Unicode, so every ASCII character maps directly to a Unicode code point — for example, A is U+0041. Paste your text above and the tool shows each code instantly. To tidy the text first, use our text cleaner, or turn it into emoji-style characters with the emoji text generator.

Popular Content Tools