Back to Free Tools

FREE TOOLS

Sort Lines by Length

Sort lines by codepoint length with stable ties and a complete source-order report.

Pasted text, One UTF-8 text file

sorted-lines.txt, line-order.json

Browser only

Runs locally in your browser. Your files, pasted content and generated output are not uploaded. Reset clears this tool’s working data.

This tool needs JavaScript. If it does not load, refresh the page and try again.

How to use this tool

  • Paste the admitted text or choose one UTF-8 source file. A selected file takes precedence.
  • Choose the explicit operation and options, then inspect the stated conventions and limits.
  • Select Sort lines by length and download sorted-lines.txt, line-order.json.

Examples

Ascending length puts a before cat before zebra; equal-length lines retain their original order.

Limitations

  • At most 200,000 UTF-16 units / 800,000 UTF-8 bytes; 50,000 logical lines and 65,536 units per line; at most 5 MiB complete combined output and 30 seconds. A selected valid UTF-8 file takes precedence over paste. File BOM and original CR/LF spans are preserved for reporting; native textarea input can normalize newlines.
  • The text download uses explicit LF framing. The report preserves source-order and delimiter facts; this is length sorting, without locale or numeric collation.

Related tools

No items found.

More tools for your workflow

Explore the related desktop tool