BOXUNBAOTools
Simplify everyday tasks.Back to website
ToolboxBatch Text Cleanup

Batch Text Cleanup

Runs in your browser

Remove duplicates and blank lines, sort, and build lists, JSON arrays, or SQL IN clauses.

How to use

Steps

  1. Paste IDs or other strings and choose a separator. Split by newline, comma, or tab. Comma mode also recognizes the Chinese comma.
  2. Choose whether to trim whitespace, remove empty items, or remove duplicates, then keep the original order or sort up or down.
  3. Select an output format and choose Clean up. Check input and output counts, then copy the result into the next tool.

Example

Split the following input by comma, remove empty items and duplicates, and sort ascending. SQL IN list returns ('001', '002', '003').

 003,001,,003,002 

Tips

  • Sorting compares text characters. For example, 10 comes before 2 , and leading zeros are preserved.
  • The SQL IN list includes parentheses and single quotes and can follow IN . Single quotes in the data are doubled. Choose a JSON array when you need to output text containing backslashes.