xcsort is an Xcode extension that sorts lines of text.
0. Enable the extension in System Preferences - Extensions;
1. Open a source code file, a JSON data file, or a text file in Xcode;
2. Select several lines of text;
3. Choose "Editor" - "xcsort" - "Sort Lines" menu command to sort the selected lines.

Sorting lines of code is useful to keep #import lines organized and avoid conflicts. When 2 people change a code file they might want to add a new #import line at the same time (at the end of the #include statements block) and will get conflicting changes. If the #import lines are sorted the chance of such conflict is smaller.

When working with text data files sometimes you might want to sort lines of a list, properties of a dictionary, or named constants. The xcsort extension can sort selected text in a file alphabetically. It is especially useful with longer lists or long lines when sorting manually becomes tedious.

This extension requires Xcode 8 or newer to work. See additional instructions on the support webpage.

What’s New

Version 1.4

Fix support for Xcode 12. Requires macOS 10.15+.

App Privacy

The developer, Daniel Lazarenko, indicated that the app’s privacy practices may include handling of data as described below. For more information, see the developer’s privacy policy.

Data Not Collected

The developer does not collect any data from this app.

Privacy practices may vary based on, for example, the features you use or your age. Learn More


  • Family Sharing

    Up to six family members will be able to use this app with Family Sharing enabled.

More By This Developer