jquery url query encode code example Example: urlencode jquery var encoded = encodeURIComponent(str);