EditSafely

Convert UTF16 to UTF8

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

0 chars · 0 lines

Output

The result appears here as you type.

How to use Convert UTF16 to UTF8

  1. 1. Paste the UTF-16 code units. Enter the hex code units, such as 0048 0069 for Hi, separated by spaces. These are the 16-bit values Windows APIs, Java strings and JavaScript use internally to store text.
  2. 2. Let the tool reassemble surrogate pairs. There are no settings to configure; the tool pairs up any surrogate code units representing characters outside the Basic Multilingual Plane before re-encoding everything as UTF-8.
  3. 3. Copy the UTF-8 text. The output pane shows the decoded string in UTF-8. Copy it into your editor once the code units have become the readable text you expected.

When to use Convert UTF16 to UTF8

Convert UTF16 to UTF8 bridges the gap between the 16-bit code unit representation that Windows APIs, Java and JavaScript strings use internally and the byte-oriented UTF-8 that files, terminals and web protocols expect. Surrogate pairs for characters like emoji are recombined automatically so nothing gets split apart.

  • Reading a Windows API wide string dump. A Win32 debugging session prints a wchar_t buffer as raw 16-bit hex values instead of readable text. Pasting those code units here reconstructs the original string.
  • Inspecting a Java char array in a debugger. Java stores strings internally as UTF-16 and a debugger sometimes shows the raw char values for a field. Converting them here confirms what the string actually contains.
  • Debugging a .NET interop boundary. A .NET application passes a UTF-16 buffer to native code and the logged bytes look wrong on the other side. Decoding the code units here isolates whether the interop layer or the string itself is at fault.

Examples

Decode

Input

0048 0069

Output

Hi

About the Convert UTF16 to UTF8 tool

Convert UTF16 to UTF8 runs as plain JavaScript in your browser tab, with no server behind it. Quickly convert UTF16 data to UTF8 data. Whatever you put in stays on your device from start to finish.

The tool is part of EditSafely's UTF-8 Tools section, 69 single-purpose utilities built around the same idea: open the page, get the result, keep your data to yourself.

There is nothing to configure. Provide the input and the result appears on its own. A worked example further down the page shows exactly what the tool produces for a real input.

That local-first design has practical benefits beyond privacy. The tool keeps working on a flaky connection once the page has loaded, results are instant because nothing round-trips to a server, and it is safe to use with confidential material.

Frequently asked questions

Is Convert UTF16 to UTF8 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.