js object to urlencoded code example Example: urlencode javascript var url = encodeURIComponent('url');