Stroke Width Randomizer
✦ Available exclusively on Patreon for Pro supporters.
Script for Adobe Illustrator
ㅤ
Description
The Stroke Width Randomizer is an Adobe Illustrator script that brings dynamic variety to your artwork by randomizing the stroke widths of selected paths within a customizable range. This tool is perfect for creating natural, organic-looking line work, adding visual interest to illustrations, and breaking the mechanical uniformity often found in vector graphics.
ㅤ
Key Features
- Randomize stroke widths within a customizable minimum and maximum range.
- Preview changes in real-time with toggle option.
- Support for simple paths, compound paths, and groups.
- Interactive sliders for easy adjustment.
- Precise numeric input with keyboard shortcut support.
- Full undo capability with Cancel button.
ㅤ


ㅤ
Installation
- Place the script file in your Adobe Illustrator Scripts folder:
⮑ MacOS: /Applications/Adobe Illustrator <Version>/Presets/<Language>/Scripts
⮑ Windows: C:\Program Files\Adobe\Adobe Illustrator <Version>\Presets\<Language>\Scripts
- Restart Adobe Illustrator if it's already running to load the script into the File > Scripts menu.
ㅤ
Using the Script
ㅤ
1. Select Objects.
First, select the objects whose stroke widths you want to randomize. The script works with:
- Regular paths.
- Multiple selected objects.
- Groups containing paths.
- Compound paths.
Note: Only objects with strokes will be affected. Objects without strokes will be ignored.
ㅤ
2. Run the Script
- Go to File > Scripts > Stroke Width Randomizer
- When the dialog opens, you'll see the following controls:
ㅤ

ㅤ
➊ Minimum Stroke Width
The Minimum Stroke Width in the Stroke Width Randomizer script determines the smallest value (in points) that a stroke can be randomized to within the selected range. It acts as the lower boundary for the randomization process.
ㅤ
Functionality:
- When the script applies randomization to the selected objects, the stroke widths are assigned random values between the Minimum Stroke Width and the Maximum Stroke Width.
- If you set a Minimum Stroke Width of, for example, 1 pt, no stroke in the selection will have a randomized stroke width smaller than 1 pt.
ㅤ
How to use:
- 🅰 Slider: Drag the slider to adjust the minimum stroke width. The value will update dynamically in real-time.
- 🅱 Input Field: You can also type a specific value (e.g., 10 pt) into the text field. The slider will update to reflect this value.

ㅤ
ㅤ
➋ Maximum Stroke Width
The Maximum Stroke Width in the Stroke Width Randomizer script determines the largest value (in points) that a stroke can be randomized to within the selected range. It acts as the upper boundary for the randomization process.
ㅤ
Functionality:
- When the script applies randomization to the selected objects, it assigns random stroke widths between the Minimum Stroke Width and the Maximum Stroke Width.
- If you set a Maximum Stroke Width of, for example, 10 pt, no stroke in the selection will have a randomized width larger than 10 pt.
ㅤ
How to use:
- 🅰 Slider: Adjust the slider to set the maximum stroke width, and the value updates dynamically in real-time.
- 🅱 Input Field: Type a specific value (e.g., 90 pt) into the text field, and the slider will reflect this value.

ㅤ
ㅤ
ⓘ Tip: Use the Up Arrow to increase the value and the Down Arrow to decrease it. Hold Shift while pressing the arrow keys to adjust in larger increments (e.g., +10 or -10).
ㅤ
ㅤ
➌ Preview Your Changes
ㅤ
- With Preview checked, you'll see changes update in real-time on your artwork
- Uncheck Preview to temporarily view your original stroke widths
- Re-check Preview to see the randomized strokes again
ㅤ
ㅤ
➍ Confirm or Cancel Changes
ㅤ
Cancel Button
The Cancel button allows you to discard any randomization changes made to the stroke widths and revert all stroke widths to their original values.
ㅤ
Functionality:
- Restores the original stroke widths of all selected objects.
- Closes the dialog window without applying any changes.
When to Use:
- If you want to undo all adjustments made during the session.
- If you accidentally opened the script or changed your mind about randomizing stroke widths.
ㅤ
OK Button
The OK button finalizes the randomization changes you’ve made to the stroke widths within the selected range.
ㅤ
Functionality:
- Confirms and applies the randomized stroke widths as displayed in real-time.
- Closes the dialog window, saving the randomized stroke widths.
When to Use:
- Once you’re satisfied with the randomized stroke widths.
- To confirm and apply the randomization to the selected objects.
ㅤ
ㅤ
➎ Additional Notes
ㅤ
- The Open Guide button in the Stroke Width Randomizer script provides quick access to the user guide for the script. It is represented as a small icon ⏼ in the dialog window’s footer.
- If no objects are selected, or if no strokes are found, an error message will prompt you to select stroked objects.
ㅤ
With this script, you can easily add variation to designs and achieve dynamic, creative effects by randomizing stroke widths across selected objects in Adobe Illustrator.
ㅤ
ㅤ