How to URL Encode a String (Step by Step)
URL-encode (percent-encode) text so it is safe in a URL or query string — step by step, with a free URL encoder.
Putting arbitrary text in a URL means escaping unsafe characters first:
-
1
Open the encoder
Open the URL encoder and choose encode.
-
2
Paste your text
Paste the text or value you want to put into a URL or query string.
-
3
Copy the encoded result
Unsafe characters become %XX escapes (e.g. a space becomes %20). Copy it into your URL.
Do it now
常见问题
为什么我缺少协议的 “URL” 会报错?
浏览器原生的 URL 解析器要求必须包含协议。请在前面加上 https:// 后重试。
重复的查询键是怎么处理的?
每一次出现都会单独生成一行 —— 这对于像 ?tag=a&tag=b 这样的筛选场景很有用。
想生成带标签的活动 URL?
可以使用我们的 UTM Builder。
只想对单个字符串进行百分号编码或解码?
可以使用我们的 URL Encoder & Decoder,无需完整的 URL 结构即可快速编码 / 解码。