In Adobe Illustrator, layers and objects are typically arranged in a deliberate order—whether to control stacking, visibility, or design structure. However, in certain creative workflows—especially generative art, abstract layouts, or randomized compositions—you might want to shuffle or randomize the order of layers or objects within a group or on the canvas. Illustrator doesn’t offer a built-in feature to do this, but you can achieve it through a few different methods.
- Using Randomill’s Random Layer Order Function
- Using a Free Random Layer Order Illustrator Script
- Manually Re-arranging Layer Order
Method 1: Randomizing Layer Order with Randomill
Randomill is a versatile randomization plugin for Adobe Illustrator that offers tons of features — including randomizing layer order. Layers can be randomized, reversed, and even sorted based on object position on the artboard.
How to Use Randomill for Layer Order Randomization:
- Select Your Objects: Select the objects you want to re-arrange.
- Launch Randomill: Go to
Window > Extensions > Randomill2. - Expand the Layer Order section: In the Randomill panel, navigate to the “Layer Order” section and enable it using the toggle switch.
- Consider respecting parent layers (optional):
Respecting parent layers allows you to randomize layer order of all selected objects but keep objects within their parent layers. However, objects are only randomized relative to other selected objects so if there’s only one object selected in it’s parent layer and this options is checked, it will remain unaffected. - Apply Changes: Click the “Play” button at the top left of the panel. This will run all enabled scripts. Alternatively, enable the “Separate Play Button” in Randomill’s settings, and click that next to the layer order section header to just run the layer order script.



Pros:
- Has three separate layer order functions, including randomize, reverse, and sort.
- Standalone UI panel that can sit alongside other native Illustrator panels, making your workflow fast and simple.
- Panel stays open, allowing for repeated easy executions.
- Dozens of other features, making Randomill an all-in-one randomizer plugin for Illustrator.
Cons:
- Paid plugin.
Method 2: Using a Free Random Layer Order Illustrator Script
Randomize layer order with a free random color script in Adobe Illustrator:
- Download this script from GitHub. The one linked here is available for free and is basically the Randomill’s random layer order function, available for free as a standalone script. There are several other free layer order scripts out there as well.
- Open Illustrator and select objects.
- Configure options: this script also features the ‘Respect Parent Layers’ option, so check it if needed.
- Open the script: In illustrator, go to
File > Scripts > Other Script…and choose your saved file. - Run the script. Click ‘apply’ to run the script

Pros:
- Free, easily downloadable script.
- Open-source, allowing for editing the script or modifying it to your needs if you know your way around JavaScript.
- Many different scripts available, with a good chance of a script out there for your exact use case.
Cons:
- Single-function only, limiting the scope of the script to only randomizing layer order.
- Slightly cumbersome to run the script and navigate to the script file every time you want to use it.
Method 3: Manually Re-arranging Layers
If you’re working with a small number of objects or layers:
- Select all layers or objects you want to shuffle.
- Use the Layers panel to manually drag and reorder them.
- Optionally, you can use a random number generator to decide their order if needed, since humans are notoriously bad at randomizing things manually.
This method is time-consuming but requires no scripting and can work for quick one-off projects or small sets of objects. Probably not worth it if you can just use the above free script, even for small sets of objects.
