The Excel ENCODEURL function is a Web formula that can convert strings into their URL-encoded versions. The ENCODEURL function is available for 2013 and later versions of Excel on the Windows platform. In this guide, we’re going to show you how to use the Excel ENCODEURL function and also go over some tips and error handling methods.
Supported versions
- Excel 2013 and later versions for Windows. Not available in Excel Online and Excel for Mac.
ENCODEURL Function Syntax
Arguments
text | A string you want to encode. |
ENCODEURL Function Example
A URL (Uniform Resource Locator) is the address of a resource on the world wide web (www). These addresses are formed based on a set of syntax rules. While some characters, including digits(0-9), letters(A-Z, a-z), and some special characters (-, ., _, ~), can be used without issues, some characters are listed to be unsafe (space, \, <, >, {, }), and some others are reserved for different segments of a URL (?, /, #, :).
Encoding helps convert these "disallowed" characters into percent-codes. This way, you can use any character you want.
Using the ENCODEURL function is easy - You only need to provide a string that you want to encode.
Tips
- You can use the ENCODEURL function to generate valid URLs for use with the WEBSERVICE function.
- The ENCODEURL function may appear in the Excel for Mac function gallery, but it actually doesn't work on Mac due to the function's dependencies on Windows operating system features.
Encoded Characters
Unsafe Characters
newline | space | " | % | - | . | < | > | \ | ^ | _ | ` | { | | | } | ~ | £ | 元 |
%0A or %0D or %0D%0A | %20 | %22 | %25 | %2D | %2E | %3C | %3E | %5C | %5E | %5F | %60 | %7B | %7C | %7D | %7E | %C2%A3 | %E5%85%83 |
Reserved Characters
! | # | $ | % | & | ' | ( | ) | * | + | , | / | : | ; | = | ? | @ | [ | ] |
%21 | %23 | %24 | %25 | %26 | %27 | %28 | %29 | %2A | %2B | %2C | %2F | %3A | %3B | %3D | %3F | %40 | %5B | %5D |