What Is URL Encoding?
URLs can only contain certain safe characters (letters, digits, - _ . ~). Special characters like spaces, ampersands, and Unicode characters must be "percent-encoded" — replaced with a % followed by their hex code. A space becomes %20, and & becomes %26.
Why URL Encoding Matters
- Search queries with spaces:
search?q=hello%20world
- Passing special characters in query strings
- Encoding Unicode characters for international URLs
- Preventing injection attacks via URL parameters
Common Encodings
- Space →
%20
& → %26
= → %3D
/ → %2F
? → %3F
# → %23
Encode or Decode Online
- Open URL Encoder/Decoder.
- Paste your URL or text.
- Click Encode to convert to percent-encoding, or Decode to convert back to readable text.