Tools you might need next
Sort lines alphabetically or numerically in any text list. Free online line sorter for cleaning datasets, organizing names, and preparing sorted output.
Add line numbers to text automatically. Prefix each row with sequential indices for code snippets, documentation, legal excerpts, and shared references.
Remove duplicate lines from text while keeping unique rows. Clean email lists, URLs, log entries, and data files quickly with this free online tool.
Wraps text at a specified character width without breaking words. Scans forward to the wrap point, then backtracks to the last whitespace boundary. Long words exceeding width are force-broken with a hyphen.
For each line: if length > width → find last space before width → break; if no space → force break at width-1 + hyphenSoft wrap (display only, no inserted characters), hard wrap (inserts newline characters), and greedy vs optimal wrapping (Knuth-Plass algorithm minimizes raggedness).
Updated: July 2026
Format a long paragraph to 80 characters per line for plain-text email RFC compliance.
→ Text wrapped at word boundaries within 80 columns
Format commit message body to git recommended 72-character width.
→ Properly wrapped commit body per git best practices
URLs and code should not be wrapped as they become non-functional or unclear when split. Detect URL patterns and either keep them on one line or use a URL shortener.
Hard wrapping inserts actual newline characters in the text, which causes problems if the text is later reflowed (email clients, resized windows). Use soft wrap for display-only formatting.
Wrap text to a custom line width with smart word breaks. Reformat paragraphs, comments, and README content for terminals, emails, and narrow layouts. It applies the word wrap algorithm (For each line: if length > width → find last space before width → break; if no space → force break at width-1 + hyphen). For example: wrap to 80 columns for email — Format a long paragraph to 80 characters per line for plain-text email RFC compliance.