Hongmu Notes

🔤 Text line sorting and shuffling

Sort by rows in ascending, descending or random order, the three modes can be used at any time.

Text line sorting and shuffling

Instructions for use

  • Paste multiple lines of text and click "Sort Ascending", "Sort Descending" or "Shuffle Randomly"
  • Comparing text character by character: 10 will come before 2
  • Empty lines will be automatically discarded, and whitespace at the beginning and end of the line will be removed.

What can this tool do?

  • Sort text by row: ascending, descending or shuffle randomly
  • Automatically remove leading and trailing whitespace and discard empty lines
  • The result is one per line, and the number of lines is the same as the original data (excluding blank lines)
  • Results can be copied with one click for easy pasting back into tables or lists

Actual measurement effect

inputOperationresult
3
1
2
Ascending order1
2
3
1
2
3
descending order3
2
1
1
2
3
shuffle randomlyThe order is random and the content remains unchanged.

All three modes only rearrange rows, without adding or deleting any content (except blank rows).

Usage tips

  • When sorting by text, 10 will be ranked before 2. For numerical sorting, please use the numerical sorting tool.
  • The result of random shuffling is different every time. If you need to fix the order, use ascending or descending order.
  • Shuffling can be used for drawing lots and random checks, but it does not guarantee that it will not be repeated every time.

All keywords and tutorials 12

❓ FAQ

What are the three modes?
In ascending order, the characters at the beginning of the line are sorted from small to large, and in descending order, the order is not sorted but randomly rearranged.
Is the comparison based on numbers or text?
Compares literals character by character (consistent with lexicographic order). Therefore, 10 will be ranked before 2; to sort by numerical value, please use the "Sort Numbers from Largest to Smallest" tool.
Will blank lines be preserved?
No. The leading and trailing blanks of each line are removed first, and the blank lines are discarded, so there will be no blank lines in the result.
Will the data be uploaded?
No. Sorting and shuffling are done locally in the browser, and the text does not go through the server.