> ## Documentation Index
> Fetch the complete documentation index at: https://reportana.dev/llms.txt
> Use this file to discover all available pages before exploring further.

# url_encode

### Introduction

The url\_encode filter converts a string into a URL-safe format by encoding special characters according to the percent-encoding standard. This filter is particularly useful when you need to pass dynamic parameters in links, preventing URL breaks or interpretation errors.

### Example of Use

Example of how to use the url\_encode filter to transform a string into a URL-appropriate format:

```twig theme={null}
{% set name = "John Silva & Sons" %}

{{ name|url_encode }}
```

### Output Example of the Code

<img src="https://mintcdn.com/reportana/5BJVYoZmCVc73vbQ/url_encode-en.png?fit=max&auto=format&n=5BJVYoZmCVc73vbQ&q=85&s=8e8f2febba604f69de14258d5eb3350e" alt="Resultado do Filtro `json_encode`" width="291" height="54" data-path="url_encode-en.png" />
