テキストと文書ツール

Unicode テキスト 変換

「Unicode テキスト 変換」はテキストと文書に使えるブラウザツールです。入力内容と結果は通常この端末内で処理され、登録は必要ありません。

ブラウザ内で処理登録不要プライバシーの説明 ↗

Maximum 100,000 UTF-16 characters. Conversion stays in this browser; encoded output is limited to 500,000 characters.

The escape prefix remains lowercase \u in both styles.

Every UTF-16 code unit becomes one four-digit escape; supplementary characters such as emoji become a surrogate-pair sequence.

使い方

使い方

  1. Choose text-to-escapes or escapes-to-text and enter up to 100,000 UTF-16 characters.
  2. For encoding, choose lowercase or uppercase hexadecimal digits; for decoding, correct any identified malformed escape.
  3. Convert locally, review the exact result, then copy it or download a text file.

Four hexadecimal digits per UTF-16 unit

Encoding emits one lowercase \u followed by exactly four hexadecimal digits for every browser UTF-16 code unit, including ASCII letters, spaces, punctuation, and line breaks. Choose lowercase or uppercase hexadecimal letters. Supplementary characters such as many emoji use two surrogate code units and become two adjacent escapes. This matches JavaScript \uXXXX string-literal units; it does not emit code-point braces such as \u{1F44B}.

Strict decoding with visible failures

Decoding replaces every exact lowercase-u \uXXXX sequence, including sequences embedded in ordinary text. A backslash-u prefix without four following hexadecimal digits stops with its UTF-16 position instead of being silently retained. Other text and backslash sequences remain unchanged. Isolated surrogate escapes are preserved as the exact UTF-16 code units they represent, so callers that require Unicode scalar values should supply paired surrogates.

よくある質問

あわせて知りたいこと

Why does one emoji become two escapes?

The browser stores supplementary Unicode characters as a UTF-16 surrogate pair. This converter intentionally emits one four-digit escape per UTF-16 code unit.

Does decoding require the entire input to be escaped?

No. Exact \uXXXX sequences can appear inside ordinary text; only those sequences are replaced. Other text remains in place.

Does this support \u{1F44B} or \x48?

No. The scope is the classic four-digit lowercase-u form \uXXXX. Braced code-point and two-digit byte escape syntaxes are outside this converter.