DataToolsLab
Text Tools

Text Encoder / Decoder

Encode or decode text as Base64, URL encoding or HTML entities.

Loading tool…

What is Encode / Decode?

The Text Encoder/Decoder converts plain text to and from the three most common encoding schemes — Base64, URL/percent encoding, and HTML entities — with a shared encode/decode toggle, so you can inspect JWTs, query params or encoded strings without a script.

How it works

Native browser APIs do the work client-side: Base64 wraps btoa/atob with TextEncoder/TextDecoder so non-ASCII text round-trips correctly (raw btoa throws on non-Latin1). URL mode uses encodeURIComponent/decodeURIComponent; HTML mode maps the five core entities plus numeric references. Malformed input surfaces as a clear error.

  1. Pick a scheme. Base64, URL encoding or HTML entities — each with its own encode/decode toggle.
  2. Paste input. Paste plain text to encode, or encoded text to decode. The result updates live.
  3. Copy or download. Copy the result to your clipboard or download it as a .txt file.

Examples

Decode a JWT payload

Paste the middle (payload) segment of a JWT, select Base64 + Decode, and read the JSON.

Inspect a URL query parameter

Decode a percent-encoded query value like name%20%3D%20Alice to see its plain text.

Common mistakes

Base64 with non-ASCII text

Naive btoa throws on non-Latin1 characters — this tool is UTF-8 safe, so 'café' round-trips correctly.

Malformed input

Decoding invalid Base64 or a broken %-escape shows a clear error message rather than failing silently.

Alternatives

Image to Base64

Encode image files to Base64 data URLs.

JSON Formatter

After decoding a JWT payload, pretty-print the JSON.

Frequently asked questions

Is Base64 encoding secure?

Base64 is an encoding, not encryption — anyone can decode it. Don't use it to protect sensitive data; use it for transport or inspection.

Does URL decoding handle '+' as space?

decodeURIComponent treats '+' literally. For application/x-www-form-urlencoded data where '+' means space, replace '+' with '%20' first.

Online