URL Encoder / Decoder
Encode special characters in a URL or decode an encoded URL string.
How it works
Paste any URL or text string and click Encode to percent-encode special characters (spaces become %20, & becomes %26, etc.). Click Decode to reverse the process. Essential for building and debugging URLs and query strings.
Why use this tool?
Developers use URL encoding when building API requests, handling form submissions, and constructing redirect URLs. Prevents special characters from breaking URL parsing in browsers and servers.
Frequently Asked Questions
What characters need to be URL-encoded?
Spaces become %20 (or +), & becomes %26, = becomes %3D, # becomes %23, and all non-ASCII characters are percent-encoded. RFC 3986 defines which characters are 'unreserved' and safe without encoding.
What is the difference between encodeURI and encodeURIComponent?
encodeURI encodes a full URL and leaves structural characters like /, ?, &, and # intact. encodeURIComponent encodes everything including those characters — use it for encoding query parameter values.
Why does my URL break when it contains spaces?
Spaces are not valid URL characters. Browsers may auto-encode them, but servers and APIs often reject them. Always encode spaces as %20 in URLs you construct programmatically.
Is this free?
Yes, completely free. Encode and decode URLs instantly in your browser.
Rate this tool:
Was this tool helpful?