Use Base64 when text must travel as Base64

Base64 Encode and Decode converts UTF-8 text to a standard Base64 string and back. For example, encoding Hello 道友 👋 producesSGVsbG8g6YGT5Y+LIPCfkYs=. Decoding that value returns the original text. The decoder reports malformed Base64 and bytes that are not valid UTF-8 instead of inventing replacement text.

Use URL encoding for a URL component

A query value may contain spaces, &, =, or non-ASCII characters that have special meaning in a URL. URL Encode and Decode has anEncode URL component mode for this job. Encodingname=MyTool0 & city=杭州 produces:

name%3DMyTool0%20%26%20city%3D%E6%9D%AD%E5%B7%9E

Put the encoded result in the appropriate component of a URL; do not treat the whole encoded string as a complete URL. The tool also decodes percent-encoded component text and full URL text, but it does not open or validate the destination.

Neither transformation hides a secret

Base64 and percent encoding are reversible representations. Anyone who receives the value can decode it. Do not use either to protect passwords, private files, or access tokens. If a decoded URL looks unfamiliar, inspect it before opening it elsewhere.

Browse all guides