Excel functions / Text

ENCODEURL function

Text made safe to put in a web address: spaces become %20, and so on.

Syntax

=ENCODEURL(text)

Arguments

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

  1. A search link for a product

    ABC
    1Product
    2red chair & tablehttps://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

    Try this example

Common mistakes

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.

Translate a whole formula

Try ENCODEURL in the playground

Related functions