Unicode Escape Encoder & Decoder
Encode text as \uXXXX, \xXX, or HTML hex entities, and decode escaped strings back to readable text for code, JSON, and config work.
This conversion runs only in your browser — nothing is uploaded.
\uXXXX uses UTF-16 code units (emoji → surrogate pairs). Hex is UTF-8 bytes (\xXX). HTML is &#x…; numeric entities.
- Input0
- Output0
- OptionsUnicode (\uXXXX)
Input
Output
What is this tool?
This Unicode escape encoder and decoder converts readable text to escape notations used in JavaScript/JSON strings, byte-level debugging, and HTML numeric entities — then decodes them back.
- Unicode (
\uXXXX) — UTF-16 code units (JSON / JS string style). Supplementary characters such as emoji become surrogate pairs. - Hex (
\xXX) — UTF-8 bytes, useful when a log shows raw byte escapes. - HTML (
&#x…;) — hexadecimal numeric character references.
Escaping is not encryption. Anyone can reverse the result. Conversion updates live and stays in your browser.
Common use cases
- Read
\uXXXXsequences from API or application logs - Prepare JSON/JS string escapes that include CJK or emoji
- Compare UTF-16 escapes with UTF-8
\xXXbytes for the same character
How to use
- Choose Encode or Decode. Results update as you type; changing the format re-runs immediately.
- Pick Unicode, Hex, or HTML to match the source you are debugging.
- Paste text or escapes. Sample loads
안녕 😀(or the matching escaped form). - Copy the output. Meta chips show character counts and a short U+ code-point preview.
Examples
| Input / setting | Output | Notes |
|---|---|---|
Hi → Unicode encode | \u0048\u0069 | Each BMP character becomes one \uXXXX. |
Hi → Hex encode | \x48\x69 | UTF-8 bytes for ASCII (same values as code points here). |
\uD83D\uDE00 → Unicode decode | 😀 | Surrogate pair → U+1F600 (edge vs single \uXXXX). |
A → HTML decode | A | Hexadecimal HTML entity back to a character. |
Practical pitfalls
- Do not expect a single
\uXXXXfor emoji; JSON-style escapes use UTF-16 surrogates. - Mixing formats fails silently or empties output — Hex will not decode
\usequences, and Unicode will not parse\xbytes. - HTML mode here is numeric
&#x…;only, not named entities like (use the HTML Entity tool for named forms).
References
이 도구는 무엇인가요?
유니코드 이스케이프 인코더·디코더는 읽기 쉬운 텍스트와 이스케이프 표기를 서로 변환합니다.
- Unicode (
\uXXXX) — UTF-16 코드 유닛(JSON/JS 문자열). 이모지 등은 서로게이트 쌍. - Hex (
\xXX) — UTF-8 바이트 단위. - HTML (
&#x…;) — 16진 숫자 문자 참조.
이스케이프는 암호화가 아닙니다. 입력하면 결과가 바로 갱신되며 브라우저에서만 처리됩니다.
자주 쓰는 경우
- API·앱 로그의
\uXXXX문자열 읽기 - 한글·이모지가 들어간 JSON/JS 문자열 이스케이프 준비
- 같은 글자의 UTF-16 이스케이프와 UTF-8
\xXX바이트 비교
사용 방법
- Encode 또는 Decode를 선택합니다. 입력·형식 변경 시 결과가 즉시 갱신됩니다.
- 디버깅 중인 소스에 맞춰 Unicode / Hex / HTML을 고릅니다.
- 텍스트 또는 이스케이프를 붙여넣습니다. Sample은
안녕 😀(또는 해당 이스케이프)를 넣습니다. - 결과를 복사합니다. 메타에 문자 수와 U+ 코드 포인트 미리보기가 표시됩니다.
예시
| 입력 / 설정 | 출력 | 메모 |
|---|---|---|
Hi → Unicode 인코딩 | \u0048\u0069 | BMP 문자당 \uXXXX 하나 |
Hi → Hex 인코딩 | \x48\x69 | ASCII의 UTF-8 바이트 |
\uD83D\uDE00 → Unicode 디코딩 | 😀 | 서로게이트 쌍 → U+1F600 |
A → HTML 디코딩 | A | 16진 HTML 엔티티 |
실무에서 흔한 실수
- 이모지를 단일
\uXXXX로 기대하지 마세요. JSON 스타일은 UTF-16 서로게이트를 씁니다. - 형식을 섞으면 디코딩이 실패하거나 비어 보입니다. Hex로는
\u를, Unicode로는\x를 해석하지 않습니다. - 이 HTML 모드는
&#x…;숫자 엔티티만 다룹니다. 같은 이름은 HTML 엔티티 도구를 사용하세요.
참고자료
このツールについて
Unicode エスケープ エンコーダー/デコーダーは、読みやすいテキストとエスケープ表記を相互変換します。
- Unicode (
\uXXXX) — UTF-16 コード単位(JSON/JS 文字列)。絵文字などはサロゲートペア。 - Hex (
\xXX) — UTF-8 バイト単位。 - HTML (
&#x…;) — 16 進の数値文字参照。
エスケープは暗号化ではありません。入力に応じて結果が即時更新され、処理はブラウザ内だけです。
よくある用途
- API・アプリログの
\uXXXXを読む - 日本語・絵文字を含む JSON/JS 文字列エスケープの準備
- 同じ文字の UTF-16 エスケープと UTF-8
\xXXの比較
使い方
- Encode または Decode を選びます。入力や形式の変更で結果がすぐ更新されます。
- デバッグ対象に合わせて Unicode / Hex / HTML を選びます。
- テキストまたはエスケープを貼り付けます。Sample は
안녕 😀(または対応エスケープ)です。 - 結果をコピーします。メタに文字数と U+ コードポイントのプレビューが出ます。
例
| 入力 / 設定 | 出力 | メモ |
|---|---|---|
Hi → Unicode エンコード | \u0048\u0069 | BMP は \uXXXX 一つ |
Hi → Hex エンコード | \x48\x69 | ASCII の UTF-8 バイト |
\uD83D\uDE00 → Unicode デコード | 😀 | サロゲートペア → U+1F600 |
A → HTML デコード | A | 16 進 HTML 実体 |
実務での落とし穴
- 絵文字を単一の
\uXXXXと期待しないでください。JSON 風は UTF-16 サロゲートです。 - 形式を混ぜるとデコードに失敗します。Hex は
\uを、Unicode は\xを解釈しません。 - この HTML モードは
&#x…;数値実体のみです。 などの名前付きは HTML エンティティツールへ。
参考資料
¿Qué es esta herramienta?
Este codificador/decodificador de escapes Unicode convierte texto legible a notaciones usadas en cadenas JS/JSON, depuración por bytes y entidades HTML numéricas — y al revés.
- Unicode (
\uXXXX) — unidades UTF-16 (estilo JSON/JS). Emoji y similares usan pares sustitutos. - Hex (
\xXX) — bytes UTF-8. - HTML (
&#x…;) — referencias numéricas hexadecimales.
Escapar no es cifrar. La conversión es en vivo y solo en el navegador.
Casos de uso comunes
- Leer secuencias
\uXXXXen logs de API o aplicaciones - Preparar escapes JSON/JS con CJK o emoji
- Comparar escapes UTF-16 con bytes UTF-8
\xXXdel mismo carácter
Cómo usar
- Elige Encode o Decode. El resultado se actualiza al escribir; cambiar el formato recalcula al instante.
- Elige Unicode, Hex o HTML según la fuente que depuras.
- Pega texto o escapes. Sample carga
안녕 😀(o la forma escapada). - Copia la salida. Los chips muestran conteos y una vista previa U+.
Ejemplos
| Entrada / ajuste | Salida | Notas |
|---|---|---|
Hi → Unicode encode | \u0048\u0069 | Cada BMP → un \uXXXX. |
Hi → Hex encode | \x48\x69 | Bytes UTF-8 ASCII. |
\uD83D\uDE00 → Unicode decode | 😀 | Par sustituto → U+1F600. |
A → HTML decode | A | Entidad HTML hex. |
Errores prácticos
- No esperes un solo
\uXXXXpara emoji; el estilo JSON usa sustitutos UTF-16. - Mezclar formatos falla: Hex no decodifica
\u, Unicode no parsea\x. - El modo HTML aquí solo cubre
&#x…;numérico, no nombres como .
Referencias
Qu'est-ce que cet outil ?
Cet encodeur/décodeur d’échappements Unicode convertit du texte lisible vers des notations JS/JSON, des octets UTF-8 et des entités HTML numériques — et inversement.
- Unicode (
\uXXXX) — unités UTF-16 (style JSON/JS). Les emoji hors BMP deviennent des paires de substitution. - Hex (
\xXX) — octets UTF-8. - HTML (
&#x…;) — références numériques hexadécimales.
Échapper n’est pas chiffrer. La conversion est en direct et reste dans le navigateur.
Cas d'usage courants
- Lire des séquences
\uXXXXdans des logs d’API - Préparer des escapes JSON/JS avec CJK ou emoji
- Comparer escapes UTF-16 et octets UTF-8
\xXXpour le même caractère
Comment utiliser
- Choisissez Encode ou Decode. Le résultat se met à jour en tapant ; changer le format recalcule aussitôt.
- Choisissez Unicode, Hex ou HTML selon la source.
- Collez texte ou escapes. Sample charge
안녕 😀(ou la forme échappée). - Copiez la sortie. Les puces montrent les comptes et un aperçu U+.
Exemples
| Entrée / réglage | Sortie | Notes |
|---|---|---|
Hi → Unicode encode | \u0048\u0069 | Chaque BMP → un \uXXXX. |
Hi → Hex encode | \x48\x69 | Octets UTF-8 ASCII. |
\uD83D\uDE00 → Unicode decode | 😀 | Paire de substitution → U+1F600. |
A → HTML decode | A | Entité HTML hex. |
Pièges courants
- N’attendez pas un seul
\uXXXXpour un emoji ; le style JSON utilise des substituts UTF-16. - Mélanger les formats échoue : Hex ne décode pas
\u, Unicode ne parse pas\x. - Le mode HTML ne couvre ici que
&#x…;numérique, pas .
Références
这个工具是什么?
此 Unicode 转义编解码器在可读文本与转义写法之间转换。
- Unicode (
\uXXXX) — UTF-16 码元(JSON/JS 字符串风格)。表情等辅助平面字符使用代理对。 - Hex (
\xXX) — UTF-8 字节。 - HTML (
&#x…;) — 十六进制数字字符引用。
转义不是加密。输入即更新,仅在浏览器中处理。
常见用途
- 阅读 API/应用日志中的
\uXXXX - 准备含 CJK 或表情的 JSON/JS 字符串转义
- 对比同一字符的 UTF-16 转义与 UTF-8
\xXX字节
如何使用
- 选择 Encode 或 Decode。输入或切换格式时结果立即更新。
- 按调试来源选择 Unicode / Hex / HTML。
- 粘贴文本或转义。Sample 加载
안녕 😀(或对应转义)。 - 复制输出。元信息显示字符数与 U+ 码位预览。
示例
| 输入 / 设置 | 输出 | 说明 |
|---|---|---|
Hi → Unicode 编码 | \u0048\u0069 | 每个 BMP 字符一个 \uXXXX |
Hi → Hex 编码 | \x48\x69 | ASCII 的 UTF-8 字节 |
\uD83D\uDE00 → Unicode 解码 | 😀 | 代理对 → U+1F600 |
A → HTML 解码 | A | 十六进制 HTML 实体 |
实践中的常见误区
- 不要指望表情只有一个
\uXXXX;JSON 风格使用 UTF-16 代理对。 - 混用格式会解码失败:Hex 不解
\u,Unicode 不解析\x。 - 此处 HTML 模式仅支持数字
&#x…;,不含 等命名实体。
参考资料
這個工具是什麼?
此 Unicode 跳脫編解碼器在可讀文字與跳脫寫法之間轉換。
- Unicode (
\uXXXX) — UTF-16 碼元(JSON/JS 字串風格)。表情等輔助平面字元使用代理對。 - Hex (
\xXX) — UTF-8 位元組。 - HTML (
&#x…;) — 十六進位數字字元參照。
跳脫不是加密。輸入即更新,僅在瀏覽器中處理。
常見用途
- 閱讀 API/應用日誌中的
\uXXXX - 準備含 CJK 或表情的 JSON/JS 字串跳脫
- 對比同一字元的 UTF-16 跳脫與 UTF-8
\xXX位元組
如何使用
- 選擇 Encode 或 Decode。輸入或切換格式時結果立即更新。
- 依除錯來源選擇 Unicode / Hex / HTML。
- 貼上文字或跳脫。Sample 載入
안녕 😀(或對應跳脫)。 - 複製輸出。中繼資訊顯示字元數與 U+ 碼位預覽。
範例
| 輸入 / 設定 | 輸出 | 說明 |
|---|---|---|
Hi → Unicode 編碼 | \u0048\u0069 | 每個 BMP 字元一個 \uXXXX |
Hi → Hex 編碼 | \x48\x69 | ASCII 的 UTF-8 位元組 |
\uD83D\uDE00 → Unicode 解碼 | 😀 | 代理對 → U+1F600 |
A → HTML 解碼 | A | 十六進位 HTML 實體 |
實務上常見陷阱
- 不要指望表情只有一個
\uXXXX;JSON 風格使用 UTF-16 代理對。 - 混用格式會解碼失敗:Hex 不解
\u,Unicode 不解析\x。 - 此處 HTML 模式僅支援數字
&#x…;,不含 等命名實體。
參考資料
Last reviewed: 2026-07-26
Frequently asked questions
- Why does an emoji become two \uXXXX escapes?
- JavaScript and JSON \uXXXX escapes are UTF-16 code units. Characters outside the Basic Multilingual Plane (including many emoji) need a high/low surrogate pair, for example \uD83D\uDE00 for 😀 (U+1F600), not a single four-digit escape.
- What is the difference between Unicode, Hex, and HTML formats?
- Unicode mode emits \uXXXX (UTF-16 units). Hex mode emits \xXX for each UTF-8 byte. HTML mode emits hexadecimal numeric entities like 😀. Pick the format that matches the log, language, or markup you are reading.
- Why does decoding fail or look empty?
- The selected format must match the input. Pasting \u escapes while Hex is selected, truncated surrogate pairs, or incomplete \x / &#x…; sequences will not decode cleanly. Switch format or fix the escapes.
- Does the text leave my browser?
- No. Encoding and decoding run only client-side.