Skip to content

Encoding

Encode and decode text using various methods including Base64, URL encoding, HTML entities, and more

Binary data representation

Original Text

Encoded Result

Encoding Information:

  • Base64: Perfect for encoding binary data in text format
  • URL Encoding: Makes text safe for URLs and web transmission
  • HTML Entities: Escapes special characters for web content
  • Hex: Converts text to hexadecimal representation
  • Binary: Shows the 8-bit binary representation of text
  • ROT13: Simple letter substitution cipher
  • Morse Code: Classic telegraph encoding system

About the Encoding Tool

Encoding converts data into a different representation so it can travel safely through a system that would otherwise mangle it. It is not encryption — anyone can reverse it — but it is essential for moving binary data through text-only channels.

This tool handles eight schemes in both directions: Base64, percent-encoding for URLs, URI component encoding, HTML entity escaping, hexadecimal, binary, ROT13, and Morse code.

How to use it

  1. 1Pick whether you are encoding or decoding.
  2. 2Choose the scheme — for example Base64 to embed binary data in text, or HTML entities when you need to display angle brackets literally.
  3. 3Type or paste your input, or upload a file when working with larger content.
  4. 4Copy the output. Decoding is the exact reverse operation using the same scheme.

When you would use it

  • Decoding a Base64 value found in a JWT, a data URI or an API response.
  • Percent-encoding a query parameter so spaces, ampersands and non-ASCII characters survive the round trip.
  • Escaping HTML entities before embedding text in a page, so the markup does not break.

How it works, and what it does not do

These are pure transformations. Base64 turns arbitrary bytes into 64 printable characters so they can travel through systems that only accept text; percent-encoding escapes the characters a URL treats specially; HTML entities do the same for markup; hex and binary render the underlying bytes.

The caveat that matters is that encoding is neither encryption nor security. Base64 is trivially reversible and protects nothing on its own, and escaping HTML entities is not a substitute for correct output encoding in the application that displays the value. Percent-encoding is also context-sensitive: the correct escaping for a URL path segment is not the same as for a query parameter, which is why an encoded value can still break when pasted into the wrong part of a URL.

Frequently asked questions

Is encoding the same as encryption?

No. Encoding is a reversible transformation with no secret involved — base64-decoding a value requires nothing but the string itself. If you need to keep data confidential, you need encryption, not encoding.

What is the difference between URL and URI component encoding?

They are closely related. Percent-encoding escapes characters that are unsafe in a URL, while URI component encoding is stricter and also escapes characters like / and ? that would otherwise be interpreted as URL structure. Use URI component encoding when the value is a data parameter rather than a path.

Why does Base64 make my data larger?

Base64 maps every three bytes of input onto four ASCII characters, so the output is about 33% larger than the original. That expansion is the price of representing arbitrary binary data using only printable characters.

When would I use hexadecimal or binary output?

Hexadecimal is the usual way to display raw bytes — cryptographic keys, hashes, and colour values are all conventionally written in hex. Binary is mainly useful for teaching, or for inspecting exactly which bits are set in a byte.

Can I encode a file rather than text?

Yes. The file mode takes an upload of up to 100 MB and encodes or decodes it as a whole, which is useful for inspecting what a binary payload actually contains. It is read into memory and discarded afterwards — nothing is written to disk or kept.

Why does my decoded Base64 look like garbage?

Because the bytes are not text. They are probably binary — an image, a compressed payload — or text in an encoding other than UTF-8. Base64 preserves bytes faithfully; whether those bytes form readable characters is a separate question.