Unicode Converter
Convert text to Unicode escapes, UTF-8 hex, binary, Base32, HTML, or CSS escapes with a live inspector and hidden character cleaner.
Live Character Inspector
| # | Char | Code Point | UTF-8 Bytes | UTF-16 Units | JS Escape | HTML Entity |
|---|
Short answer: This free online unicode converter turns plain text into escaped \u codes, ES6 \u{...} escapes, U+ code points, UTF-8 hex, binary, octal, decimal bytes, Base32, ROT13, Morse code, HTML entities, and CSS escapes. It works both ways. It also checks each glyph byte by byte and strips hidden zero-width marks in one click.
When a JSON API sends back \u067E\u0627\u06A9\u0633\u062A\u0627\u0646 or a CSV file breaks because of a hidden U+FEFF mark, guessing wastes time. Seeing each code point, byte, and surrogate pair side by side finds the bug in seconds.
How do you convert text to Unicode or decode escapes?
Converting text or decoding raw codes takes four quick steps:
- Pick a format and mode: Select any of the 12 modes from the top menu. Click Encode for text to codes, or Decode for codes to text.
- Add text or drop a file: Paste text on the left, click a preset (Urdu, Emoji, Hidden chars, JSON escape), or load a UTF-8 file up to 2 MB.
- Set separator and case: Choose None, Space, Comma, or New line, and toggle Uppercase hex as needed.
- Check, clean, and export: Scan the Live Character Inspector, click Clean invisibles if hidden marks appear, then copy or download
.txt.
Which Unicode and text formats are built in?
All 12 modes convert both ways as you type. Escape strings default to None, while byte lists default to Space, and you can override that at any time.
| Format | Output for A | Output for پ | Output for 🚀 | Common use |
|---|---|---|---|---|
| Escaped (\u) | \u0041 | \u067E | \uD83D\uDE80 | JSON, Java, JS strings |
| ES6 (\u{…}) | \u{41} | \u{67E} | \u{1F680} | Modern JS literals |
| Unicode (U+XXXX) | U+0041 | U+067E | U+1F680 | Specs, fonts, bug logs |
| UTF-8 Hex | 41 | D9 BE | F0 9F 9A 80 | Hex dumps, SQL, packets |
| UTF-8 Binary | 01000001 | 11011001 10111110 | 11110000 10011111 10011010 10000000 | Bit-level checks |
| UTF-8 Octal | 101 | 331 276 | 360 237 232 200 | Shell and C strings |
| Decimal Bytes | 65 | 217 190 | 240 159 154 128 | Byte arrays and buffers |
| Base32 (RFC 4648) | IE====== | 3G7A==== | 6CPZVAA= | TOTP keys, safe tokens |
| ROT13 | N | پ | 🚀 | Simple Latin text mask |
| Morse Code | dit dah | ? | ? | Latin signal practice |
| HTML Entities | A | پ | 🚀 | Safe HTML and email code |
| CSS Escapes | \000041 | \00067E | \01F680 | CSS content icons |
Click Swap after any run to move the result back to the input box and flip Encode and Decode. That fast round trip proves a hex dump, escape string, or Base32 code decodes back with zero loss.
How do UTF-8 bytes, UTF-16 units, and surrogate pairs differ?
UTF-8 stores each sign in 1 to 4 bytes, while UTF-16 stores signs in one 16-bit unit or a two-unit pair above U+FFFF. That is why the starter text Hello پاکستان 🚀 shows 15 code points, 16 UTF-16 units, and 25 UTF-8 bytes.
In RFC 3629 (checked 5 December 2026), the spec states: “UTF-8 encodes UCS characters as a varying number of octets, where the number of octets, and the value of each, depend on the integer value assigned to the character in ISO/IEC 10646 (the character number, a.k.a. code position, code point or Unicode scalar value).” Basic ASCII letters (U+0000 to U+007F) use 1 byte. Urdu and Arabic letters use 2 bytes. Most Chinese and Japanese glyphs use 3 bytes. Modern emoji use 4 bytes.
The Unicode Standard (checked 5 December 2026) sets 1,114,112 code points from U+0000 to U+10FFFF. Codes up to U+FFFF sit in the main plane and fit one 16-bit unit. Higher codes from U+10000 to U+10FFFF split into a high unit (0xD800 to 0xDBFF) and a low unit (0xDC00 to 0xDFFF) in JavaScript, Java, and JSON.
Compute a pair by hand in three steps: take the code point minus 0x10000, divide by 0x400 (1,024) and add 0xD800 for the high unit, then add the remainder to 0xDC00 for the low unit. Classic \u mode prints both 4-digit units, while ES6 \u{...} prints one code.
Three worked Unicode conversion examples
Testing real text shows how scripts, emoji, and hidden marks act inside bytes, JSON, and web databases.
Example 1: Urdu word پاکستان in JSON and UTF-8 hex
The word پاکستان has 7 code points: U+067E, U+0627, U+06A9, U+0633, U+062A, U+0627, and U+0646. Each letter sits below U+FFFF, so JavaScript sees 7 UTF-16 units and outputs \u067E\u0627\u06A9\u0633\u062A\u0627\u0646. In UTF-8 Hex, each letter takes 2 bytes, giving 14 bytes: D9 BE D8 A7 DA A9 D8 B3 D8 AA D8 A7 D9 86.
Example 2: Rocket emoji 🚀 surrogate pair math
Rocket emoji 🚀 uses code point U+1F680. Subtract 0x10000 to get 0x0F680. Divide by 0x400 to get 0x3D (61 in base 10). Add 0xD800 to get the high unit 0xD83D. Take the remainder 0x280 and add 0xDC00 for the low unit 0xDE80. That produces \uD83D\uDE80 in JSON, \u{1F680} in ES6, and 4 bytes (F0 9F 9A 80) in UTF-8 hex.
Example 3: Finding a hidden BOM and zero-width space
Tap the Hidden chars preset to load a byte order mark (U+FEFF), a zero-width space (U+200B), and an RTL mark (U+200F). The text looks normal, yet JSON parsers and SQL queries fail. The alert flags 3 hidden characters detected and strips all three in one click.
Urdu, Arabic, and RTL text in Pakistan
Urdu lives inside the Arabic block (U+0600 to U+06FF) listed in the Arabic chart (checked 5 December 2026). Web teams and writers in Pakistan run into three common issues: old InPage text that does not use Unicode, MySQL tables set to 3-byte utf8 instead of 4-byte utf8mb4, and missing zero-width non-joiners (U+200C) that join Urdu words by mistake.
| Urdu letter | Name | Code point | UTF-8 hex | JS escape | HTML entity |
|---|---|---|---|---|---|
| پ | Peh | U+067E | D9 BE | \u067E | پ |
| ٹ | Tteh | U+0679 | D9 B9 | \u0679 | ٹ |
| چ | Tcheh | U+0686 | DA 86 | \u0686 | چ |
| ڈ | Ddal | U+0688 | DA 88 | \u0688 | ڈ |
| ڑ | Rreh | U+0691 | DA 91 | \u0691 | ڑ |
| ژ | Jeh | U+0698 | DA 98 | \u0698 | ژ |
| ک | Keheh (Urdu Kaf) | U+06A9 | DA A9 | \u06A9 | ک |
| گ | Gaf | U+06AF | DA AF | \u06AF | گ |
| ں | Noon Ghunna | U+06BA | DA BA | \u06BA | ں |
| ہ | Heh Goal | U+06C1 | DB 81 | \u06C1 | ہ |
| ی | Farsi Yeh (Choti Ye) | U+06CC | DB 8C | \u06CC | ی |
| ے | Yeh Barree (Bari Ye) | U+06D2 | DB 92 | \u06D2 | ے |
ZWNJ | Zero Width Non-Joiner | U+200C | E2 80 8C | \u200C | ‌ |
RLM | Right-to-Left Mark | U+200F | E2 80 8F | \u200F | ‏ |
Watch out for Arabic Kaf (U+0643) versus Urdu Keheh (U+06A9), and Arabic Yeh (U+064A) versus Urdu Choti Ye (U+06CC). They look almost the same on screen, yet site search misses matches when two keyboards type different codes. Paste both words into the Live Character Inspector to spot the clash fast.
Need to move older Urdu print files to the web? Start with the InPage to Unicode converter, or convert web text back with the Unicode to InPage converter. You can also type fresh copy in the online Urdu editor, fix English titles in the case converter, count words in the word counter, or grab prompt templates in the ChatGPT in Urdu guide.
File limits, format rules, and browser privacy
This unicode converter handles pasted text and local UTF-8 files up to 2 MB, such as JSON, CSV, SQL, HTML, and CSS files. Base32 follows RFC 4648 (checked 5 December 2026) with = padding. CSS escapes use 6-digit hex codes per W3C CSS (checked 5 December 2026) so the next letter never blends into the hex code.
Two modes use smaller sets. ROT13 shifts only English letters (A to Z, a to z). Morse code maps Latin letters, digits, and basic marks, printing ? for other scripts. The inspector previews the first 80 code points to stay fast on phones, while output converts the full text.
Every file read, scan, and .txt download stays in local browser memory. Nothing touches a server.
Quick tips for clean text encoding
- Check UTF-16 units before slicing: When UTF-16 Units beats Code Points, loop with
Array.from(text)instead oftext.slice()so emoji pairs never split. - Keep ZWNJ in Urdu prose: Remove
U+200BandU+FEFFfrom code, but review the yellow alert before strippingU+200C(ZWNJ) from Urdu articles. - Use utf8mb4 in WordPress: Store Urdu and emoji in
utf8mb4_unicode_citables so 4-byte UTF-8 glyphs never turn into question marks. - Verify round trips: Click Swap after hex, octal, or Base32 runs to confirm lossless decoding.
Frequently asked questions
What is the difference between \uD83D\uDE80 and \u{1F680}?
Both stand for the same rocket emoji (🚀, code point U+1F680). Strict JSON and older JavaScript need two 4-digit UTF-16 codes (\uD83D\uDE80), while modern ES6 code takes one braced code (\u{1F680}). Pick Escaped (\u) for JSON feeds and ES6 (\u{…}) for modern JS files.
Does Base32 encoding encrypt text?
No. Base32 only turns bytes into 32 plain ASCII characters under RFC 4648, so anyone can decode it without a key.
Why does one emoji count as two characters in JavaScript?
JavaScript strings use UTF-16 under the hood. Any glyph above U+FFFF takes two 16-bit units called a surrogate pair. That makes "🚀".length return 2 even though you see one icon, so this tool shows both Code Points and UTF-16 Units.
Can hidden zero-width marks break JSON, SQL, or URLs?
Yes. A stray U+FEFF mark at the start of a JSON file makes parsers throw an error. A hidden U+200B space inside an email, URL slug, or SQL filter also stops exact matches from working.
Is any pasted text or uploaded file sent to a server?
No. Every conversion, scan, and download runs locally in your browser.
یونیکوڈ کنورٹر اردو الفاظ کو UTF-8 یا JSON اسکیپ میں کیسے بدلتا ہے؟
اوپر موجود فارمیٹ مینو سے Escaped یا UTF-8 Hex منتخب کریں اور بائیں باکس میں اردو ٹیکسٹ پیسٹ کریں۔ مثال کے طور پر لفظ پاکستان فوری طور پر سات یونیکوڈ کوڈ پوائنٹس اور چودہ UTF-8 ہیکس بائٹس میں تبدیل ہو جاتا ہے جنہیں آپ ایک کلک سے کاپی کر سکتے ہیں۔
کاپی پیسٹ کیے گئے ٹیکسٹ سے پوشیدہ زیرو وڈتھ کریکٹرز کیسے ہٹائیں؟
جوں ہی آپ ٹیکسٹ پیسٹ کرتے ہیں، یہ ٹول خودکار طور پر U+200B، U+FEFF اور غیر مرئی RTL نشانات کی نشاندہی کر دیتا ہے۔ پیلے وارننگ باکس میں موجود Clean invisibles بٹن پر کلک کرنے سے تمام پوشیدہ کریکٹرز ایک ساتھ صاف ہو جاتے ہیں۔
ان پیج اردو اور یونیکوڈ اردو میں کیا فرق ہے؟
پرانا ان پیج غیر معیاری فونٹ کوڈنگ استعمال کرتا ہے جو ویب سائٹس اور موبائل ایپس پر درست نظر نہیں آتی، جبکہ یونیکوڈ اردو عالمی معیار کے مطابق U+0600 سے U+06FF رینج میں محفوظ ہوتی ہے۔ ویب اور ورڈپریس کے لیے ہمیشہ یونیکوڈ اور utf8mb4 استعمال کرنا محفوظ رہتا ہے۔