I was struggling with the same issue, there are plenty of online tools that will ''sort by length'' simple single cell/column of data...
But nothing that can process multiple rows of data, in CSV, TXT - comma-separated, or tab-delimited Excel/Sheet files that I have, so that ALL data is sorted according to specific ''ROW'' of data that I want to sort by length.
This online browser-based tool- https://chathelp.ai/tools/sort-csv-txt-column-by-character-length/
Was able to get the job done, it executed in the browser but still worked for my multi-row 40mb+ CSV files, as well as for single-line text files.