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)
- URL EncodePercent-encode text so it is safe to use in a URL.
- URL DecodeDecode percent-encoded text from a URL.
- JSON URL EncodeValidate JSON, minify it, then percent-encode it for a URL query parameter.
- JSON URL DecodeDecode a percent-encoded JSON value and pretty-print it.
- XML URL EncodeCheck that XML is well-formed, then percent-encode it for a URL.
- XML URL DecodeDecode a percent-encoded XML value and indent it.
- YAML URL EncodeValidate YAML, then percent-encode it for a URL, keeping its line breaks.
- YAML URL DecodeDecode a percent-encoded YAML value and check that it is valid YAML.
- JSON to Base64Validate JSON, then encode it as UTF-8 Base64.
- Base64 to JSONDecode Base64 and pretty-print the JSON.
- XML to Base64Validate XML, then encode it as UTF-8 Base64.
- Base64 to XMLDecode Base64 and pretty-print the XML.
- YAML to Base64Validate YAML, then encode it as UTF-8 Base64.
- Base64 to YAMLDecode Base64 and check that the result is valid YAML.
- Base64 to ImageDecode a Base64 string and preview the image.
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.