# Take bytes

Takes a slice of the specified number of bytes from the data. Negative values are allowed. Take bytes lives in the **Utils** category of the `fx` menu.

## Parameters

| Parameter          | Type    | Required | Default | Description                                            |
| ------------------ | ------- | -------- | ------- | ------------------------------------------------------ |
| Input              | string  | yes      | —       | Value to transform. Previous step output or a literal. |
| Start              | number  | no       | `0`     | Numeric value. Default `0`.                            |
| Length             | number  | no       | `5`     | Numeric value. Default `5`.                            |
| Apply to each line | boolean | no       | `false` | Disabled by default.                                   |

`Input` is the primary value (previous step output or a literal).

## Returned value

| Type     | Description                              |
| -------- | ---------------------------------------- |
| `string` | Result of the Take bytes transformation. |

## Limitations

- This operation treats Input as raw bytes (binary-capable). Non-text payloads may display differently after decoding.

## Example

<details>
<summary>Run Take bytes</summary>

Takes a slice of the specified number of bytes from the data. Adjust optional parameters when the defaults do not match your payload.

1. Set **Input** to the value to transform (previous step output or a literal).

2. Review **Start**, **Length**, **Apply to each line** and keep defaults unless your format requires otherwise.

3. Confirm **Output value** shows the transformed result.

</details>
