Magic Tools
Document ProcessingBy CooconApril 22, 2026155 views3 min read

How to Use the Text Sorting Tool: One-Click Sorting by Alphabet, Length, and Random Shuffle

What Kind of Content is the Text Sorting Tool Suitable For?

When you have a list of words, a batch of tags, a set of import names, or a pile of keywords, the most troublesome part is often not the content itself, but the messy order, too many duplicates, and many blank lines. Manual sorting is slow and error-prone.

MagicTools' text sorting tool is designed for such 'line-by-line processing' tasks.

What Operations Are Supported?

In tools.cooconsbit.com/tools/text-sorter, each line is treated as an independent item. You can combine these functions:

  • A → Z: Sort in ascending order
  • Z → A: Sort in descending order
  • Length ↑: Sort by length from short to long
  • Length ↓: Sort by length from long to short
  • Shuffle: Randomly shuffle
  • Remove Duplicates: Remove duplicates
  • Remove Blank Lines: Remove blank lines
  • Trim Lines: Trim spaces from the beginning and end of each line

What Are the Most Practical Uses?

Organizing Keyword Lists

When doing SEO, advertising, or content topic selection, you often need to organize a bunch of keywords. First, check Trim Lines and Remove Duplicates, then sort by A-Z, and the list will immediately become much cleaner.

Processing Exported Name Lists

Name lists copied from spreadsheets often come with extra spaces and blank lines. Use this tool to clean them first, then sort, making subsequent imports more hassle-free.

Random Drawing or Random Question Generation

If you just want to randomly shuffle a name list, question bank, or options, simply select Shuffle, and there's no need to look for other random tools.

If your goal is to get a 'clean' result, the recommended order is:

  1. First, enable Trim Lines
  2. Then, remove blank lines
  3. Next, remove duplicates
  4. Finally, sort or shuffle

This can reduce situations where 'they look the same but are not actually deduplicated' due to different spaces.

What Details Are Worth Noting?

First, the tool processes entire lines.
If a line contains multiple fields, such as "name, phone number, email", it won't sort only the name, but treats the entire line as a whole.

Second, random shuffling is suitable for temporary use.
If you need a reproducible random order, it is recommended to keep a copy of the results.

Third, length sorting is particularly suitable for filtering titles and copy.
When you want to find the shortest title, longest tag, or overly long field content, this function is very practical.

Frequently Asked Questions (FAQ)

Q: Can it handle Chinese?

A: Yes. Mixed content of Chinese, English, and numbers can all be sorted.

Q: Which line is kept when deduplicating?

A: The line that appears first in the current processing order is kept.

Q: Is it suitable for thousands of lines of content?

A: Common keyword lists, name lists, and classification lists can all be processed directly.

Summary

The text sorting tool may seem simple, but it is very frequently used when processing keywords, name lists, tags, and exported lists. Especially having sorting, deduplication, and blank line removal in one page is more direct than performing back-and-forth operations in spreadsheet software.

Access address: tools.cooconsbit.com/tools/text-sorter

Related Articles

Blocking rm -rf in Claude Code: A Deny Rule Stopped 14 Deletes in Two Weeks, 7 Other Spellings Still Get Through, and a Hook That Closes the Gap

To keep Claude Code from deleting things by accident, I added a deny rule, Bash(rm -rf *), to my global settings. Across my sessions from October 7 to 21 it blocked 14 deletes. After each denial the model picked a new directory name 8 times and dropped the delete 6 times. It never tried another spelling. Then I replayed 22 delete commands verbatim against Claude Code 2.1.285 through a stub. rm -fr, rm -r -f, rm -Rf and rm -r deleted the directory in manual, auto and bypass mode alike. /bin/rm, find -delete and bash -c deleted it in manual and bypass mode. In auto mode, rm -fr inside the working directory skips the classifier because it 'would be allowed in acceptEdits mode'. A second, built-in dangerous-rm check fires on targets like $D/*, even in bypass mode, but loses track of a variable assignment when a heredoc comes earlier in the same command. The post ends with a PreToolUse hook that blocks every recursive spelling in all three modes and tells the model what to do instead.

claude-codehooks+5
pitfallsOct 21, 20268 min
208

The Self-Reinforcing Flywheel Is Harder Than It Looks: 40 Days of an LLM Auto-Tuning Loop

We ran an 'LLM proposes, code decides' auto-tuning loop on a daily WeChat newsletter for 40 days: 18 versions, 8 rollbacks. Three of those rollbacks overturned decisions a human had made, and one version whose knobs were identical to its parent still got rolled back. Using our real numbers, telling apart a 20% difference needs about 25,000 reads per version. At 60 reads a day, that is more than 400 days. This postmortem covers five reasons the flywheel never turned, and what actually moved the numbers.

wechatpostmortem+4
pitfallsOct 21, 20268 min
133

Dev Breakfast · 2026-10-21

Today's headline: A single "bonsoir, Elliot" makes the model leak its .env: a backdoor for under $50. Plus 4 more: DeepSeek open-sources its inference engine: V4.1 Flash only, and KV cache still missing; TorchTPU goes open source: PyTorch models can run directly on TPU; and more.

daily-intelOct 21, 20268 min
446

Dev Breakfast · 2026-10-20

Today's headline: Should You Merge AI Code You Don't Understand: Settle the Abstraction Layer Yourself First. Plus 4 more: tmux as a Remote Control: Multi-Session Claude Code and send-keys; headroom Goes Open Source: 95% Token Savings on JSON, Only 20% for Coding Agents; and more.

daily-intelOct 20, 20265 min
415

Published by Magic Tools