站点介绍

Debugging an incident last quarter, I found a log line that read \u63a5\u53e3\u8d85\u65f6 and a teammate on duty asked me what on earth that was. Decoded, it said "API timeout" in Chinese - four characters nobody in the room could read at that moment. This page exists for exactly that moment: escapes and plain text, properly introduced to each other.
A common character's Unicode code point is 4F60 in hexadecimal - that is its identity number. The three costumes are just three typographic habits: JavaScript strings write \u4f60, HTML writes 你 (decimal 20320 is exactly hex 4F60), spec documents write U+4F60. Different parsers, different radices, same character.
So a "wrong conversion" is usually not a wrong character - it is the wrong reader. Paste \u escapes into HTML or entities into JS and they just sit there, untouched.
UTF-16 represents characters in 16 bits, capped at 0xFFFF - and 😀 sits at 0x1F600, over the ceiling. So it splits into a surrogate pair: high surrogate \ud83d plus low surrogate \ude00, and only together do they make one emoji. Half a pair renders as a question mark or a box, and in data pipelines it is a dirty code unit. All three styles here handle the pairing correctly, and the round trip is lossless character by character - try bouncing 😀 through every mode and see.
Paste it straight into the left pane. The tool detects that the input is mostly \u escapes and flips to decode direction automatically - line breaks are fine, each line is handled on its own. After converting, hit the round swap button to convert back and eyeball the round trip, character by character.
😀 sits at code point U+1F600, above the 0xFFFF ceiling a single UTF-16 value can hold, so it is stored as a surrogate pair: \ud83d is the high surrogate, \ude00 the low one, and only together do they make that one emoji. This is exactly where naive converters break - they emit half a pair and the result pastes as a tofu box elsewhere. All three styles here handle it correctly: escape mode outputs the pair as-is, code point mode merges it into U+1F600.
Same character, three notations for three consumers. 😀 is a decimal HTML entity for HTML parsers; \ud83d\ude00 is the UTF-16 escape form used in JS/Java/Python string literals; U+1F600 is the raw code point notation humans and spec documents use. Pick whichever style you need - the output follows the selected button, and the swap button converts back and forth between them.
Yes, as long as your system has a font with the glyph. Characters in planes above the BMP (code points above 0xFFFF - rare CJK extensions, historic scripts, symbols) go through the same surrogate-pair logic as emoji. The only way you would "see nothing" is a missing font rendering a box - that is a display issue, not a conversion error: copy the result elsewhere or switch fonts and the character is there.
No. All conversion happens inside this device's browser - no upload endpoint, works offline. Only the output style preference lives in localStorage; it does not follow you to another device, and "Clear my data" in the footer removes it.
中文版:https://www.9314.cn/tools/unicode-convert/
评论列表 (0条)