Mã hoá / Giải mã URL trực tuyến — Percent-encoding miễn phí
Trình mã hoá và giải mã URL miễn phí. Chuyển ký tự đặc biệt sang %XX cho query string hoặc giải mã ngược lại.
Dán URL hoặc tham số. Mã hoá escape ký tự đặc biệt (khoảng trắng → %20, …); Giải mã đảo ngược.
Trường hợp sử dụng phổ biến
- 1Safely embed search queries, dates and special characters in GET URLs.
- 2Debug malformed link previews where percent-encoding got double-applied.
- 3Clean campaign URLs that broke after a CMS auto-encoded an already-encoded URL.
Câu hỏi thường gặp
What's the difference between encodeURI and encodeURIComponent?+
This tool uses encodeURIComponent — it escapes every special character. encodeURI is more conservative (leaves slashes, &, =, etc.) and is meant for whole URLs, not for query parameter values.
Why didn't a + sign get decoded to space?+
Strict percent-encoding uses %20 for space, not +. The + → space mapping is application/x-www-form-urlencoded, an older form-encoding scheme used by HTML forms.
Is it safe to put credentials in a URL after encoding?+
No. Encoded or not, URL parameters appear in server logs, browser history and referrer headers. Use POST bodies or Authorization headers for credentials.