Sign in with Microsoft
Sign in or create an account.
Select a different account.
You have multiple accounts
Choose the account you want to sign in with.

The ENCODEURL function returns a URL-encoded string, replacing certain non-alphanumeric characters with the percentage symbol (%) and a hexadecimal number.


  • The ENCODEURL function is not available in Excel for the web or Excel for Mac.

  • The ENCODEURL function may appear in Excel for Mac's function gallery, but it relies on Windows operating system features, so it will not return results on Mac.



The ENCODEURL function syntax has the following argument.





A string to be URL encoded


Here is a simple example, which references an Excel file on a Microsoft SharePoint server. 

=ENCODEURL(" and Loss Statement.xlsx")

 Which results in:  

You can also use the ENCODEURL function in conjunction with the WEBSERVICE function. For example, you can use the api service to return information about a company stock:


Where you have a stock ticker in cell C2.

You can then use the FILTERXML function to extract specific data about that stock. For example, to get the Last Price of the stock ticker in cell C2, you can use:


Need more help?

You can always ask an expert in the Excel Tech Community or get support in Communities.

See Also

FILTERXML function


Need more help?

Want more options?

Explore subscription benefits, browse training courses, learn how to secure your device, and more.

Communities help you ask and answer questions, give feedback, and hear from experts with rich knowledge.

Was this information helpful?

What affected your experience?
By pressing submit, your feedback will be used to improve Microsoft products and services. Your IT admin will be able to collect this data. Privacy Statement.

Thank you for your feedback!