Line Operations
Sort, clean up, decorate, join, split and filter lines of text — like an editor's line menu.
Input
Output
Operation reference
- Sort uses locale-aware ordering. Natural sort compares digit runs as numbers, so
file2comes beforefile10. With Case sensitive off, letters differing only in case are ordered together. - Remove duplicate lines keeps the first occurrence. Turn off Case sensitive to treat
Appleandappleas the same. - Empty lines have no characters at all; blank lines may contain spaces or tabs.
- Remove from start / end strips the given text if a line begins / ends with it; leave the text empty to cut a fixed number of characters instead.
- Number lines replaces every
{0}in the format with the line number, e.g.{0}.,[{0}]or#{0}\t(escapes are supported in the format). - Join / Split delimiters accept the escapes
\n,\t,\rand\\. - Regex filters use JavaScript syntax with the Unicode flag; Case sensitive off adds the
iflag. Filtering runs in a background worker; a pattern that takes longer than 1.5 seconds (catastrophic backtracking) is stopped. - A single trailing line break in the input is ignored so it does not become an extra empty line.
About this tool
Pick an operation and the output updates as you type. Use Use as input to chain several steps — for example trim, remove blank lines, sort and then remove duplicates.
Privacy
All processing happens in your browser. Nothing you type is sent, stored or logged.