Text Encoder / Decoder

Encode or decode text as Base64, URL percent-encoding, HTML entities, hex, binary, Unicode escapes or ROT13, with the known limits of each format stated.

Input
Result

About Text Encoder / Decoder

The Text Encoder / Decoder converts text to and from seven formats in one place: Base64, URL percent-encoding, HTML entities, hex, binary, Unicode escapes and ROT13.

Full UTF-8

Accented letters and emoji are encoded as UTF-8 bytes, so ö in hex is C3 B6.

Base64 is not encryption

Anyone can decode it. Never use it to hide passwords.

HTML entities

Characters that matter in HTML, like < and &, plus non-ASCII letters, become numeric entities. Emoji are written as two numbers (a surrogate pair), which browsers still display correctly.

Unicode escapes

ö becomes \u00f6 and emoji use the modern \u{1f600} form; both styles decode.

ROT13

A simple letter swap for hiding spoilers and puzzle answers; running it twice gives the original.

Private

Your text stays in your browser. Nothing is uploaded.

Named vs numeric entities

&amp; and &lt; are named entities, while &#38; and &#x26; are numeric forms of the same character. Numeric entities work for any Unicode character.

How to use Text Encoder / Decoder

  1. Paste the text into the Input box, or press Open .txt file.
  2. Choose the Format: Base64, URL, HTML entities, Hex, Binary, Unicode escapes or ROT13.
  3. Press Encode or Decode.
  4. Copy the result or press Download .txt; an error message appears if the input is not valid for the chosen format.

Help & FAQ

Is Base64 a form of encryption?

No. Base64 only changes how data is written, and anyone can decode it. Do not use it to protect a password or a secret.

Does it accept URL-safe Base64?

No. In our test 8J-YgA, which uses a hyphen, was refused. Replace - with + and _ with / and add == padding, and 8J+YgA== decodes to an emoji.

Does Base64 decoding need the equals padding?

No. SGk decoded to Hi in our test. The padding is optional here.

When should we use URL encoding?

For a value inside a query string, such as a search term. Do not encode a whole address, because the colon and slashes would be encoded too.

Why do we get an error when decoding?

The input is not valid for the chosen format. The messages are specific: not valid hex, binary must be groups of 8 bits, URI malformed, or could not decode as Base64.

What is wrong with emoji in HTML entities?

The tool writes an emoji as two surrogate numbers, such as &#55357;&#56832;, instead of one entity such as &#128512;. In our Chrome check they displayed as a replacement character, so use another format for emoji.

Does it handle accented letters and Urdu?

Yes for Base64, URL, hex, binary and Unicode escapes, which work on UTF-8 bytes or code points. HTML entities also work for characters within the Basic Multilingual Plane.

What is ROT13 used for?

Hiding spoilers or puzzle answers. It shifts letters by 13 places, so running it twice returns the original. It gives no security.

How are binary and hex input formatted?

Binary must be groups of 8 bits. Hex must be pairs such as 48 65 6c 6c 6f. Spaces separate the groups.

Which Unicode escape form is used?

\uXXXX for characters up to U+FFFF and \u{...} for higher ones such as emoji. Decoding accepts both that form and surrogate pairs.

Can we encode a file?

Not as a file. You can open a .txt file, but binary files such as images need a tool made for them.

Is our text uploaded?

No. Encoding and decoding run in your browser and the text is not sent for processing.

More in Text Tools

See all 21 in Text Tools