⬅️ JavaScript 🔗 Stack Overflow
Three options:
escape()
will not encode:@*/+
encodeURI()
will not encode:~!@#$&*()=:/,;?+'
encodeURIComponent()
will not encode:~!*()'
escape
is implemented differently in different browsers?
Modern
There’s also URLSearchParams and URL()
interface