Free tool · works now

Line-Ending Normalizer

Standardize CRLF, LF, and CR line endings, strip invisible UTF-8 BOMs, and purge zero-width characters.

Runs 100% in your browser. Standardize CRLF, LF, and CR line breaks, strip invisible UTF-8 Byte Order Marks (BOM), purge zero-width spaces, and clean trailing whitespace safely.

25Total lines
MixedSource break profile
1Zero-width chars
1NBSP characters
NoneBOM status
Purged 1 invisible zero-width character(s) (\u200B/\u200C/\u200D) copied from external rich-text.
Converted 1 non-breaking space character(s) (\u00A0) into standard ASCII spaces.
Resolved mixed line endings (20 LF, 3 CRLF, 1 CR) into uniform LF.
Input text or MarkdownEditable
Normalized outputCleaned

Line break and encoding breakdown

Detailed character accounting across source and converted streams
MetricSource countSanitization actionStatus
Line Feed (LF, \n)20Standard Unix newline breakAnalyzed
Carriage Return + Line Feed (CRLF, \r\n)3Normalized to target break formatAnalyzed
Carriage Return (CR, \r)1Legacy Mac break normalizedAnalyzed
UTF-8 Byte Order Mark (BOM, \uFEFF)NoneStripped from document startClean
Zero-width characters (\u200B, \u200C, \u200D)1Purged from document contentPurged
Non-breaking spaces (\u00A0)1Converted to standard ASCII spaceConverted

The hidden friction of line breaks and invisible Unicode

Line endings are among the oldest architectural fault lines in computing. In the 1970s, Unix chose the single Line Feed character (\n, ASCII 0x0A) as its universal newline delimiter. Microsoft MS-DOS and Windows adopted the teleprinter convention of Carriage Return followed by Line Feed (\r\n, ASCII 0x0D 0x0A). Classic Apple Macintosh systems initially relied on a bare Carriage Return (\r).

Today, cross-platform developers and writers frequently collaborate across macOS, Windows, and Linux. When files are opened, edited, and committed without uniform line ending standards, version control systems experience churn. A single save on a Windows workstation can alter the newline byte on every line of a 10,000-line Markdown vault, resulting in massive phantom Git diffs that obscure genuine content revisions.

Beyond line breaks, copying text from web pages, PDFs, and chat clients silently injects invisible Unicode artifacts. The most notorious is the UTF-8 Byte Order Mark (\uFEFF), which causes YAML frontmatter parsers in Obsidian and static site generators to crash because the opening frontmatter delimiter (---) is preceded by hidden bytes.

Sanitization capabilities and preservation rules

The Line-Ending Normalizer provides deterministic, configurable cleanup designed specifically for technical writers and developers:

  • Uniform Line Ending Normalization: Converts mixed documents containing both LF and CRLF line breaks into a single consistent format: Unix LF (standard for modern macOS, Linux, and Git), Windows CRLF, or classic CR.
  • UTF-8 Byte Order Mark (BOM) Stripping: Removes leading \uFEFF bytes from the document start, ensuring compatibility with strict frontmatter parsers in Astro, Jekyll, Hugo, and Obsidian.
  • Zero-Width Space Purging: Detects and removes zero-width spaces (\u200B), zero-width non-joiners (\u200C), zero-width joiners (\u200D), and word joiners (\u2060) that cause compiler errors and broken links.
  • Non-Breaking Space Conversion: Converts non-breaking spaces (\u00A0) introduced by word processors into standard ASCII space characters (0x20).
  • Markdown Hard-Break Awareness: Trims unnecessary trailing whitespace on lines while intelligently preserving intentional two-space line breaks ( ) required by CommonMark for hard line breaks.

Private browser-local text hygiene

Source code, engineering specifications, and confidential notes should never be transmitted over the internet simply to standardize line breaks. This utility executes 100% inside your local browser tab using native JavaScript string processing APIs. No text, file contents, or metadata ever leave your computer.

For companion local utilities, inspect note differences with our Markdown diff viewer, validate frontmatter with the YAML frontmatter validator, convert callouts with the Callout portability converter, or audit your entire knowledge base with the vault health inspector. Browse the entire suite in our browser tools catalog.

Questions

What is the technical difference between CRLF and LF line endings?

LF (Line Feed, ASCII 0x0A, represented as \n) is the standard newline delimiter in Unix, macOS, and Linux operating systems. CRLF (Carriage Return + Line Feed, ASCII 0x0D 0x0A, represented as \r\n) is the default line delimiter in DOS and Microsoft Windows. Vintage classic Mac systems (pre-OS X) utilized bare CR (ASCII 0x0D, represented as \r).

Why do mixed line endings cause issues in Git repositories and Markdown parsers?

When collaborators edit the same repository on Windows and macOS workstations without strict Git attributes, entire files are rewritten with alternating line endings. This produces massive, unreadable Git diffs where every single line appears modified. Furthermore, some strict Markdown table and YAML frontmatter parsers fail when encountering carriage return characters.

What is a UTF-8 Byte Order Mark (BOM) and why does it break note applications?

A Byte Order Mark is a special three-byte sequence (0xEF 0xBB 0xBF, decoded as Unicode character \uFEFF) placed at the beginning of text files by some Windows editors. While valid in Unicode, a leading BOM breaks YAML frontmatter parsers in static site generators like Jekyll, Astro, and Obsidian, causing cryptic syntax errors because the opening three dashes (---) are not the first characters.

How do invisible zero-width spaces enter Markdown notes and code snippets?

Zero-width spaces (\u200B) and zero-width joiners (\u200D) are frequently embedded in text copied from web applications, Slack messages, PDF documents, or rich-text word processors to manage text-wrapping. In programming code or command-line scripts, these invisible bytes trigger baffling syntax errors and unexpected execution failures.

Does this tool preserve intentional Markdown hard line breaks?

Yes. In Markdown syntax, ending a line with exactly two spaces signals a hard line break (<br>). When you enable the trailing whitespace cleanup option, our engine preserves two-space line endings while safely stripping single trailing spaces, excessive spaces, and trailing tabs.

Want clean Markdown on disk without line break conflicts?

Full Obsidian vault compatibility, clean Unix LF on disk, and private on-device meeting recording in Oyma.

tools line ending normalizer downloadDownload for Mac

No account needed. Intel Mac build