URL Encode / Decode
Encode special characters for safe use in URLs, or decode percent-encoded URL components.
About this tool
URLs can only contain a limited set of characters. Spaces, accented characters, punctuation and many other symbols must be percent-encoded — replaced with a percent sign followed by their hexadecimal character code — before they can be used safely in a URL. This tool encodes strings for safe URL use or decodes percent-encoded strings back to readable text.
How to use
Select Encode or Decode from the mode selector, paste your input in the text box and click Run. For encoding, enter a string with special characters and receive the URL-safe encoded version. For decoding, paste a percent-encoded URL component and receive the original string.
When to use this tool
Use this when building URL query strings with special characters, when debugging malformed URLs in API requests, when working with UTM tracking parameters, or when you need to decode a percent-encoded URL component you have received.
Privacy
URL encoding errors can cause broken links, failed API requests and search indexing problems. Getting the encoding right is important, especially when working with query strings, UTM parameters and user-generated content in URLs.
Frequently asked questions
What characters get encoded?
All characters that are not unreserved in URL syntax are encoded. Unreserved characters — letters, digits, hyphens, underscores, dots and tildes — are left unchanged. Spaces become %20, & becomes %26, and so on.
Should I encode an entire URL or just part of it?
You should encode individual components, not the full URL. Encoding the entire URL including its slashes and colons would break its structure. Encode individual query parameter values and path segments.
What is the difference between encodeURI and encodeURIComponent?
encodeURI encodes a full URL and leaves structural characters like / and ? intact. encodeURIComponent encodes a single component and encodes everything including structural characters. This tool uses encodeURIComponent, which is correct for encoding parameter values.