Excel functions / Text
ENCODEURL function
Text made safe to put in a web address: spaces become %20, and so on.
Syntax
=ENCODEURL(text)
Arguments
text: The text to encode.
When to use it
ENCODEURL turns text into the form a web address needs: spaces become %20, and other special characters are written as codes. Use it to build links from cell values, such as a search for each product.
Examples
A search link for a product
A B C 1 Product 2 red chair & table https://example.com/search?q=red%20chair%20%26%20table In C2:
="https://example.com/search?q=" & ENCODEURL(A2)→ https://example.com/search?q=red%20chair%20%26%20table
Common mistakes
- Encoding the whole address. Encode only the part that comes from your data. Encoding https:// as well breaks the link.
ENCODEURL in other languages
Excel shows function names in its own language. In these languages it also puts a semicolon between arguments where English has a comma.
- Czech: ENCODEURL
- Danish: KODNINGSURL
- Dutch: URL.CODEREN
- Finnish: URLKOODAUS
- French: URLENCODAGE
- German: URLCODIEREN
- Hungarian: URL.KÓDOL
- Italian: CODIFICA.URL
- Norwegian: URL.KODE
- Polish: ENCODEURL
- Portuguese (Brazil): CODIFURL
- Portuguese (Portugal): CODIFICAÇÃOURL
- Russian: КОДИР.URL
- Spanish: URLCODIF
- Swedish: KODAWEBBADRESS
- Turkish: URLKODLA
Try ENCODEURL in the playground
Related functions
- HYPERLINK: Makes a cell a link: to a web page, an email address, or another cell ("#Sheet2!A1"). Select the cell and click its link button, or Ctrl+click it, to follow the link.
- SUBSTITUTE: Replaces specific text with new text.
- TEXTJOIN: Joins text with a separator between each item.