Text Encoder Decoder
- Home
- > Encoder & Decoder >
- Text Encoder & Decoder
What is Text Encoding?
Text encoding defines how characters are represented as bytes in computer systems. Different encodings use different byte sequences to represent the same text. Understanding encodings is essential for working with international text, APIs, databases, and file formats.
This tool supports three major encodings:
- UTF-8 — The dominant encoding on the web. Uses 1-4 bytes per character, backward-compatible with ASCII. Recommended for almost all modern applications.
- UTF-16 — Uses 2 or 4 bytes per character. Used internally by JavaScript, Java, and Windows APIs. Our tool uses little-endian byte order.
- Latin1 (ISO-8859-1) — A single-byte encoding covering Western European languages. Can only represent 256 characters.
How to Use
- Choose mode — Toggle between Encode Text and Decode Text mode at the top.
- Select encoding — Choose the target encoding (UTF-8, UTF-16, or Latin1) and output format (Hex, Percent, Decimal, or Binary).
- Enter your text — Type or paste the text or encoded bytes into the input area.
- Convert — Click Encode or Decode to process. Use Swap to exchange input and output. Click Load Example for sample data.
- Copy or download — Use the copy button on the output area or click Download .txt to save the result.
Frequently Asked Questions
What is the difference between encoding and encryption?
Encoding transforms data into a different format for interoperability (like UTF-8 bytes or hex), while encryption secures data so it cannot be read without a key. Encoding is reversible without a key and is not designed for security.
Why do I see different byte sequences for the same text?
Different encodings represent the same characters using different byte sequences. For example, the character "é" is one byte (0xE9) in Latin1 but two bytes (0xC3 0xA9) in UTF-8. This tool lets you compare how the same text looks in different encodings.
What output formats are available?
You can view encoded bytes in four formats: Hex (48 65 6C), Percent (%48%65%6C, URL-style), Decimal (72 101 108), and Binary (01001000 01100101 01101100). All formats are space-separated for readability.
Is this tool safe for sensitive data?
Yes. All processing happens entirely in your browser using JavaScript's built-in TextEncoder and TextDecoder APIs. Your data is never uploaded to any server, stored, or logged.