---
title: "shuffle · RUAL Documentation"
description: "Shuffles the array in a random sorting."
canonical: https://docs.rual.nl/block-types/array/array_shuffle
language: en
---

# shuffle

This block is part of the [`array`](https://docs.rual.nl/block-types/array) group and was last modified in core [`v10.4.28`](https://docs.rual.nl/core-versions/100428).

Shuffles the array in a random sorting.

- array required `array` The array to be shuffled.

- Array `array` The shuffled array.

Returns a COPY of the array with the elements in uniformly random order; the input is not mutated and the result differs between runs.

| `array sort random` |
| --- |
| `sort random` |

A typical wiring for [shuffle](https://docs.rual.nl/block-types/array/array_shuffle): [with values](https://docs.rual.nl/block-types/array/array_of_values) feeds the `array` pin; the `array` out pin feeds [length](https://docs.rual.nl/block-types/array/array_length).

![Studio canvas example for the shuffle block: typical wiring for shuffle.](https://docs.rual.nl/canvas-examples/array_shuffle.png)

### Version history

Introduced in [`v10.4.28`](https://docs.rual.nl/core-versions/100428).
