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.
Remove duplicate lines from text while keeping unique rows. Clean email lists, URLs, log entries, and data files quickly with this free online tool.
Strip blank and whitespace-only lines from pasted text. Tighten prose, config files, and copied data for cleaner exports without manual editing.
Prepends sequential numbers to each line. Options include starting number, increment, padding style (space-padded, zero-padded), separator character, and whether to number blank lines.
Output = padding(number) + separator + original_line; number += incrementRight-aligned numbers with consistent width improve readability. Width is determined by the largest line number. Zero-padding (001, 002) is useful for file naming; space-padding for display.
Updated: July 2026
Add line numbers to a code snippet for reference in documentation or code review.
→ 1 | first line\n 2 | second line\n...
Convert a plain list of tasks into a numbered list.
→ 1. Task one\n2. Task two\n...
If you have 1000+ lines, numbers 1-9 need different padding than 100-999. Calculate the maximum width upfront and pad all numbers consistently for alignment.
In many use cases (code listing, references), blank lines should not receive numbers. Provide an option to skip empty lines while maintaining the visual structure.
Add line numbers to text automatically. Prefix each row with sequential indices for code snippets, documentation, legal excerpts, and shared references. It applies the line numbering (Output = padding(number) + separator + original_line; number += increment). For example: number code lines for documentation — Add line numbers to a code snippet for reference in documentation or code review.