---
updatedAt: 2025-05-20T20:28:52.000Z
agentTools:
  projectIndex: https://docs.documotor.com/llms.txt
---

# decode_url

Decode URL-encoded strings

# Definition

`string decode_url(string $string)`

Transforms a URL-encoded string to a UTF-8 decoded string. If `$string` is not URL-encoded, there will be no change.

# Parameters

<Glossary>string</Glossary> `$string`

String to decode.

# Returns

<Glossary>string</Glossary>

If `$string` was URL-encoded, returns the decoded version of it. If not, returns `$string`.

# Examples

```json Sample data
{
  "ChineseEncoded": "%E6%88%91%E5%96%9C%E6%AC%A2%E4%BD%BF%E7%94%A8%E6%96%87%E6%A1%A3%E9%A9%AC%E8%BE%BE",
  "Chinese": "我喜欢使用文档马达",
  "DanishEncoded": "Bl%C3%A5b%C3%A6r%20og%20blomk%C3%A5l",
  "Danish": "Blåbær og blomkål"
}
```

```text Transformation
{
  chineseEncoded: decode_url(ChineseEncoded),
  chinese: decode_url(Chinese),
  danishEncoded: decode_url(DanishEncoded),
  danish: decode_url(Danish)
}
```

```json Result
{
  "chineseEncoded": "我喜欢使用文档马达",
  "chinese": "我喜欢使用文档马达",
  "danishEncoded": "Blåbær og blomkål",
  "danish": "Blåbær og blomkål"
}
```