---
title: bytes split
categories: |
bytes
version: 0.104.0
bytes: |
Split input into multiple items using a separator.
usage: |
Split input into multiple items using a separator.
editLink: false
contributors: false
---
<!-- This file is automatically generated. Please edit the command in https://github.com/nushell/nushell instead. -->
# `bytes split` for [bytes](/commands/categories/bytes.md)
<div class='command-title'>Split input into multiple items using a separator.</div>
## Signature
```> bytes split {flags} (separator)```
## Parameters
- `separator`: Bytes or string that the input will be split on (must be non-empty).
## Input/output types:
| input | output |
| ------ | ------------ |
| binary | list\<binary\> |
## Examples
Split a binary value using a binary separator
```nu
> 0x[66 6F 6F 20 62 61 72 20 62 61 7A 20] | bytes split 0x[20]
╭───┬─────────────────╮
│ 0 │ [102, 111, 111] │
│ 1 │ [98, 97, 114] │
│ 2 │ [98, 97, 122] │
│ 3 │ [] │
╰───┴─────────────────╯
```
Split a binary value using a string separator
```nu
> 0x[61 2D 2D 62 2D 2D 63] | bytes split "--"
╭───┬──────╮
│ 0 │ [97] │
│ 1 │ [98] │
│ 2 │ [99] │
╰───┴──────╯
```