Skip to content

Text

Line Break Converter

Free line break converter. Convert between Unix LF, Windows CRLF, classic Mac CR, HTML <br>, comma- or semicolon-separated lists. 100% client-side.

Runs in your browser
Input
UploadSampleClearExpand input only
Converted
DownloadExpand output only

Understanding line break converters

Three OS conventions, one invisible character.

The thing that ends a line is different on every operating system, and most of the time you don't notice.

LF, CRLF, CR.

Unix and macOS use a single \n (line feed) to end a line. Windows uses \r\n (carriage return + line feed) — a holdover from typewriters and teletype machines, where carriage return moved the carriage left and line feed advanced the paper. Classic Mac OS (System 9 and earlier) used a lone \r, which you almost never see today but might find in a really old file.

When the difference bites.

Most tools are forgiving — modern editors, browsers, and languages handle all three transparently. The places it shows up are: a Git commit on Windows checked out on Mac and the diff explodes; a CSV file from a Windows machine opened in a Unix tool that splits on \n and leaves stray \r at the end of each field; a shell script with CRLF endings that fails because the shebang line ends with \r.

HTML and CSV — special separators.

HTML uses <br> rather than a literal newline; CSV uses commas (with embedded newlines inside quoted fields). The converter understands all of these as either input or output, so you can paste an HTML paragraph with <br> tags and get back a multi-line plain-text version (or vice versa).

The right ending for the destination.

Default to LF for code, configuration files, and anything handed to a Unix tool. Use CRLF for files going to Windows users, especially Notepad (which still struggles with LF alone). Use HTML <br> when the destination is a templated string in a web page. The converter lets you flip between any of these in one pass.

People also search for

Related tools

More in this room.

See all in Text