Skip to Content
Back to Actions

Updated

How to Sort a List in Shortcuts on iPhone and Mac

With Actions

  1. Install Actions, and open it once.
  2. In your shortcut, add the “Sort List” action below the action that makes the list, and select the list in the action.
  3. To sort from the end, change “Ascending” to “Descending”.
  4. 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

Download on the App Store

Free

Platforms
macOS, iOS, visionOS
Requires
macOS, iOS, or visionOS 26 or later
Category
Utilities
Released
October 2021
Updated
June 2026
Version
4.2.0
Size
29 MB
US App Store rating
4.8/5 (529 ratings)

More about Actions

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.