javascript url编码
在JavaScript中,对URL编码的内容进行JS URL解码可以使用内置的 `decodeURIComponent()` 函数,另外还可以看需要对字符进行JS URL编码的方法
// URL编码的内容
const encodedUrl = "Hello%20World%21%20%40%20JavaScript%20URL%20Decoding";
// 使用JS的 decodeURIComponent 进行URL解码
const decodedUrl = decodeURIComponent(encodedUrl);
// 输出结果
console.log("Decoded URL:", decodedUrl);
URL Decode 在线解码工具
这是一个简单易用的在线URL解码工具,就是简单快捷地进行各种字符的URL解码或编码操作。您的数据可以轻松地编码为 URL 编码,也可以解码为人类可理解的格式。UrlEncode是为了将字符转换为可在URL中安全传输的格式的编码方法。它将非字母数字字符转换为百分号(%)后跟两位十六进制数。UrlDecode就是将Url编码后的转换为编码前的字符。
复制成功
UrlEncode特殊符号编码表
符号 | 编码 |
---|---|
空格 | %20 |
! | %21 |
# | %23 |
$ | %24 |
& | %26 |
' | %27 |
( | %28 |
) | %29 |
* | %2A |
+ | %2B |
, | %2C |
/ | %2F |
: | %3A |
; | %3B |
= | %3D |
? | %3F |
@ | %40 |
[ | %5B |
] | %5D |