URL Encoder & Decoder
Safe percent-encoding for URLs and query components.
Common Encoded Characters
What Is URL Encoding?
URL encoding, which is also known as percent encoding, takes a URL and replaces any characters that are not allowed in a URL. This is done by inserting a percent sign (%) followed by two hexadecimal digits representing the ASCII code of a character. For example, a space becomes %20, whereas an ampersand becomes %26. This is important when you are passing form data or special characters in a URL. Without encoding, browsers may misinterpret the data.
encodeURIComponent vs. encodeURI
- encodeURIComponent: Encodes everything except safely alphanumeric characters. Essential for query parameter values.
- encodeURI: Preserves URL structure characters (like `/ ? # & =`). Use for a complete URL.
Privacy First Approach
HandleKit ensures your encoded strings are processed entirely in your browser.
No URLs or data are ever transmitted to our servers. Your local environment is 100% secure.
Frequently Asked Questions
How do I encode a URL?
You can paste the URL or text in the input field and select 'Component' for query parameter value encoding (or 'Full URL' for complete URL encoding). After that, click 'Encode', and the percent-encoded URL will be displayed in the output field. The result can be immediatey captured using the 'Copy' button.
What is the difference between 'Component' and 'Full URL' modes?
'Component' (encodeURIComponent) percent-encodes nearly all special characters in a URL. This is useful for encoding a search query or a value for a query parameter. 'Full URL' (encodeURI) leaves structural characters in a URL unchanged, so forward slashes and question marks are left as-is.
Why is a space encoded as %20 in a URL?
There are only a limited set of ASCII characters that a URL can contain. All other characters, including a space, are percent-encoded: replaced with a percent sign (%) followed by two digits representing the code for that character in hexadecimal. The code for a space is 32 in decimal and 20 in hexadecimal, hence %20.
When do I need to decode a URL?
You need to decode a URL when you receive a percent-encoded string (e.g., from a server log) and need to read the human-readable value. Simply paste the string in the input field and click 'Decode' to restore the original characters.
Does this tool store the URLs that I paste?
No. The encoding and decoding process happens on the client side using JavaScript in your browser. We do not store any URLs that you paste into this page. If you are working with URLs that contain sensitive data, you can use this page with confidence.
How useful was this tool?
Your feedback helps us improve HandleKit.