Input URL or Text
Process Result
User Guide & URL Encoding Info
How to use this tool
- Encode: Enter plain text (supports English, Chinese, and special symbols) on the left, click the "Base64 Encode >>" button, and the corresponding Base64 string will be generated on the right.
- Decode: Enter a Base64 string on the left, click the "Base64 Decode >>" button, and the original text will be restored on the right.
- Example: Click the green "Example" button to quickly fill in test data.
- Drag to Adjust: You can click and drag the gray vertical bar in the middle to freely adjust the width of the input and result areas.
URL Encoding (UrlEncode) Basics
- Why is URL encoding needed? URLs can only be transmitted using the ASCII character set. If a URL contains Chinese, spaces, or special symbols (like
?,&,=as parameter values), it must be escaped and encoded; otherwise, it will cause parsing confusion for browsers or servers. - Encoding Rules: URL encoding converts non-ASCII characters into a
%followed by two hexadecimal digits. For example, a space is encoded as%20(sometimes encoded as+in forms), and the Chinese character "你" is encoded as%E4%BD%A0in UTF-8. - Which characters are not encoded? Generally, letters (A-Z, a-z), numbers (0-9), and a few special characters (like
-,_,.,!,~,*,',(,)) are safe in standard URI component encoding and do not need to be escaped. - encodeURI vs encodeURIComponent:
-encodeURI: Used to encode the entire URL. It does not encode characters with special meanings in URLs (like:,/,?,&,=).
-encodeURIComponent: Used to encode a specific parameter value in a URL. It encodes most special characters, ensuring that&or=contained in parameter values do not break the original URL structure. This tool generally uses this stricter encoding method underneath.
