# to\_binary

Source: https://zotonic.com/docs/1312/to_binary

URI: https://zotonic.com/id/1312

Language: en



Convert the input to a binary value.

Example:

```django
{{ 42|to_binary }}
```

Results in the binary value `<<"42">>`.

This filter uses the `z_convert:to_binary/1` function.

License: 

Attribution: 

Related resources: https://zotonic.com/api/agent/related/1312?language=en


## API access

- [API help](<https://zotonic.com/api-help>)
- [OpenAPI specification](<https://zotonic.com/openapi.json>)
- [This resource as JSON](<https://zotonic.com/api/agent/resource/1312?language=en>)
