ENCODEURL Function (Gnumeric)
Encode text for URL use with Gnumeric ENCODEURL, preserving the distinction between encoding a component and building an entire address.
Verification status: See the evidence and test scope described in this guide. How formula examples are checked
ENCODEURL produces URL-oriented escaped text. In Gnumeric 1.12.57, it escapes spaces, non-ASCII characters, and percent signs while retaining certain URL delimiters. That last detail matters: do not assume that it encodes an arbitrary query-parameter value in the same way as another spreadsheet application’s ENCODEURL.
Syntax and actual encoding scope
ENCODEURL(string)
string is the text to encode. It may be a quoted literal or a cell reference. The result is text; the formula does not open a browser, fetch a URL, or verify that a destination exists.
The Gnumeric callback passes the input to the GOffice URL-encoding helper in its file/HTTP mode. That helper allows path-reserved characters through while escaping other bytes. The native cases below establish exactly which behavior this guide relies on. A function name or a broad compatibility label is not a substitute for checking the encoded string.
Worked examples
Enter these formulas in a blank sheet:
| Formula | Native result in Gnumeric 1.12.57 |
|---|---|
=ENCODEURL("a b&c") |
a%20b&c |
=ENCODEURL("https://example.com/") |
https://example.com/ |
=ENCODEURL("café") |
caf%C3%A9 |
=ENCODEURL("%20") |
%2520 |
The space becomes %20, but the ampersand remains an ampersand. The colon and slashes in the second example also survive. The accented character is encoded using its UTF-8 bytes. In the final example, the percent sign is itself escaped, so already encoded text is not left unchanged.
If A2 contains the unencoded label café, =ENCODEURL(A2) is the cell-reference form of the third example. Retain the original label alongside its encoded representation; repeatedly encoding the result can produce double encoding.
Advanced use and query-string caution
A URL has components with different delimiter rules. An ampersand inside a query string can separate parameters. Since the tested Gnumeric function retains it, concatenating an arbitrary user value after ?q= may change the meaning of the URL rather than keep the entire value inside one parameter.
Before building a workbook that exports links, identify whether you are encoding a path, a complete address, or a parameter value. For parameter encoding, use a separately verified component-aware encoder in the destination workflow. Do not present ENCODEURL alone as an injection-prevention or URL-validation step.
For an internal audit, place the original and encoded strings in neighboring columns and compare representative cases containing spaces, accented letters, percent signs, and delimiters. This catches assumptions that ordinary alphabetic test data would miss. Encoding is not encryption, and sensitive text remains visible to a recipient who decodes it.
Troubleshooting and limits
- Unexpected
&,/, or:characters can be intentional retained delimiters, not evidence that the formula failed. %2520indicates that%20was treated as input text; avoid re-encoding values already prepared for their destination.- A missing-function error in an older Gnumeric build may reflect version support. Check the version and enabled function modules.
- Empty-string edge behavior is not certified by the bounded tests here; validate or skip empty inputs rather than assuming a particular output.
- Successfully encoded text does not establish a safe scheme, correct host, or reachable page. Perform those checks separately if the result will be used as a link.
Version and verification
The official release notes identify ENCODEURL as new in Gnumeric 1.12.54. The guide’s four literal examples were recalculated by the actual 1.12.57 engine under C.UTF-8 on 17 October 2026. These multi-case checks are headless calculation evidence, not cross-product equivalence. The selected encoding example was additionally displayed in the actual application, as shown below. No retirement or last-supported release is established.
Related guides
CONCATENATE combines text pieces, while TEXT controls number-to-text presentation before an export. Neither substitutes for component-aware URL encoding.
Official references
Native application screenshot
This separate screenshot worksheet uses A2 = a b&c. In B2, =ENCODEURL(A2) returns a%20b&c. The screenshot layout is independent of the cell positions in the earlier tutorial. Only this selected example is GUI-verified; the other checks retain their stated engine-test scope.

Actual Gnumeric 1.12.57 application, captured 17 October 2026. GUI locale was not independently recorded.