URL Encode & Decode
Encode and decode URLs with percent-encoding
Frequently Asked Questions
What is URL encoding and why is it needed?
URL encoding (also called percent-encoding) replaces unsafe characters in a URL with a % followed by two hex digits — a space becomes %20, & becomes %26. It lets URLs carry reserved characters, non-ASCII text, or binary data without breaking URL syntax.
What can I use this tool for?
Common scenarios include building API query strings, repairing double-encoded links, decoding shared URLs that contain CJK or special characters, analyzing logs that store encoded parameters, and debugging third-party callback URLs. It is especially handy when you are hand-crafting window.location or fetch requests.
What is the difference between encodeURI and encodeURIComponent?
encodeURI preserves URL-reserved characters like :, /, ?, and &, so it is meant for entire URLs. encodeURIComponent escapes every non-alphanumeric character — use it when you are building a single query parameter value. DevToolkit exposes both modes; choose component mode when inserting values into a query string.
Why do I see garbled output after decoding?
The source probably is not UTF-8. Legacy systems sometimes use GBK or ISO-8859-1, and decoding those bytes as UTF-8 produces mojibake. You may also be dealing with double encoding (%2520 actually means %20) — decode twice in that case. Confirm the origin character set first.
Does my URL get uploaded anywhere?
No. Encoding and decoding run entirely in your browser, so URLs that contain tokens, session IDs, or personal details never leave your device.
When should I choose URL encoding over Base64 or HTML entity encoding?
URL encoding is only for URL contexts and uses the smallest safe character set. Base64 is for embedding arbitrary binary data in text protocols. HTML entity encoding (e.g., <) prevents characters from being parsed as HTML tags. They solve different problems and are not interchangeable.