ENCODEURL in Excel: Encode URL Data on Windows
Use Excel ENCODEURL on supported Windows versions, build query values without encoding URL structure and understand percent-encoding limits.
Verification status: See the evidence and test scope described in this guide. How formula examples are checked
Quick answer: ENCODEURL(text) returns URL-encoded text on supported Windows Excel versions. Microsoft explicitly excludes Excel for Mac and Excel for the web. Use it on data components when building a URL, rather than automatically encoding the entire address.
Availability and version history
- Introduced: the Microsoft function catalogue marks this identity as an Excel 2013 addition. An exact first build or preview date is not established.
- Availability: official help lists Excel for Microsoft 365, Excel 2024, Excel 2021, Excel 2019, Excel 2016. Microsoft explicitly excludes Excel for Mac and Excel for the web; appearing in the Mac gallery does not make it operational.
- Checked: October 14, 2026; official ENCODEURL reference. Documentation and independent models; no native Excel execution or wider platform certification.
Syntax and platform restriction
=ENCODEURL(text)
Microsoft’s documented example replaces a colon with %3A, each slash with %2F and spaces with %20, while retaining ordinary letters, digits and periods. These transformations are percent-encoding: a percent sign followed by a hexadecimal byte value.
The function produces text. The examples here construct strings only; they do not contact a website, fetch a service, certify an API or require an account. The reference’s historical web-service example is not treated as a currently available service recommendation.
Example 1: encode a small set of text values
Enter the following strings in A2:A5. In B2 use =ENCODEURL(A2) and fill through B5:
| A: source text | Expected encoded string |
|---|---|
| Annual report.xlsx | Annual%20report.xlsx |
| North Zone | North%20Zone |
| Team/West | Team%2FWest |
| Phase:2 | Phase%3A2 |
For the first row, the space has ASCII value 32, hexadecimal 20. The slash in the third row is decimal 47, hexadecimal 2F, and the colon in the fourth is decimal 58, hexadecimal 3A. Those independent byte calculations corroborate the transformations shown by Microsoft’s example.
Encoding preserves the information in these strings; it does not remove the spaces or replace them with arbitrary punctuation. Decoding the listed percent triplets reconstructs the original characters under the stated ASCII scope.
Example 2: keep URL structure outside the encoded value
Put North Zone in D2. In E2 enter:
="https://example.com/search?q="&ENCODEURL(D2)
The constructed text is https://example.com/search?q=North%20Zone. The fixed scheme, slashes, question mark and equals sign remain structural characters. Only the supplied search value is encoded.
This is a fictional URL construction example, not a claim that the destination implements that search. No navigation is necessary to verify the string.
For comparison, =ENCODEURL("https://example.com/Annual report.xlsx") models the encoded data string https%3A%2F%2Fexample.com%2FAnnual%20report.xlsx. That is appropriate when a whole URL is being carried as a value inside another context, but it is not the same text as the original address that a user would normally open.
Advanced example: two independently encoded values
Set G2 to North Zone and H2 to Phase:2. Use:
="https://example.com/report?region="&ENCODEURL(G2)&"&stage="&ENCODEURL(H2)
The result is https://example.com/report?region=North%20Zone&stage=Phase%3A2. The ampersand joins two query fields; it was supplied as structure rather than coming from either source value.
That separation matters because URL syntax uses reserved characters as delimiters. The IETF URI specification explains percent triplets and the need to distinguish component data from delimiters. The specification establishes the general model; it does not independently certify every character treatment in Excel’s Windows implementation.
Avoid accidental double encoding
Keep raw input in one column and encoded output in another. Do not feed the already encoded output through ENCODEURL again as a routine cleanup step. A literal percent character is itself encoded as %25 in the URI model, so encoding North%20Zone again would conceptually produce North%2520Zone instead of representing the original space once.
That double-encoding string is an independently modeled URI illustration, not a native Excel boundary test. The reliable workflow is to know whether a field is raw or already encoded and apply the conversion exactly where the receiving format expects it.
Limits and troubleshooting
If the function appears in a Mac gallery but does not calculate, Microsoft’s Windows dependency explains the discrepancy. Do not mistake a listed function name for cross-platform support.
The short reference does not enumerate all unreserved-character choices, empty-input behavior, maximum lengths or error codes. Non-ASCII text, embedded percent sequences and characters beyond the demonstrated ASCII subset require testing in the intended client and receiver; no universal native behavior is claimed here.
Percent-encoding is reversible representation, not encryption. Avoid putting secrets or private data into URLs merely because their characters are encoded. Use SUBSTITUTE only for a separately specified replacement task; replacing spaces alone is not a general URL encoder. UNICODE can inspect a character identity, but it is not a complete byte-encoding or URL-construction routine.
References and verification
Expected outputs are independently calculated examples or documented rules, not captured native Excel results. Formulas use English function names and comma argument separators. Locale, rendering and boundary restrictions are stated where relevant.