What is URL decoding? Why is it so important?
In Internet communications, URLs (URFs) can only contain a limited character set. According to RFC Standard, with only letters, numbers and a few special symbols (e.g.,
- _ . ~
) is directly usable. Other characters (e.g. Chinese characters, spaces, even)
& ? =
.) If you appear directly in the parameter, you may cause the server to resolve the error or the browser to access it.
URL encoding
(also known as the percentage code) by converting non-ASCII characters to
%
The following forms two hexadecimal numbers to ensure the security of the link during the transmission.
URL decode
is the original readable form for the characters that are coded.
The unique advantages of this tool
- Privacy protection: All decoding operations are performed locally in your browser, and data is not uploaded to the server to ensure sensitivity API Security of key and personal privacy.
-
Double mode support:
Provision
encodeURIComponent(appropriate for parameter encoding) andencodeURITwo models (fitting full link encoding) address the needs of different development scenarios. - Structure defusing: Automatically recognize and split URL protocols, domain names, paths and query parameters, allowing complex links to be visible.
- Move end appliance: The response design ensures that you can also debug the interface on your mobile phone.
Common application scene
1. Processing Chinese links
When you share links containing Chinese in Twitter or QQ, you often see links becoming a string
%E4%BD%A0%E5%A5%BD
。 Use the " One Key Decoding " function of this tool to restore the original identity of these links in an instant.
2. Fixing API request error
When developing backend or debugging API, if included in the parameter
&
or
#
Wait for special characters, and close to URL without encoded The rear will cause the parameters to be cut off. The use of component code would successfully address this problem.
3. Clearing redundant tracking parameters
You can see clearly the UTM contained in URLs with the Structure Dissolve function of this tool Track parameters and manually remove unnecessary parts to make links simpler.
Developer's guide: encodeURI vs encodeURIComponent
| Functions | Keep Character (no Encoding) | Best Use |
|---|---|---|
encodeURI |
; , / ? : @ & = + $ # |
Encoding the complete URL, retaining protocols and domain name structures. |
encodeURIComponent |
None (retain only letters and numbers)
- _ . ! ~ * ' ( )
)
|
Encoding the individual parameter values in URLs to prevent special characters within the parameters from damaging the link structure. |