EmEditor provides powerful and fast sorting functions. Sorting can be done by entire lines or by a specific column in a CSV document. You can also sort horizontally by sorting the cells in a single row. Sorting is fast, even on large files.

Sort types

EmEditor supports sorting by these types of values:

  • String (A to Z)
  • Numerical
  • String length
  • Word count
  • Date and time
  • Occurrence count
  • IP address

They can be accessed through the Sort toolbar or the Sort menu.

Sort a CSV document

Sorting a CSV document by a column is very simple.

  1. Go to CSV mode.
  2. If the first row is a heading of column labels, enable headings in CSV > Headings (Freeze Panes) > Column Heading 1.
  3. Select a column by clicking on the header above the first row.
  4. Select a sort command as shown above.

Advanced Sort

Opening the Advanced Sort dialog (Sort > Advanced Sort…) gives you with more options on sort priority. Let’s say you want to sort by the Date column first, and if two dates are equal, sort by Name. You can do this by creating two entries, with the higher priority sort at the highest position.

Sort Columns

The Sort > Sort Columns… function gives you the ability to sort in the horizontal direction. This may be useful if you need to order the column labels.

Sort options

EmEditor provides options to customize how strings and values are treated when sorting, such as ignore case or the locale to use. Stable sort can be enabled if required, or disabled to optimize the sort time.