GenerateRandomSearch

Text Encoder and Decoder

Base64, percent-encoding and HTML escaping all exist because some channel cannot carry arbitrary bytes, and all three go wrong in the same place: the characters outside plain ASCII. A tool that handles "hello" and mangles "café" or an emoji is worse than useless, because the failure only shows up on the data that mattered. Everything here works on bytes rather than characters, and decodes its own output to prove it.

What this generator does

Turns your text into UTF-8 bytes and encodes those, so the result survives whatever characters the text contains, then decodes its own output and compares.

How to use this tool

  1. Paste your text and choose an encoding.
  2. Encode it, and copy the result.
  3. Paste encoded text into the second box to read it back.
  4. The byte count is given alongside the character count, since they differ.

Understanding the controls

Your text
Up to a hundred thousand characters. Accents, symbols and emoji are all fine, and the byte count will differ from the character count where they appear.
Encoding
Base64, the URL-safe variant of Base64, percent-encoding for URLs, HTML entities, hexadecimal bytes or binary bytes.

Common use cases

  • Encoding a value for a URL or a query string
  • Reading a Base64 string somebody has sent you
  • Escaping text so it can go safely into HTML
  • Seeing the bytes behind a piece of text
  • Checking that an accented name survives an encoding

How this generator works

Every encoding decodes its own output and the result must equal the text that went in, character for character. Where the text uses characters beyond plain ASCII, that is called out separately, because those are the ones an encoding actually breaks on. Base64 output is checked against the alphabet its form allows, and HTML output is checked to leave no bracket raw.

Randomness and fairness

Nothing is random. The same text always encodes the same way.

For how randomness is produced across the whole site, see how Generate Random works.

Limitations and good to know

  • Text in, text out. Encoding a file or an image is a different job.
  • The URL-safe Base64 drops its padding, which is the usual convention but not universal — some readers insist on it.
  • HTML escaping covers the five characters that matter for markup, not every possible named entity.
  • Percent-encoding follows the rules for a single URL component, which escapes more than encoding a whole URL would.

Privacy and your data

Everything is encoded in your browser. Nothing you paste is transmitted or stored.