Line ending and whitespace converter
How to use
Paste text or open a local file, pick LF, CRLF or CR, and optionally trim, collapse blank lines, expand or retab indent, or strip a BOM. Pasted text arrives as LF from the browser; open a file to keep CR or CRLF. Nothing is stored or sent anywhere.
About
Mixed endings are reported and can be normalized to LF, CRLF or CR,
or left as they are. Tabs expand to the next tab stop (default width
4, from 1 to 8). Leading spaces convert to tabs in whole-width
groups, with leftover spaces kept. Consecutive empty lines collapse
only when that option is on; a whitespace-only line is not blank
unless you also trim it. Unicode spaces include NBSP and other
space characters, not zero-width characters. Trim also removes
NBSP and those Unicode spaces at the start or end of a line.
Pasted text arrives as LF from the browser; a file opened with
FileReader keeps its original endings, and copy and
download use that converted result rather than the output
textarea. Input is capped at 1,000,000 characters, with a warning
from 200,000. A file whose size is 4 MB or more is rejected
before it is read. A download revokes its object URL afterwards.