UTF-16 Code Units Encode & Decode

View the UTF-16 code units (hex) of text and back. This tool does both encode and decode on one page — just pick a mode, paste your text, and click. Everything runs on your device, nothing is sent to a server.

The result will appear here…
or press Ctrl+Enter

Everything runs in your browser. Your data is never sent to our servers.

728 × 90Ad Space AvailablePlace your ad here

Example

Example Input

café

Example Output

0063 0061 0066 00e9

How to Use

  1. 1Choose Encode or Decode mode at the top.
  2. 2Type or paste your text into the Input field.
  3. 3Click the button (or press Ctrl+Enter) to process. The result appears in the Output field.
  4. 4Click Copy to copy the result, or "Swap input/output" to quickly reverse the operation.

About UTF-16 Code Units

The UTF-16 tool shows the UTF-16 code units of your text in hexadecimal (4 digits per unit), and can turn them back into text. UTF-16 is used internally by JavaScript and Windows.

How it works: each code unit (charCodeAt) is shown as 4 hex digits. Characters above the BMP use a surrogate pair, so they appear as two units.

Viewing UTF-16 code units is useful for understanding JavaScript string behavior, string lengths involving emoji, and interoperability with UTF-16-based systems.

FAQ

Can this UTF-16 Code Units tool both encode and decode?

Yes. This is a single page with a toggle — use Encode mode to transform text, and Decode mode to reverse it. No need for two separate pages.

Is my data sent to a server?

No. UTF-16 Code Units is processed entirely in your browser. The text you enter never leaves your device.

Related Tools

Related Categories