:// ? & = # so full URLs remain valid. Special characters in values (spaces, brackets, non-ASCII) are percent-encoded.
What is URL encoding?
% followed by the character's hex value. A space becomes %20.&, = or # as delimiters.- _ . ~ are safe and never need encoding. Everything else should be percent-encoded.How to Use the URL Encoder/Decoder
- Choose encode or decode β Encode converts special characters to percent-encoded format safe for URLs. Decode converts percent-encoded strings back to readable text.
- Enter your text or URL β paste the text to encode or the percent-encoded string to decode.
- Select encoding type β Full URL encoding encodes everything except URL-safe characters. Component encoding additionally encodes /, ?, &, = characters β use this for individual query parameter values.
- Copy the result β use the encoded URL or decoded text in your application.
- Verify the result β test encoded URLs by pasting them into a browser address bar to confirm they work as expected.
Understanding URL Encoding
URL Encoding in Development
API endpoint construction
Building API URLs programmatically requires correct encoding of all variable components. Using string concatenation without encoding is a common security vulnerability β if user input contains &, =, or other special characters, it can manipulate the URL structure. Use language-built-in URL construction libraries: JavaScript's URLSearchParams, Python's urllib.parse.urlencode(), Ruby's URI.encode_www_form(). These handle encoding automatically and prevent URL injection.
Debugging encoded URLs
When URLs appear in logs, error messages, or network inspector, they are often percent-encoded. Decoding reveals the actual parameter values for debugging. A URL like /search?q=hello%20world&category=%E6%8A%80%E6%9C%AF decodes to /search?q=hello world&category=ζζ― (the Chinese word for 'technology'). This converter makes such debugging immediate.
Deep linking and URL sharing
When generating shareable URLs containing user-entered content (search terms, filters, selected options), ensure all values are properly encoded. Unencoded spaces, apostrophes, or special characters in URLs break when copied between different systems (email clients, messaging apps, social media) that apply their own URL parsing. Always encode at URL generation time and test URLs in multiple sharing contexts.
Frequently Asked Questions
% followed by the character's two-digit hex value. A space becomes %20. It ensures URLs remain valid when containing special characters.q=hello world β q=hello%20world.- _ . ~ are unconditionally safe. All other characters should be percent-encoded.