Close Open Paths
Script for Adobe Illustrator
ㅤ
Description
Close Open Paths is a powerful yet simple script for Adobe Illustrator that automatically closes open vector paths in your selection. Whether you're cleaning up imported artwork, fixing incomplete shapes, or preparing files for cutting/printing, this script streamlines the process with an intuitive interface and real-time preview.
ㅤ
Key Features
- Two Closing Methods: Choose between smooth curved segments (with handles) or straight line segments
- Real-Time Preview: See changes before applying them with the built-in preview toggle
- Smart Detection: Automatically identifies open paths in your selection, including those nested in groups and compound paths
- Batch Processing: Close multiple open paths simultaneously
- Visual Feedback: Hide edges option for cleaner preview, zoom-to-fit functionality
- Non-Destructive: Cancel anytime to revert changes
ㅤ
Installation
1. Download the Close Open Paths.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 > Close Open Paths
ㅤ
Tip: For quick access, you can also run scripts via File > Scripts > Other Script... and browse to the file location.
ㅤ
Using the Script:
ㅤ
➊ Prepare Your Document
- Open an Adobe Illustrator document containing paths you want to close
- Ensure your document has content (the script will alert you if the document is empty)
➋ Select Open Paths
- Use the Selection Tool (V) or Direct Selection Tool (A)
- Select one or more objects containing open paths
- The script works with individual path items, grouped objects, compound paths, multiple selections
Note: If nothing is selected, the script will prompt you to make a selection.
➌ Run the Script
- Go to File > Scripts > Close Open Paths
- The script will automatically check for open paths in your selection
- If all paths are already closed, you'll receive a notification
➍ Choose Your Closing Method
The dialog presents two options:
ㅤ

ㅤ
🅰 Smooth joining (with handles)
- Creates curved closing segments that flow naturally with existing curves
- Preserves the organic feel of your paths
- Best for: Illustrations, logos, organic shapes, hand-drawn artwork
ㅤ
🅱 Straight segments (no handles)
- Creates direct straight lines between endpoints
- Produces clean, geometric closures
- Best for: Technical drawings, geometric shapes, architectural plans
ㅤ
➎ Use Preview Features
Preview Checkbox (enabled by default)
- Toggle on: See changes in real-time as you switch between closing methods
- Toggle off: View original paths without changes
ㅤ
Hide Edges Checkbox
- Toggle on: Hides path outlines for a cleaner view of fills and strokes
- Toggle off: Shows path edges and anchor points
- Useful for evaluating the visual result without distractions
ㅤ
Zoom Button ✚
- Click to fit your selection in the window
- Helps you see the full effect of path closures
- Automatically adjusts zoom level for optimal viewing
➏ Apply or Cancel
OK Button
- Applies the selected closing method to all open paths
- Switches back to the Selection Tool
- Changes are permanent (use Undo if needed)
ㅤ
Cancel Button
- Reverts all paths to their original state
- No changes are made to your document
- Switches back to the Selection Tool
Best Practices
- Preview First: Leave the Preview checkbox enabled to experiment with both closing methods before committing
- Zoom for Detail: Use the zoom button to inspect how endpoints connect, especially for complex paths
- Batch Workflow: Select multiple objects at once to close all open paths in one operation
- Undo Safety: If you're not satisfied with the result, simply press Cmd/Ctrl+Z to undo
- Nested Paths: The script automatically finds open paths within groups and compound paths—no need to ungroup first
☻ Wrap Up
Close Open Paths simplifies a tedious manual task into a single click. Whether you're cleaning up imported artwork or preparing files for production, this script gives you the control and flexibility to close paths exactly how you need them – with smooth curves or straight lines.
Install it once, and it becomes an essential part of your Illustrator workflow.
ㅤ
ㅤ
1 comment
Hello, when I install “close open path” in my scripts folder, and run it on an open path, it closes the path but does not give me any dialog box or options. (newest illustrator, newest mac os) also when I put it in scripts folder, it doesnt add to scripts window, I have to navigate to it using “other scripts” dialog…