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