EditSafely

Convert UTF8 to UTF16

Quickly convert UTF8 encoding to UTF16 encoding. Runs entirely in your browser, so your data never leaves your device.

0 chars · 0 lines

Output

The result appears here as you type.

Options

How to use Convert UTF8 to UTF16

  1. 1. Paste the UTF-8 text. Type or paste the text you want re-encoded, such as Hi, into the input pane.
  2. 2. Choose a Separator. Enter the character placed between each 16-bit code unit, such as a space, matching the format your Windows API log or Java debugger prints values in.
  3. 3. Copy the UTF-16 code units. The output pane shows each character as a 4-digit hex code unit, with characters beyond the Basic Multilingual Plane split into surrogate pairs automatically.

When to use Convert UTF8 to UTF16

Convert UTF8 to UTF16 produces the 16-bit code unit representation that Windows APIs, Java and JavaScript strings use internally. It is useful for generating reference values when you need to check that a surrogate pair is being handled correctly somewhere in your stack.

  • Building a test case for a Windows API call. You are calling a Win32 function that expects a wide string and want a known-good UTF-16 code unit sequence to hardcode into a test before wiring up the real conversion.
  • Verifying surrogate pair handling in your own code. You wrote code that manually walks a UTF-16 string and want to confirm it correctly treats an emoji as two surrogate code units rather than one.
  • Comparing JavaScript string length against UTF-16 units. You are explaining why a JavaScript string's length property counts differently than its visible character count, and want to show the actual 16-bit units behind an emoji.

Examples

Encode

Input

Hi

Output

0048 0069

About the Convert UTF8 to UTF16 tool

Convert UTF8 to UTF16 is a free online tool that works entirely inside your web browser. Quickly convert UTF8 encoding to UTF16 encoding. Because the processing happens on your own device, nothing you enter is uploaded, logged or stored anywhere.

This page is one of 69 UTF-8 utilities on EditSafely. Each one does a single job well, and all of them follow the same rule: your input stays on your machine.

You can shape the output with the Separator setting, and the result refreshes the moment you change it. A worked example further down the page shows exactly what the tool produces for a real input.

Because nothing leaves your device, the tool is suitable for sensitive content such as internal documents, credentials or customer data. It also responds instantly, since every keystroke is handled on your own machine rather than by a remote API.

Frequently asked questions

Is Convert UTF8 to UTF16 free to use?

Yes, it is completely free. All 2,658 tools on EditSafely work without an account, a subscription or usage limits.

Is it safe to paste sensitive or confidential data?

Everything happens locally. Your browser downloads the tool's code once, then does all the processing itself; nothing you enter is transmitted, stored or logged. You can even go offline after the page loads and it will still work.

How much text can I process at once?

There is no fixed limit. Because the work happens on your own device rather than on a shared server, the practical ceiling is your machine's memory, which comfortably handles inputs far larger than typical online tools allow.

Do I need to sign up or install anything?

No. The tool works in any modern browser on desktop, tablet or phone. There is no account to create, no extension to add and no software to install.

How do I use the result?

The output panel has a one-click copy button, and you can keep refining the input while you work; the result updates in place as you type.