Text & encoding

Text Encoder & Decoder

Convert text, Unicode code points, UTF bytes, Base64, URL encoding and HTML entities locally. Catch malformed data before copying or downloading it.

Stays in your browserFiles and text are processed in this tab.
Text Encoder & DecoderLocal processing
More options
Add input, or load the sample.
0 graphemes0 code points0 UTF-16 units0 UTF-8 bytes

Text & encoding

How it works

Unicode assigns numbers to characters; UTF-8, UTF-16 and UTF-32 turn those numbers into byte sequences. Base64 is a way to represent bytes as printable text. These are different layers: é is U+00E9, but its UTF-8 bytes are C3 A9.

Byte order matters for UTF-16 and UTF-32. Choose LE for little endian or BE for big endian. A byte order mark, or BOM, is a leading U+FEFF signature. Decoding here preserves it as a character rather than silently discarding it.

What you can do

Convert in either direction between plain text, code points, Unicode escapes, JSON strings, ASCII and UTF bytes. Base64 and Base64url always represent UTF-8 here. HTML uses HTML5 entity rules; URL mode encodes a component, so a plus sign remains a plus on decode. Data URI mode accepts text/plain UTF-8 only. Byte operations read plain text, at most16KiB after encoding. ASCII uses7bits, UTF-8 uses8. Result is modified bytes in hex, with actual .bin export and strict decode feedback. Invalid UTF-8 remains bytes; no replacement decoding. XOR mask must fit the selected width. This is not encryption.

How to use it

  1. Select the source and target formats. For bytes or bare code points, set the numeric base from 2 to 36.
  2. Paste data or open a UTF-8 file. To inspect a binary file, select Raw bytes and its actual UTF encoding; files are never fetched from a URL.
  3. Convert, review the counts, then copy or download. Download bytes saves actual encoded bytes. Swap formats or reuse the result to check a round trip.
  4. Byte operations read plain text, at most16KiB after encoding. ASCII uses7bits, UTF-8 uses8. Result is modified bytes in hex, with actual .bin export and strict decode feedback. Invalid UTF-8 remains bytes; no replacement decoding. XOR mask must fit the selected width. This is not encryption.

Errors and limits

Malformed UTF-8, incomplete UTF units, unpaired surrogates and out-of-range scalars stop conversion. Offsets are zero based; byte decode errors refer to the decoded byte array.

Use spaces, commas or semicolons between numbers. Packed byte output uses fixed-width tokens; code points keep separators. Input is limited to 200,000 UTF-16 units and output to 2,000,000 characters. Raw files are limited to 16 KiB.

Byte operations read plain text, at most16KiB after encoding. ASCII uses7bits, UTF-8 uses8. Result is modified bytes in hex, with actual .bin export and strict decode feedback. Invalid UTF-8 remains bytes; no replacement decoding. XOR mask must fit the selected width. This is not encryption.

Frequently asked questions

Is Base64 encryption?

No. It is reversible encoding and provides no secrecy. Anyone with the encoded value can decode it.

Why do UTF-8 hex and Unicode code points differ?

Code points identify characters; UTF-8 encodes each scalar in one to four bytes. The character 😀 is U+1F600 and F0 9F 98 80 in UTF-8.

Related tools