Text
你好
encodeURIComponent
%E4%BD%A0%E5%A5%BD
Encoding & Decoding
Percent-encode or decode text with encodeURIComponent or encodeURI. Useful for query values, non-ASCII paths, and API debugging. All processing stays in the browser.
Favorite this tool
No favorite storage mode has been selected.
Quick actions
Copy this tool URL or open the system share sheet on a supported device.
编码加解码
逐字符编码对照
已复制结果
两个函数的区别
encodeURIComponent
编码所有特殊字符,包括 : / ? # @ & 等。适用于编码查询参数的值。
encodeURI
保留 URL 结构字符(: / ? # @),仅编码非 ASCII 和空格。适用于编码完整 URL。
Text
你好
encodeURIComponent
%E4%BD%A0%E5%A5%BD
encodeURIComponent encodes more reserved characters (such as &, =, and ?), so it fits single parameter values. encodeURI keeps URL structure characters and fits encoding a full URL.
This tool percent-encodes or decodes a string. A URL parser splits a full URL into scheme, host, path, and query parts.
Tools
Continue with another translated tool for a nearby task.
Base64 Encode/Decode
Encode and decode Base64 in the browser, with standard and URL-safe variants, automatic direction detection, and optional file-to-Base64 conversion. Useful for API debugging and local data prep.
URL Parser
Parse a URL into protocol, host, port, path, query, and hash fields, and list each query parameter name and value. Useful for debugging API URLs and share links.
URL Builder
Build URLs from protocol, host, port, path, hash, and query parameters with automatic value escaping, or parse a full URL back into fields. Handy for API debugging and campaign link setup. Processing stays in the browser.