Newline and Line Converter
Convert CRLF and LF endings, clean whitespace, add line numbers, sort lines, join with spaces or commas, and reveal invisible characters.
This tool runs entirely in your browser. Your input is never uploaded.
What this tool does
This browser-only tool applies one line operation at a time to pasted text. It supports Windows CRLF and Unix LF conversion, removing blank lines, trimming leading and trailing spaces, adding aligned line numbers, natural line sorting, reversing line order, joining lines with a space, comma, or nothing, and revealing invisible characters.
Line ending conversion
CRLF is the Windows line ending and LF is the Unix and Linux line ending. Choose CRLF → LF to normalize Windows text for Unix tools, or LF → CRLF for applications that expect Windows endings. Existing CR-only endings are normalized during LF-to-CRLF conversion.
Line cleanup and ordering
- Remove empty lines removes lines that contain only whitespace.
- Trim line spaces removes leading and trailing whitespace from each line.
- Add line numbers prefixes each line from 1 and aligns the number width.
- Sort lines uses natural, case-insensitive ordering and keeps duplicate lines.
- Reverse lines puts the last line first while preserving the selected newline style.
- Join lines (space) merges all lines into one with a single space between them, across CRLF, LF, and CR endings.
- Join lines (comma) merges all lines into one separated by
,, which is handy for turning a list into CSV-style values. - Join lines (tight) merges all lines into one without any separator, which suits CJK text.
- Remove spaces strips every space and tab while keeping the line structure intact.
- Show invisible characters renders spaces as
·, tabs as→, non-breaking spaces as␣, and CR/LF as␍/␊while keeping the line breaks, so hidden formatting becomes visible.
The tool detects the dominant newline style (CRLF, LF, CR, mixed, or none), keeps a trailing newline when the input has one, and shows counts for CRLF, LF, CR, and total lines.
Privacy
All text stays in the current browser tab. Nothing is uploaded or stored on a server.
Related tools
Text Deduplicator
Remove duplicate lines or words locally in your browser, keep first or last occurrence, and view duplicate counts.
Open ToolFind and Replace
Find and replace text with literal rules, regular expressions, batch replacement, and multiple rule sets.
Open ToolText Statistics
Count characters, Chinese characters, English words, lines, paragraphs, and estimate reading time locally in your browser.
Open Tool