# text.encode · Rell standard library · Chromia Docs (concept)

> pure function encode(): byte_array Deprecated (for removal): Use 'to_bytes' instead Converts this text to an array of UTF-8 encoded bytes. Since 0.9.0 Alia

Source: https://docs.chromia.com/pages/rell-stdlib/-rell-system-library/root/text/encode/

FUNCTION

# text.encode

```signature
pure function encode(): byte_array
```

**Deprecated** (for removal): Use 'to\_bytes' instead

Converts this text to an array of UTF-8 encoded bytes.

Since 0.9.0

**Alias of** [text.to\_bytes](https://docs.chromia.com/pages/rell-stdlib/-rell-system-library/root/text/to_bytes/)

[View this page on docs.chromia.com](https://docs.chromia.com/pages/rell-stdlib/-rell%20-system%20-library/%5Broot%5D/text/encode.html)Generated API reference, mirrored from the live docs
