DevToolBox免费
博客广告合作

URL 编码 / 解码

编码或解码 URL 和 URI 组件。支持 encodeURIComponent 和 encodeURI。免费使用,无需注册。

About URL Encoding

URL encoding replaces unsafe ASCII characters with a "%" followed by two hexadecimal digits. This is essential for passing special characters in URLs, query parameters, and form data. Use encodeURIComponent for query parameters and encodeURI for full URLs.

常见问题

💬 User Feedback

Have suggestions or found a bug? Leave a message and we'll get back to you.
0/2000

评价此工具

4.7 / 5 · 107 人评价

保持更新

获取每周开发技巧和新工具通知。

无垃圾邮件,随时退订。

Enjoy these free tools?

使用方法

  1. Enter text in the input field
  2. Choose between URI Component or Full URI encoding mode
  3. Click 'Encode' or 'Decode'
  4. Copy the result

常见用途

  • Encoding query parameters in URLs
  • Encoding form data for submission
  • Handling special characters in API requests
  • Debugging URL encoding issues

常见问题

What is URL encoding?
URL encoding replaces unsafe ASCII characters with a '%' followed by two hex digits. This ensures special characters are safely transmitted in URLs.
What's the difference between encodeURI and encodeURIComponent?
encodeURI encodes a full URL but preserves characters like :, /, ?, &. encodeURIComponent encodes everything including those characters, making it suitable for query parameter values.
When should I URL encode?
Always URL encode when passing user input as query parameters, form data, or any URL component that may contain special characters like spaces, &, =, or #.

本站使用 Cookie 进行流量分析与广告展示。继续浏览即视为同意。 隐私政策