Grid Arranger
Script for Adobe Illustrator
✦ Available exclusively on Patreon for Pro supporters.
ㅤ
Description
Grid Arranger organizes two or more selected Adobe Illustrator objects into a precise, customizable grid. It combines live arrangement controls, flexible spacing and alignment, alternate row or column offsets, sorting, grouping, and visual inspection tools in one compact dialog.
ㅤ
Features
Build regular or offset grids while keeping control over object order, spacing, alignment, preview behavior, and final output.
- Interactive grid editor — Preview the grid structure, change row and column counts, drag gutter dividers, link gutters, and cycle layout modes from one visual control.
- Flexible dimensions — Set rows or columns from 1 up to the number of selected objects, with the complementary value calculated automatically.
- Signed gutters — Adjust horizontal and vertical spacing from −2000 px to 2000 px, including negative values for overlapping layouts.
- Independent alignment — Align objects left, center, or right horizontally and top, center, or bottom vertically inside cells based on visible bounds.
- Offset layouts — Use Classic, Shift Rows, or Shift Columns and set the alternating offset from −100% to 100% of one grid step.
- Six sorting methods — Order objects by horizontal position, vertical position, total visible size, visible width, visible height, or a randomized sequence.
- Order controls — Reverse deterministic sort results or reshuffle items whenever Random Order is selected.
- Layer-safe grouping — Keep arranged objects separate or create an Elements Grid group within each original source layer while preserving stacking order.
- Live inspection — Toggle live Preview, temporarily hide selection edges, fit the arranged objects in the window, or display dashed grid cells on a temporary layer.
- Built-in user guide — Open a searchable, offline guide from the footer, including dedicated pages for Classic Grid, Shift Rows, and Shift Columns.
- Safe cancellation — Canceling, pressing Escape, or closing the dialog restores the artwork state from before the active preview.
ㅤ

ㅤ
Installation
1. Download the Grid Arranger.jsx script file.
2. Place the script in your Adobe Illustrator Scripts folder:
⮑ Mac: /Applications/Adobe Illustrator (Version)/Presets/(Language)/Scripts
⮑ Windows: C:\Program Files\Adobe\Adobe Illustrator (Version)\Presets(Language)\Scripts
3. Restart Adobe Illustrator if it's already running
4. Access the script via File > Scripts > Grid Arranger
5. Alternatively, run it directly via File > Scripts > Other Script... and browse to the file location
Tip: You can also drag and drop the .jsx file directly onto the Illustrator workspace to run the script instantly – no installation needed.
ㅤ
Using the Script
ㅤ
Launch the Script
Grid Arranger needs an open Illustrator document and at least two selected objects.
- Open the document containing the artwork you want to arrange.
- Select two or more objects with the Selection tool.
- Choose File > Scripts > Grid Arranger, or launch the JSX file directly.
- Use the dialog that opens to configure the grid while Preview shows the result on the artboard.
ㅤ
ㅤ

ㅤ
ㅤ
➊ Select the Artwork
The selection captured when the script starts becomes the working set. Grid Arranger uses each object's visible bounds, including visible strokes and effects, when measuring, sorting, aligning, and placing the objects.
- Select every object that should be included before launching the script.
- Keep objects on their existing layers if their layer organization must be preserved.
- Unlock the artwork and its parent layers before arranging it.
- If no document is open, the script prompts you to open one.
- If fewer than two objects are selected, the script prompts you to make a valid selection.
ㅤ
ㅤ
➋ Set Grid Dimensions
The grid starts with up to four columns. Rows are calculated automatically from the number of selected objects, and changing either dimension recalculates the other so the complete selection still fits.
- Enter an exact value in the Columns or Rows field.
- Drag the corresponding slider or use its arrow buttons.
- Click the Columns or Rows label to add one division.
- Use the row and column minus or plus controls in the interactive grid editor.
- Hold Shift while clicking an editor stepper to change the value by five.
- Double-click or right-click a slider to restore its startup value.
- Keep each value between 1 and the number of selected objects.
For selections of 50 or more objects, continuous slider movement is deferred and the artwork preview updates when the interaction finishes, improving responsiveness.
ㅤ
ㅤ
➌ Adjust Gutters
Horizontal and Vertical gutters control the distance between grid cells. Positive values add space, zero places cells directly beside one another, and negative values create overlap.
- Type a value from −2000 px to 2000 px in either gutter field.
- Drag a gutter slider for continuous adjustment.
- Drag a vertical or horizontal divider in the interactive grid editor.
- Hold Shift while dragging an editor divider to snap the gutter to 5 px increments.
- Click a gutter label to increase its value by 1 px.
- Click the reset dot beside a modified gutter to return it to 0 px.
- Turn on Link Gutters to copy the horizontal value to the vertical gutter and keep both values synchronized.
- Leave Link Gutters off to control each axis independently.
ㅤ
ㅤ
➍ Choose Alignment
Alignment determines where differently sized objects sit within cells based on the largest visible width and height in the selection.
- Choose Left, Center, or Right for horizontal alignment.
- Choose Top, Center, or Bottom for vertical alignment.
- Combine horizontal and vertical settings freely, such as Left with Bottom.
- Watch the interactive grid editor and live artwork preview to confirm the placement.
ㅤ
ㅤ
➎ Choose a Layout and Offset
Layout controls whether alternating rows or columns are displaced from the classic grid. The Offset % control becomes available when Shift Rows or Shift Columns is selected.
- Classic — Keeps every row and column on the standard grid.
- Shift Rows — Moves every other row horizontally.
- Shift Columns — Moves every other column vertically.

ㅤ
- Offset % — Sets the displacement from −100% to 100% of one horizontal or vertical grid step.
- Positive values — Shift alternating rows to the right or alternating columns downward.
- Negative values — Shift alternating rows to the left or alternating columns upward.
- Reset — Click the Offset % label or reset dot to restore the default 50% offset.
You can select a mode from the Layout control or click the layout readout in the interactive editor to cycle through all three modes.
ㅤ
ㅤ
➏ Set Sorting and Output
The selected sort method determines the order in which objects fill the grid from left to right, then from top to bottom.
- Position X — Sorts objects from left to right.
- Width — Sorts objects from widest to narrowest using visible bounds.
- Total Size — Sorts objects from largest to smallest visible area.
- Position Y — Sorts objects from top to bottom and is selected by default.
- Height — Sorts objects from tallest to shortest using visible bounds.
- Random Order — Shuffles the selected objects before filling the grid.
ㅤ
Use the output controls to refine the result.
- Turn on Reverse Order to invert any deterministic sorting method.
- Select Random Order to enable Shuffle and disable Reverse Order.
- Click Shuffle to generate another randomized arrangement.
- Leave the output Ungrouped to preserve separate objects.
- Turn on Grouped to create an Elements Grid group within each original source layer after applying the arrangement.
ㅤ
ㅤ
➐ Preview and Inspect
Preview is enabled by default. Every completed control change removes the previous temporary arrangement, calculates the new result, and redraws the document so preview operations do not accumulate.
- Toggle Preview OFF to restore the artwork to its pre-preview positions while keeping the dialog open.
- Toggle Preview ON to apply the current settings temporarily.
- Use Hide Edges to hide or show Illustrator's selection edges without deselecting the working objects.
- Use Zoom to fit the selected artwork in the active window.
- Turn Zoom off to restore the view center and zoom level captured when the dialog opened.
- Use the grid-cells button to show dashed cell outlines on a locked temporary layer.
- Turn the grid-cells button off to remove the temporary layer.
The dashed grid-cell overlay is for inspection only. It is removed when the dialog closes and is not included in the final artwork.
ㅤ
ㅤ
➑ Apply or Cancel
Finish the operation with the controls on the right side of the action bar.
- Click OK or press Enter to remove the temporary preview, apply one final arrangement, optionally group the result, and close the dialog.
- Click Cancel, press Escape, or close the dialog to undo the active preview and preserve the original arrangement.
- Option-click or Alt-click Cancel to reset Columns, Rows, both gutters, Layout, and Offset % to their defaults without closing the dialog.
ㅤ
ㅤ
➒ Shortcuts and Troubleshooting
Use these keyboard and pointer controls for faster adjustments.
- Press Up or Down in a numeric field to change its value by 1.
- Hold Shift with Up or Down in Columns, Rows, or a gutter field to change the value by 5.
- Hold Ctrl with Up or Down in a gutter field to change the value by 0.1.
- Press Ctrl + Right in Horizontal to copy its value to Vertical.
- Press Ctrl + Left in Vertical to copy its value to Horizontal.
- Use arrow keys in Layout, Alignment, or Sort controls to move between choices.
- Press Home or End in a choice control to select its first or last option.
- Press Space or Enter on a focused icon button to activate it.
- Use a slider's arrows, track, thumb, or mouse wheel to adjust its value.
- Hold Shift while using a slider for larger steps.
- Hold Option or Alt while using a slider for fine adjustment or a direct track jump.
- Double-click or right-click a slider to restore its default value.
ㅤ
If the result is unexpected, check these common causes.
- Overlapping objects usually indicate a negative horizontal or vertical gutter.
- Uneven-looking cells can result from objects with different visible bounds, strokes, or effects.
- A changing random layout is expected whenever Random Order is recalculated; use Shuffle when you want another variation.
- Missing dashed cells can indicate that the grid-cells button is off or the temporary overlay was removed by a preview refresh.
- A script missing from Illustrator's Scripts menu usually requires checking the installation folder and restarting Illustrator.
ㅤ
ㅤ
☻ Wrap-Up
Grid Arranger turns a mixed selection into a structured grid while keeping spacing, alignment, ordering, offsets, and grouping under direct control. Use Preview and the inspection tools to refine the layout safely, then apply the final arrangement with OK or leave the artwork unchanged with Cancel.
ㅤ
ㅤ