Skip to content

Text to Unicode Converter

Convert any text, emoji, Urdu, Arabic or Hindi into Unicode code points, \u escapes, HTML entities and UTF-8 bytes. Decode Unicode back to text too. Instant, free and private.

  • 100% free
  • No Signup
  • Runs in your browser

Your text

Try an example
0Characters (code points)
0UTF-16 code units
0UTF-8 bytes
0Non-ASCII characters
ADVERTISEMENT
Demo Ad 728 x 90

How to convert text to Unicode

  1. 1

    Type or paste

    Enter any text, emoji or script into the input box. Results update as you type.

  2. 2

    Pick a format

    Choose U+ code points, \u escapes, HTML entities, UTF-8 bytes and more.

  3. 3

    Copy or download

    Copy the result with one click or save it as a text file.

UNICODE CONVERSION GUIDE

Text to Unicode Converter – Convert Text to Unicode Code Points, Escapes and HTML Entities Online

Need a fast, reliable text to Unicode converter that works right in your browser? This free online Unicode converter turns any string into its Unicode code points, such as U+0048 U+0069 for the word Hi, and also gives you the matching JavaScript escape sequence, Python escape, CSS escape, HTML numeric entity, UTF-8 byte sequence and UTF-16 code units. Paste a sentence, a single emoji, a line of Urdu or Arabic, a Hindi paragraph or a mix of everything, and the converter shows the exact Unicode value for every character in a clear, copy-ready format. You can also go the other way: paste a list of U+ code points, \u escapes or HTML entities and the tool converts Unicode back to readable text. There is nothing to install, no signup and no limit, and because the conversion runs locally in your browser, your text stays private.

This free Unicode converter works as a text to Unicode code point converter, a Unicode escape generator for JavaScript, Python, Java, C and CSS, an HTML entity encoder and a Unicode to text decoder. Paste any text, emoji, Urdu, Arabic or Hindi and get U+ code points, \u escapes, HTML entities, UTF-8 bytes, UTF-16 units or binary in one click. It runs in your browser on Windows, Mac, Linux, Android and iPhone, so nothing is uploaded and nothing is stored.

Developers use a text to Unicode escape converter to put non-English text safely into JSON, JavaScript, Java, Python and CSS files. Web designers use it to find the HTML entity or CSS content value for a symbol. Writers and translators use it to check which character is really hiding inside a document. Students use it to learn how characters become numbers inside a computer. Whatever the reason, a good text to Unicode tool saves you from looking up code charts by hand and from copy-and-paste mistakes with invisible or look-alike characters.

Text to Unicode Code Points

Convert text to Unicode code points in standard U+ notation. Every character, from a plain letter to a rare symbol or a flag emoji, gets the exact hexadecimal value assigned by the Unicode Standard. This is the quickest way to find the Unicode number of a character, to compare two characters that look identical, or to document the characters used in a font, a database column or a data file.

Unicode Escape Converter

Create ready-to-paste Unicode escape sequences for JavaScript, JSON, Python, Java, C#, PHP, Rust, Go and CSS. Choose the exact syntax you need, keep normal English letters untouched if you like, and convert only the special characters. It is ideal for source files that must stay pure ASCII, for config files, and for sending text through systems that dislike non-English characters.

Text to HTML Entities

Turn symbols, accented letters and emoji into decimal or hexadecimal HTML entities such as © or ©. Numeric entities work in every browser and every email client, so they are a dependable way to show copyright signs, currency symbols, arrows and special punctuation on a web page without worrying about file encoding.

What Is Unicode and Why Convert Text to Unicode?

Unicode is the universal character standard that gives every letter, digit, symbol and emoji in the world its own unique number, called a code point. Before Unicode, computers used dozens of incompatible encodings, which is why old web pages and emails sometimes showed broken characters when a file moved from one country or system to another. Unicode solved that problem by defining one shared list of characters for all writing systems, from Latin, Cyrillic, Greek, Arabic and Devanagari to Chinese, Japanese, Korean and thousands of emoji. The standard has room for 1,114,112 code points, spread across 17 planes, and it covers well over 150,000 assigned characters.

When you convert text to Unicode, you are asking a simple question: which number does the standard assign to each character I typed? The capital letter A is U+0041, the euro sign is U+20AC, the Arabic letter alef is U+0627 and the grinning face emoji is U+1F600. Knowing these numbers is useful in many daily situations, such as writing a regular expression that matches a specific script, finding a character in a code chart, escaping text for a programming language, or debugging a string that looks right on screen but fails a comparison.

A text to Unicode converter is also the fastest way to reveal hidden characters. A zero-width space, a non-breaking space, a right-to-left mark or a look-alike letter from another alphabet is invisible or nearly identical to the normal character, yet it has a different code point. Paste the suspicious text into this tool and the breakdown table shows precisely what is inside.

How to Convert Text to Unicode Online (Step by Step)

Converting a string to Unicode with this tool takes only a few seconds. The converter updates live, so you never need to press a convert button. Follow these steps to convert text to Unicode code points or escape sequences.

  1. Choose Text → Unicode: Keep the direction switch on Text → Unicode, which is the default mode.
  2. Enter your text: Type directly, paste from the clipboard, or click one of the example chips to see how different scripts behave.
  3. Select the output format: Pick U+ code points for documentation, \u for JavaScript and JSON, \U for Python, a CSS escape for stylesheets, an HTML entity for web pages, or UTF-8 bytes for low-level work.
  4. Adjust options: Choose a separator, switch hex digits between uppercase and lowercase, or turn on the option that keeps plain ASCII letters and converts only special characters.
  5. Copy or download: Use Copy result to place the output on your clipboard, or Download .txt to save it as a file.

Need a simpler number format? Try text to ASCII for the first 128 characters, text to hex for UTF-8 bytes or text to binary for bits and bytes.

Below the converter you will find a character breakdown table. It lists every character with its code point, decimal value, UTF-8 bytes, UTF-16 units and Unicode block, which makes this page a handy Unicode character lookup as well as a converter.

Supported Unicode Output Formats Explained

Different tools and languages expect Unicode in different notations. Instead of memorizing each syntax, pick the one you need from the format grid. The table below shows how the same two characters, the letter A and the grinning face emoji, look in every supported format.

Text to Unicode formats for the characters A and 😀
Format Letter A Emoji 😀 Typical use
Unicode code point U+0041 U+1F600 Documentation, code charts, searching
JavaScript / JSON escape \u0041 \uD83D\uDE00 JS, JSON, Java, C#, Kotlin strings
ES6 braces escape \u{41} \u{1F600} Modern JavaScript, PHP 7+, Rust, Swift, Ruby
Python / C long escape \u0041 \U0001F600 Python 3, C, C++, Go, C#
CSS escape \0041 \1F600 The CSS content property
HTML decimal entity A 😀 HTML pages and email templates
HTML hex entity A 😀 HTML pages and XML documents
UTF-8 bytes 41 F0 9F 98 80 Files, network data, hex editors
UTF-16 code units 0041 D83D DE00 JavaScript, Java, Windows APIs

If you only need to know which number belongs to a character, choose U+ notation. If you need something you can paste into source code, choose the escape syntax of your programming language. If you are building a web page, choose an HTML entity. The decimal, binary, UTF-8 and UTF-16 options are useful for teaching, debugging and low-level data work.

Unicode vs ASCII: What Is the Difference?

ASCII is a small, older encoding with only 128 characters: English letters, digits, basic punctuation and control codes. It was designed for English text and fits in seven bits. Unicode is a far larger standard that includes ASCII as its first 128 code points, so every ASCII character has the same number in Unicode. That is why the letter A is 65 in ASCII and U+0041 in Unicode, the same value written in two ways.

ASCII compared with Unicode
Feature ASCII Unicode
Number of characters 128 Over 150,000 assigned, room for 1,114,112
Languages covered English only Nearly all modern and many historic scripts
Emoji and symbols No Yes
Compatibility Subset of Unicode Includes ASCII as the first 128 code points
Typical storage 1 byte 1 to 4 bytes in UTF-8, 2 or 4 bytes in UTF-16

Because plain English text uses only the first 128 code points, converting it to Unicode looks simple. The real value of a Unicode converter appears when text contains accents, currency signs, non-Latin alphabets or emoji.

UTF-8, UTF-16 and UTF-32: Unicode Encodings Compared

A code point is just a number. To store or send it, the number has to be turned into bytes, and that step is called an encoding. The three common Unicode encodings are UTF-8, UTF-16 and UTF-32. This converter shows the code point, the UTF-8 byte sequence and the UTF-16 code units side by side, so you can see how one character is represented in each.

UTF-8 vs UTF-16 vs UTF-32
Encoding Size per character Strength Where you see it
UTF-8 1 to 4 bytes Compact for English, ASCII compatible Web pages, JSON, most files and APIs
UTF-16 2 or 4 bytes Efficient for many Asian scripts JavaScript strings, Java, Windows
UTF-32 Always 4 bytes Fixed width, simple indexing Some internal processing and databases

As a quick example, the letter é is code point U+00E9. In UTF-8 it uses two bytes, C3 A9. The euro sign U+20AC uses three bytes, E2 82 AC. The grinning face U+1F600 uses four bytes, F0 9F 98 80. Use the UTF-8 bytes output of this tool whenever you need to inspect raw file content or debug a byte-level problem.

Emoji, Surrogate Pairs and Why Some Characters Look Longer

Characters above U+FFFF, such as most emoji, do not fit into a single 16-bit unit. UTF-16 stores them as a surrogate pair, two special units that together represent one character. The grinning face U+1F600 becomes D83D followed by DE00. This is the reason JavaScript reports the length of the string "😀" as 2, even though a person sees only one character. The statistics row under the converter shows both numbers, characters as code points and UTF-16 code units, so you can see the difference immediately.

When you pick the JavaScript or JSON escape format, emoji are written as two \u escapes, exactly as older parsers expect. When you pick the ES6 format, the same emoji is written as a single \u{1F600}. Both are valid in modern JavaScript, but strict JSON only accepts the surrogate pair form. Keep this in mind when you copy the result into a JSON file.

  • Skin tones and gender variants: Many emoji are built from several code points joined together, so one visible emoji may produce more than one line in the breakdown.
  • Flags: A flag emoji is made from two regional indicator letters, which is why a single flag shows two code points.
  • Zero-width joiner: Family and profession emoji use the invisible code point U+200D to glue other emoji together.
  • Variation selectors: The invisible code point U+FE0F asks for the colorful emoji style instead of the plain text style.

Convert Urdu, Arabic, Hindi and Other Languages to Unicode

This Unicode converter works with every script supported by your browser. If you are looking for an Urdu text to Unicode converter, an Arabic to Unicode tool or a Hindi to Unicode converter, simply paste the text and read the result. Urdu is written with the Arabic script, so its letters live mainly in the Arabic block, U+0600 to U+06FF, with a few extra letters in the Arabic Supplement and the Arabic Presentation Forms blocks. Hindi uses the Devanagari block, U+0900 to U+097F.

Common Unicode blocks and example characters
Script or set Unicode block range Example Code point
Basic Latin (English) U+0000 to U+007F A U+0041
Latin-1 Supplement U+0080 to U+00FF é U+00E9
Arabic and Urdu U+0600 to U+06FF ا U+0627
Devanagari (Hindi) U+0900 to U+097F न U+0928
Currency Symbols U+20A0 to U+20CF € U+20AC
Emoticons (emoji) U+1F600 to U+1F64F 😀 U+1F600

Right-to-left scripts such as Urdu and Arabic are stored in logical order, which means the first typed character is the first code point, even though it appears on the right side of the screen. The converter keeps this logical order, so the code points you see are in the same sequence as they are stored in memory. Joined letter forms are chosen by the font at display time, so the same letter can look different at the start, middle or end of a word while keeping one code point.

Unicode Escape Sequences in JavaScript, Python, Java, PHP, CSS and More

Each language has its own way of writing a Unicode character inside a string. Mixing them up is a very common source of errors, which is why this tool offers several syntaxes. The table below summarizes the most common ones.

Unicode escape syntax by language
Language Basic character (é) Emoji (😀)
JavaScript "\u00E9" "\u{1F600}" or "\uD83D\uDE00"
JSON "\u00E9" "\uD83D\uDE00"
Python 3 "\u00e9" "\U0001F600"
Java and Kotlin "\u00E9" "\uD83D\uDE00"
C# and C++ "\u00E9" "\U0001F600"
PHP 7 and later "\u{00E9}" "\u{1F600}"
Rust and Swift "\u{E9}" "\u{1F600}"
Go "\u00e9" "\U0001F600"
CSS content: "\00E9" content: "\1F600"
HTML é or é 😀 or 😀

A good habit is to test one converted string in the environment where it will run before you convert a long file. Syntax rules, especially for characters above U+FFFF, differ between languages and between older and newer versions of the same language.

How to Convert Unicode to Text (Decode Escapes and Code Points)

Switch the direction to Unicode → Text to decode. This is useful when you receive a JSON response full of \u00e9 sequences, an old HTML file with numeric entities, or a list of code points from a specification and you want to read the real characters. In auto detect mode the tool understands U+ notation, \uXXXX, \u{XXXXX}, \UXXXXXXXX, decimal and hexadecimal HTML entities and 0x prefixed values in the same input. If your data is a different type, such as CSS escapes, plain decimal numbers or raw UTF-8 hex bytes, pick it from the input type menu.

  • Surrogate pairs are joined: \uD83D\uDE00 is decoded into a single 😀 character.
  • Mixed content works: Ordinary text around the escapes is kept, so you can decode a whole sentence at once.
  • Invalid values are left alone: A value above U+10FFFF cannot be a character, so it stays as it was typed instead of producing garbage.
  • Swap in one click: Use Swap input and output to move a result back into the input and continue in the opposite direction.

Common Uses of a Text to Unicode Converter

A Unicode converter is more than a curiosity. It solves real problems for developers, designers, content creators and students every day. Here are some of the most popular uses.

  • Escape non-ASCII text in code: Keep source files, build scripts and config files pure ASCII by turning every special character into an escape sequence.
  • Prepare JSON and API payloads: Convert text into \u sequences so that strict systems and older parsers accept it.
  • Find the HTML entity or CSS value of a symbol: Look up the code for arrows, stars, check marks, currency signs and emoji, then paste it into your stylesheet or template.
  • Debug mojibake and encoding errors: Check which code points and bytes are actually present when text turns into strange characters.
  • Detect hidden and look-alike characters: Spot zero-width spaces, non-breaking spaces and homoglyphs that break searches, passwords and comparisons.
  • Localization and translation work: Verify that language strings contain the intended characters for Urdu, Arabic, Hindi, Chinese and other languages.
  • Learn how text encoding works: See the connection between a character, its number, its binary value and its bytes.
  • Create test data: Generate escaped strings with accents, emoji and right-to-left text to test input fields and databases.

Text to Unicode vs Fancy Unicode Text Generators

People searching for "text to Unicode" sometimes mean two different things. This tool is a text to Unicode code converter: it shows the numeric code of each character and gives you escape sequences for programming and web work. A fancy Unicode text generator is a different kind of tool. It swaps normal letters for decorative look-alikes, such as bold, italic or script letters, so text can be pasted into social media bios. Those decorative letters are real Unicode characters too, which means you can paste them into this converter to see their code points, which are very different from the ordinary letters. That is a good way to learn why fancy text does not behave like normal text in search or screen readers.

Troubleshooting: Unicode Problems and How to Fix Them

Most Unicode problems are not caused by Unicode itself, but by two systems disagreeing about the encoding. These are the issues people meet most often and the quick way to investigate each one with this converter.

  • Question marks or boxes instead of letters: The font may not contain the character, or the data was converted to a limited encoding and the character was lost. Check the code point first, then try a font that supports its block.
  • Strange text like é instead of é: This is mojibake. UTF-8 bytes were read as a single-byte encoding. Compare the UTF-8 bytes output with the wrong text to confirm.
  • Two strings look equal but do not match: They may use different but equivalent forms, such as the single character é (U+00E9) versus the letter e followed by a combining accent (U+0065 U+0301). Normalizing to the same form solves this.
  • String length is larger than expected: Emoji and rare characters use two UTF-16 units. Compare the code point count with the UTF-16 unit count in the statistics row.
  • A lone surrogate error: A half of a surrogate pair, from D800 to DFFF, is not a valid character by itself. Make sure both halves stay together.
  • An invisible byte order mark: A file may start with U+FEFF. It does not show on screen but it appears in the breakdown.

Tips for Accurate Text to Unicode Conversion

  • Match the format to the destination: JSON needs \u escapes, CSS needs a backslash value, HTML can use entities, and Python prefers \U for characters above U+FFFF.
  • Keep ASCII readable: Turn on the option to convert only non-ASCII characters so code and plain words stay easy to read.
  • Use a separator for reading, none for pasting: A space or new line makes code points easy to read, while no separator produces a compact string for source code.
  • Check the breakdown for invisible characters: A suspicious string is easiest to solve by looking at each code point.
  • Test a short sample first: Before converting a large block, run a short sample in your target language to make sure the syntax is accepted.
  • Remember that the tool is reversible: Anything you convert can be decoded again with the Unicode → Text mode.

Unicode Code Point Examples: Symbols, Letters and Emoji

The table shows common characters with their Unicode code point and the escape formats developers use most.

Common characters and their Unicode values
Character Code point JavaScript / JSON HTML entity
A U+0041 \u0041 A
é U+00E9 \u00E9 é
© U+00A9 \u00A9 ©
€ U+20AC \u20AC €
✓ U+2713 \u2713 ✓
★ U+2605 \u2605 ★
ا U+0627 \u0627 ا
अ U+0905 \u0905 अ
😀 U+1F600 \u{1F600} 😀

Characters above U+FFFF, such as most emoji, need a longer escape such as \u{1F600}, or a pair of UTF-16 units in older formats.

Unicode Quick Reference: Code Point, Escape and Entity Formats

Which Unicode format should you use?
Format Example for A Where it is used
Code point U+0041 Documentation and Unicode charts
JavaScript / JSON escape \u0041 JavaScript strings, JSON files
ES6 escape \u{41} Modern JavaScript, PHP and Rust
Python / C / Go escape \U00000041 Python, C and Go strings
CSS escape \41 The CSS content property
HTML decimal entity A HTML and email templates
HTML hex entity A HTML and email templates

Combining Characters, Normalization and Invisible Characters

Some characters that look like one letter are made of more than one code point. An accented letter such as é can be a single code point, U+00E9, or the letter e followed by a combining accent, U+0065 and U+0301. Both look the same but are different strings, which can break searches, comparisons and sorting. The character breakdown shows each code point so you can spot the difference.

Invisible characters are another common surprise. A zero-width space, a non-breaking space or a right-to-left mark can sit inside text without showing. If a login, URL or import fails for no visible reason, convert the text and look for unexpected code points.

Mojibake: Why Text Shows Strange Symbols and How to Fix It

Garbled text such as é instead of é is called mojibake. It happens when text saved in one encoding is read as another, most often UTF-8 read as a legacy code page. Convert the text to UTF-8 bytes with this tool to see the real bytes, then make sure your file, database connection, HTML meta charset and HTTP header all say UTF-8.

  • Save files as UTF-8 and declare it with <meta charset="utf-8"> in HTML.
  • Use a UTF-8 collation, such as utf8mb4 in MySQL, so emoji are stored correctly.
  • Check that the sending and receiving programs agree on the encoding.
  • Replace the damaged text from the original source whenever possible.

How Many Characters Is That? Code Points, UTF-16 Units and UTF-8 Bytes

One visible character can be counted in several ways. The tool shows code points, UTF-16 code units and UTF-8 bytes so you can match the number your system uses.

Length of sample text in different units
Text Code points UTF-16 units UTF-8 bytes
A 1 1 1
é 1 1 2
€ 1 1 3
😀 1 2 4
Hello 5 5 5

Unicode for Web Developers, Designers and Content Writers

  • Developers: Generate escapes for strings, JSON and CSS without typing every code.
  • Designers: Find the code point for an icon character or symbol and use it in the CSS content property.
  • Email and HTML authors: Convert symbols to HTML entities so they display correctly in every client.
  • Writers and translators: Check that Urdu, Arabic or Hindi text kept its characters after copying between apps.
  • Security testers: Spot lookalike and invisible characters in strings and URLs.

Is My Text Private When I Use the Unicode Converter?

Yes. Conversion runs entirely in your browser. Your text is never uploaded, saved or sent to a server, and it disappears when you close or refresh the page.

More Free Text Tools You May Need

Unicode connects to every other text encoding. These related free tools can help:

Free Online Unicode Converter: Private, Fast and Accurate

This free text to Unicode converter was built to be useful from the first second. There is no signup, no file upload, no usage limit and no watermark. All conversion happens in your browser with standard web technology, so it works on Windows, Mac, Linux, Android and iPhone, and your text never leaves your device. Because the page updates while you type, you can try different formats and options and compare the results immediately.

Ready to convert? Scroll up, type or paste your text and choose a format. If you work with text and files every day, explore the other free tools on our site for formatting, encoding and file conversion.

ADVERTISEMENT
Demo Ad 300 x 250
COMMON QUESTIONS

Text to Unicode Converter FAQ

Quick answers about converting text to Unicode code points, escapes and HTML entities, and decoding them back to text.

What is a text to Unicode converter?

A text to Unicode converter reads each character of your text and shows the number the Unicode Standard assigns to it, called a code point, for example U+0041 for the letter A. It can also write that value as a programming escape such as \u0041, as an HTML entity such as &#65;, or as UTF-8 and UTF-16 data. It is used for coding, web design, debugging and learning how text encoding works.

How do I convert text to Unicode code points online?

Type or paste your text into the input box, keep the direction on Text → Unicode, and choose U+ code point as the output format. The result appears instantly, one code point for each character. Use the separator menu to choose spaces, commas or new lines, then press Copy result or Download .txt.

How do I convert Unicode back to normal text?

Switch the direction to Unicode → Text and paste your code points or escapes. Auto detect handles U+ notation, \u and \U escapes, \u{} braces, HTML numeric entities and 0x values. For CSS escapes, plain decimal numbers or UTF-8 hex bytes, choose the matching input type. Surrogate pairs such as \uD83D\uDE00 are combined into a single emoji.

What is the difference between U+0041, \u0041 and &#65;?

They all describe the same character, the capital letter A, in different notations. U+0041 is the standard way to write a Unicode code point in documents. The notation \u0041 is an escape sequence used inside strings in JavaScript, JSON, Java and other languages. The notation &#65; is a decimal HTML entity used in web pages, where 65 is simply the decimal form of hexadecimal 41.

Can I convert emoji, Urdu, Arabic or Hindi text to Unicode?

Yes. The converter supports every character that your browser can handle, including emoji, Urdu and Arabic script, Hindi in Devanagari, Chinese, Japanese, Korean, Cyrillic and many more. Characters above U+FFFF, such as most emoji, are shown with their full code point and, in JavaScript format, as a surrogate pair. The breakdown table also names the Unicode block of each character.

What is the difference between Unicode, UTF-8, UTF-16 and ASCII?

Unicode is the standard that assigns a number to every character. UTF-8, UTF-16 and UTF-32 are ways of storing those numbers as bytes. ASCII is an older 128-character set that is included as the first part of Unicode. UTF-8 is the most common encoding on the web, because it is compact for English and works with ASCII, while UTF-16 is used inside JavaScript and Java strings.

Is it safe to convert text to Unicode online?

Yes. This converter works entirely in your browser, so the text you type is not uploaded, stored or sent to a server, and no account is needed. You can even disconnect from the internet after the page loads and it will keep working. As a general habit, avoid pasting passwords or secrets into any website unless you fully trust how it handles data.

ADVERTISEMENT
Demo Ad 320 x 50