🔗

URL Encoder/Decoder

Encode and decode URL query strings and paths

About This Calculator

URL encoding (percent encoding) converts characters that are unsafe or reserved in URLs into a format that can be transmitted correctly. Characters like spaces, ampersands, question marks, and non-ASCII characters are replaced with percent-encoded equivalents (e.g., space becomes %20). This tool encodes and decodes entire URLs or individual URL components. Developers need URL encoding when constructing query strings with user input, passing data through URL parameters, encoding redirect URLs, and working with APIs that expect URL-encoded request bodies (application/x-www-form-urlencoded). Incorrect encoding is a common source of bugs in web applications.

How to Use

  1. 1
    Paste a URL or string
    Enter the URL or text you want to encode or decode.
  2. 2
    Choose encode or decode
    Select whether to percent-encode or decode the input.
  3. 3
    Copy the result
    Copy the encoded or decoded output for use in your application.

Frequently Asked Questions

Q. What characters need to be URL encoded?
Reserved characters that have special meaning in URLs must be encoded when used as data: : / ? # [ ] @ ! $ & ' ( ) * + , ; =. Spaces are encoded as %20 (or + in query strings). Non-ASCII characters like accented letters and emojis must also be percent-encoded.
Q. What is the difference between encodeURI and encodeURIComponent?
encodeURI encodes a full URI but preserves reserved characters like : / ? & that are structurally meaningful. encodeURIComponent encodes everything including reserved characters, making it suitable for encoding individual parameter values. Use encodeURIComponent for query string values.
Q. Why does my URL break when it contains spaces or special characters?
URLs can only contain ASCII characters from a limited set. Spaces, Unicode characters, and reserved characters must be percent-encoded. Failing to encode them causes the URL to be misinterpreted — the browser or server may truncate it at the space or treat & as a parameter separator.

Disclaimer: Results are for informational purposes only and do not constitute professional advice. Always consult qualified professionals for important decisions.