---
title: "URLENCODE"
description: "The URLENCODE SQL function of Invantive UniversalSQL encodes a text for use in a URL."
language: en
source_language: en
translation_state: complete
canonical: https://documentation.invantive.eu/en/docs/invantive-universalsql/grammar/sql-functions/urlencode
original: https://documentation.invantive.eu/en/docs/invantive-universalsql/grammar/sql-functions/urlencode
updated: 2026-08-09T00:00:00Z
license: https://documentation.invantive.eu/en/
---

## Syntax
```mermaid
%%{init: {
  'theme': 'base',
  'flowchart': { 'padding': '7', 'nodeSpacing': '20', 'rankSpacing': '20' },
  'themeVariables': {
    'fontSize': '11px',
    'fontFamily': 'Arial'
  }
}}%%
flowchart LR
    Start((START)) --> URLENCODE[URLENCODE]:::quoted
    URLENCODE --> End((END))
```

## Purpose
The `URLENCODE` SQL function encodes a url.

See also [[URLDECODE]].

Parameters:
- Url (`varchar2`): url to encode.

Returns: the encoded url.

## Examples
The following example encodes an URL:
```sql
select urlencode('https://www.nu.nl/?page%2dxx')

---------------------------------------
https%3A%2F%2Fwww.nu.nl%2F%3Fpage%252dxx
```
The following example retrieves `null` since the input is `null`:
```sql
select urlencode(null)

---------------------------------------

```