Ungroup All Groups
Script for Adobe Photoshop
ㅤ
Description
Ungroup All Groups is a powerful Adobe Photoshop script that allows you to intelligently ungroup layer groups (including nested ones) in your currently active document. The script features an intuitive multiselect listbox dialog that lets you pick exactly which groups to ungroup, with full control over the ungrouping process. Perfect for cleaning up complex group hierarchies and flattening nested structures with precision.
ㅤ
Features
- Multiselect List: Interactive layer group list with full path display for easy identification.
- Intelligent Nesting: Smart handling of nested and deeply nested group hierarchies.
- Quick Selection: Dedicated buttons to Select All, Deselect All, and Invert Selection for rapid management.
- Error Handling: Graceful management of locked or inaccessible groups without disrupting the workflow.
- Real-Time Counter: Live selection counter showing exactly how many groups are currently selected.
- Detailed Feedback: Comprehensive summary of any groups that couldn't be ungrouped during the process.
- Unlimited Depth: Full support for resolving layer groups with unlimited nesting depth.
ㅤ
Installation
1. Download the Ungroup All Groups.jsx script file.
2. Place the script in your Adobe Photoshop Scripts folder:
⮑ Mac: /Applications/Adobe Photoshop (Version)/Presets/Scripts/
⮑ Windows: C:\Program Files\Adobe\Adobe Photoshop (Version)\Presets\Scripts\
3. Restart Adobe Photoshop if it's already running.
4. Access the script via File > Scripts > Ungroup All Groups
ㅤ
Using the Script
ㅤ
➊ Opening the Script
Launch Adobe Photoshop and open your document containing the layer groups you want to ungroup.
To run the script:
- Navigate to File > Scripts > Ungroup All Groups.
- The script dialog will open.
- The script will automatically scan your document and display all available groups in the dialog window.
ㅤ

ㅤ
➋ Understanding the Groups List
The dialog displays all groups found in your document in a multiselect listbox.
Key details of the list include:
- Group Name & Indentation: Indicates the nesting depth of each group.
- Hierarchy Level: Groups are displayed with a rightwards arrow (⇳) prefix.
- Full Path Tooltip: The full path of each group (including parent groups) is visible when you hover over any group name.
ㅤ
ㅤ
➌ Selecting Groups to Ungroup
You have full control over which groups to select for the ungrouping operation. By default, all groups are pre-selected when the dialog opens. The selection counter at the top of the dialog shows how many groups you have selected out of the total number found.
Methods for selecting groups:
- Single Selection: Click on individual groups to select or deselect them.
- Multiple Non-consecutive Selection: Hold Ctrl (or Cmd on Mac) while clicking.
- Range Selection: Hold Shift while clicking.
ㅤ
ㅤ
➍ Using Selection Buttons
Use the three selection buttons below the groups list for quick selection management. These buttons are automatically enabled or disabled based on your current selection state.
Available selection actions:
- Select All: Selects every group in the list.
- Deselect All: Removes all selections.
- Invert Selection: Reverses your current selection, selecting all unselected groups and deselecting all selected groups.
ㅤ
ㅤ
➎ Executing the Ungroup Operation
Once you have selected the groups you want to ungroup, click the Ungroup button to start the process.
The script follows this sequence:
- Processes nested groups from deepest to shallowest.
- Ensures nested groups are properly flattened before their parent groups.
- Skips any groups that cannot be ungrouped (e.g., due to being locked).
- Displays a summary message listing any groups that were skipped.
ㅤ

ㅤ
➏ Handling Locked or Inaccessible Groups
If a group is locked or otherwise inaccessible, the ungrouping process will safely handle it.
What to expect:
- The script will skip the inaccessible group and continue with others.
- At the end of the operation, an alert message will list all groups that could not be ungrouped.
- To resolve this, you can manually unlock these groups in the Layers panel and run the script again.
ㅤ
ㅤ
☻ Wrap-Up
Ungroup All Groups simplifies the process of flattening complex group hierarchies in your Photoshop documents. By giving you precise control over which groups to ungroup and handling nested structures intelligently, this script saves you time and reduces the risk of accidentally ungrouping the wrong groups. Take advantage of the selection buttons and path display to work efficiently with your document structure.
ㅤ
ㅤ