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.
Prepends a specified number of spaces or tabs to each line. Supports indent (add), dedent (remove), and re-indent (normalize to consistent level). Can operate on all lines or only non-empty lines.
Indent: prefix + original_line; Dedent: remove first N chars if whitespace; Re-indent: strip all leading whitespace, then add target indentCommon indent sizes: 2 spaces (JS/CSS standard), 4 spaces (Python/Java), 1 tab (Go, Makefile). Mixing tabs and spaces causes alignment issues across editors with different tab-width settings.
Updated: July 2026
Add 4 spaces to each line of a code block for embedding in a markdown list.
→ Each line prefixed with 4 additional spaces
Dedent over-indented code that was copied from a deeply nested context.
→ Code with 4 spaces indent (8 removed from each line)
Adding whitespace to empty lines creates invisible trailing spaces that fail linter checks and pollute diffs. Only indent lines that have content.
Choose one indentation style (tabs OR spaces) and apply consistently. Mixing causes misalignment when tab width differs between editors (4 vs 8 spaces per tab).
Add or remove indentation from multi-line text uniformly. Align code blocks, nested lists, and quoted passages with configurable indent size and style. It applies the text indentation (Indent: prefix + original_line; Dedent: remove first N chars if whitespace; Re-indent: strip all leading whitespace, then add target indent). For example: indent code for nesting in documentation — Add 4 spaces to each line of a code block for embedding in a markdown list.