TechnicalMay 19, 2026
URL Encoding Explained
URLs can only contain a limited set of ASCII characters. Spaces, Unicode text, and symbols like & and = must be percent-encoded (%20 for space, %3D for =) before transmission.
encodeURIComponent vs encodeURI
encodeURIComponent encodes special characters including ? & = — use for individual query parameter values. encodeURI preserves URL structure characters — use for encoding full URLs while keeping slashes and colons intact.
Common Pitfalls
Double-encoding happens when you encode an already-encoded string. In form-urlencoded data, + represents space — decoding must handle this correctly.
WaiHub's URL Encoder supports both functions plus Query ↔ JSON conversion for debugging API parameters.