Encoders & Decoders

Encode and decode data for URLs and text-only channels. The JSON, XML and YAML variants validate your data before encoding and pretty-print it after decoding, so you can trust what you pass on.

Popular Encoders & Decoders

All Encoders & Decoders (15)

About Encoders & Decoders

URL encoding (percent-encoding, RFC 3986) replaces characters that have a special meaning in a URL with % followed by two hexadecimal digits, so a value such as a&b can be placed in a query string safely.

Base64 (RFC 4648) represents bytes using 64 printable characters, so binary or arbitrary text can travel through systems that only handle text. It grows data by about a third. Base64 is an encoding, not encryption: anyone can decode it.

Which tool to use

Use URL Encode for a single parameter value and URL Decode to read one. The JSON, XML and YAML variants add a check: they refuse to encode a broken document, and after decoding they tell you whether the payload arrived intact. The Base64 tools follow the same pattern, and Base64 to JSON also accepts the URL-safe alphabet without padding that tokens use. Base64 to Image draws a picture from a Base64 string or a data URI.

Frequently asked questions

Is Base64 a way to hide secrets?

No. It is trivially reversible. Use real encryption for anything sensitive.

What is the difference between URL Encode and JSON URL Encode?

URL Encode encodes any text as-is. JSON URL Encode first checks that the text is valid JSON and minifies it, so the encoded value is as short as possible and guaranteed to parse.

Do the Base64 tools handle non-English text?

Yes. Text is encoded as UTF-8 before Base64 encoding, and decoded as UTF-8.

Common use cases

  • Passing JSON as a query parameter
  • Embedding a small image as a data URI
  • Reading a Base64 payload from a token, header or log
  • Decoding a percent-encoded value from a redirect URL

Example

Text:     {"q":"a&b"}
URL:      %7B%22q%22%3A%22a%26b%22%7D
Base64:   eyJxIjoiYSZiIn0=

The same JSON value, URL-encoded and Base64-encoded.