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

# ETL: GetBytes

> Convert a string input to its byte array representation in a given character encoding. Use GETBYTES for binary data handling in ETL pipelines.

## Description

Returns a byte array for a string input.

## Syntax

`GetBytes(string_expression[, charset_expression])`

## Arguments

*string\_expression* - any string expression

*charset\_expression* - string\_expression indicating the output encoding. The default is UTF-8. See the list of available character sets [here](https://docs.oracle.com/javase/7/docs/technotes/guides/intl/encoding.doc.html).

## Examples

`GetBytes('Hello World')`  returns the byte array of the UTF-8 string 'Hello World'.

## Return value datatype

Byte array

## Impact of null value

If input is null, returns null.
