Text Encoding Converter - UTF-8, Base64, Hex, ASCII, Latin1

Text Encoding Converter

Source encoding
Bytes:0 Chars:0
Target encoding
Bytes:0 Chars:0 Truncated:No Lossy conversion:No

About this tool

What this tool is good for

This tool converts string and byte data between UTF-8, UTF-16LE, UCS-2, Latin1, Base64, ASCII, Hex, and byte-array forms. It is useful when debugging encoding bugs, inspecting payloads, or preparing data for APIs and protocols.

Encoding notes

Encoding or formExampleBest use
UTF-8E4 BD A0 E5 A5 BDModern web pages, APIs, JSON, and multilingual text.
UTF-16LE60 4F 7D 59Little-endian UTF-16 data, Windows-oriented text, and some binary protocols.
ASCII48 65 6C 6C 6FLegacy data limited to English letters, numbers, and basic symbols.
Latin1E9Single-byte Western European text and compatibility debugging.
Base645L2g5aW9Wrap arbitrary bytes as ASCII text for transport.
Hexe4bda0e5a5bdInspect and copy raw bytes for protocols, signatures, and debugging.
Byte array228,189,160,229,165,189Represent bytes explicitly as decimal values from 0 to 255.
  • UTF-8 is the most common Unicode encoding used on the web.
  • UTF-16LE is the little-endian UTF-16 variant used by this tool, and UCS-2 is treated as its alias.
  • Latin1 supports only U+0000 to U+00FF and may truncate higher code points.
  • Base64 ignores non-Base64 separator characters such as spaces and line breaks when decoding.
  • Hex uses two hexadecimal characters per byte, and incomplete trailing data will be truncated.
  • Byte array output represents each byte as a decimal number from 0 to 255 separated by commas.

Mojibake debugging checklist

  1. Identify whether the source is plain text, Base64, Hex, or a byte array.
  2. If raw bytes are available, inspect them with Hex or byte-array output before guessing.
  3. Try the most likely character set first; for modern APIs, start with UTF-8.
  4. If you see replacement characters, question marks, or truncation, the bytes and decoder probably do not match.
  5. Check whether URL encoding, Unicode escaping, or JSON string escaping was also applied.
SymptomCommon causeNext step
CJK text becomes mojibakeUTF-8 bytes were read as another single-byte or legacy encoding.Inspect the raw bytes and decode with the intended encoding.
U+FFFD appearsUTF-8 decoding found invalid byte sequences.Check for truncation or a wrong selected encoding.
Base64 output is unreadableThe decoded bytes are binary or still need a character encoding.Inspect Hex first, then try UTF-8, UTF-16LE, or Latin1 as appropriate.
Hex to text failsThe Hex input is odd-length, dirty, or not text in the selected encoding.Clean the Hex input and decode with the correct character set.

ASCII note

ASCII only applies to 7-bit ASCII data and is mainly useful for legacy compatibility. In most modern cases, UTF-8 is the better default choice.

FAQ

What problem does a text encoding converter solve?

It helps you inspect how the same text is represented in different encodings, which is useful when debugging garbled characters, imported files, API payloads, and legacy system data.

Why do characters become mojibake?

Mojibake happens when bytes written in one encoding are read as another encoding. Converting or inspecting the byte representation helps you find where the mismatch occurred.

Is Base64 the same as character encoding?

No. Character encodings map text to bytes, while Base64 represents bytes as ASCII text for transport. You may need both when debugging file contents or network payloads.

When should I use Unicode decoding instead?

Use this converter when you are working with bytes and character encodings. Use the Unicode tool when the input is an escaped string such as \u4e2d\u6587.

Why is decoded Base64 still not readable text?

Base64 decodes to bytes. Those bytes may be UTF-8 text, but they may also be images, keys, compressed payloads, or another binary format that should be inspected as Hex instead.

Related tools