The current version of Notepad++ (at the time of this writing) is 6.6.3. Version 6.5.2 is the first that introduced a native (without a plugin) sorting function. At least, that's what they claim; even though we're nine releases after version 6.5.2, I have found nothing about this feature:

  • There is no sign of it in the menu (or I am blind),
  • There isn't even a word in Notepad++ documentation (online help).

Everything I read around the Internet (including this answer) still talks about sorting lines using the TextFX plugin. There isn't anything about a native (QuickSort-based) function.

So: How do I sort lines in Notepad++ without using the TextFX plugin?


1 Answer 1


The proper menu option is as follows.

For all versions prior to 6.8.3:

Menu EditLine OperationsSort Lines in Ascending / Descending Order

For version 6.8.3 and following:

Menu EditLine OperationsSort Lines Lexicographically Ascending / Descending

Sort lines lexicographically

Select a few lines to sort just the selection. If there's no selection, your entire file will be sorted.

  • 6
    Can't believe I've used Notepad++ for this long without knowing about this! Aug 3, 2016 at 13:58
  • 11
    For some weird reason this didn't work for me. I'm on Windows but my text had LF line endings only (text pasted from browser). To work around it I had to convert all Line endings to Unix, then back to Windows, then the sort worked.
    – pgr
    Jan 26, 2017 at 12:51
  • 1
    @trejder The fact that I had to convert one way and then back tells me the real problem is Notepad++'s realization of what kind of document it's working with. Maybe pasted text that hasn't been saved yet is an edge case. But it's definitely a bug, yes.
    – pgr
    Jan 28, 2017 at 10:33
  • 4
    The next question could be whether it is possible to sort in a case-insensitive way... Jul 20, 2018 at 12:50
  • 2
    The sort function is not working correctly, it sorts like this: addCartLink bindPager setItemsTitle addTab
    – Black
    Oct 9, 2018 at 14:10

You must log in to answer this question.

Not the answer you're looking for? Browse other questions tagged .