Back to Actions
Updated
How to Sort a List in Shortcuts on iPhone and Mac
With Actions
- Install Actions, and open it once.
- In your shortcut, add the “Sort List” action below the action that makes the list, and select the list in the action.
- To sort from the end, change “Ascending” to “Descending”.
- Expand the action, and choose the sort type: “Natural”, “Localized”, “Localized Case Insensitive”, or “Number”.
The result is “Sorted List”. “Natural”, the default, sorts text with numbers correctly, like filenames: “006 Bar” comes before “011 Foo”. “Number” needs a list of only numbers, not text that has numbers in it.
Tips
- For a list of dictionaries, use “Sort List of Dictionaries”, which sorts by a key.
- “Reverse List” and “Shuffle List” change the order in other ways.
- If Shortcuts says that it “couldn’t convert from Text to NSString”, change the preview of the result to the list view. This is a bug in the Shortcuts app.
- To remove items that are in the list two times, use the “Remove Duplicates from List” action.
Get Actions
Additional actions for the Shortcuts app
Free
- Platforms
- macOS, iOS, visionOS
- Requires
- macOS, iOS, or visionOS 26 or later
- Category
- Utilities
- Released
- October 2021
- Privacy
- No personal data collected
- Updated
- June 2026
- Version
- 4.2.0
- Size
- 29 MB
- US App Store rating
- 4.8/5 (529 ratings)
Without an app
The “Find” and “Filter” actions of the Shortcuts app have a “Sort by” option for what they return, like the files of “Filter Files”.
If you sort files, photos, or other items that such an action returns, use that. “Sort List” is for a list of text or numbers.
