Plain-text line break fixer
Detect CRLF, LF and lone CR in a text file, convert every line break to the ending you need, optionally break lines after sentence marks and strip the BOM or trailing spaces. Fixes the "Windows Notepad shows everything on one line" problem.
Runs in your browserEvery computation happens in your browser — your data never leaves this device.
Pasting turns CR / CRLF into LF (a browser textarea limitation). Use "read from file" below to see the real line endings.
Sentence marks: 。!?;, ! ?, ellipsis and runs of English dots. A single English dot never breaks a line, so decimals and domains stay intact.
Line ending report
CRLF 0 · LF 0 · CR 0 · Lines 0 · BOM No · Lines with trailing spaces 0
Fixed text
Copy the result back into your editor, or save it as a UTF-8 .txt file.
Paste text or pick a file to see the report and the fixed result
Changes: 0
What this tool does
- Convert an LF-only txt file into CRLF so Windows Notepad shows the line breaks
- Repair a paragraph with no line breaks at all by breaking it after sentence marks
- Strip the BOM and trailing spaces from txt files exported by Excel or legacy systems
Example
Input
第一句。第二句。第三句。
Output
第一句。 第二句。 第三句。
The example enables "break lines after sentence marks" and targets CRLF; the visible line breaks look identical, the difference is in the bytes.
Frequently asked questions
Why does pasted text never show CRLF here?
A browser textarea normalizes CR and CRLF to LF when its value is set or text is pasted (the HTML value sanitization algorithm), so the paste path cannot see the real \r. Use "read from file" instead: FileReader.readAsText keeps the original CRLF / CR bytes.
Can sentence breaking damage decimals or URLs?
No. Only Chinese 。!?;, English ! ?, the ellipsis (… or ...) and runs of two or more English dots trigger a break. A single English dot never breaks, so 3.14, 1.2.3 and a.com stay intact.
What is the difference between CR, LF and CRLF?
LF (\n) is the default on Unix / macOS and in modern editors, CRLF (\r\n) is what Windows Notepad style software writes, and CR (\r) is the pre-OS X classic Mac ending. Mixing them causes blank lines or one giant line; converting everything to a single kind fixes it.
Will the result be written back to my file?
No. The page only returns the fixed text and leaves saving it as .txt to you. Nothing besides the filename is read, and the BOM is removed only when you tick that option.
Keywords:line ending convertertxt-crlf