Windows to Unix Line Endings
Convert Windows CRLF line endings to Unix LF line endings online for free. Clean up text and code directly in your browser.
Windows to Unix Line Endings
Paste your text or code below, choose how lone carriage returns should be handled, and convert the line endings to Unix-style LF.
\r\n), while Unix and Linux commonly use LF (\n). This tool converts CRLF sequences to LF without changing the other characters in your text.
What Is Windows to Unix Line Endings?
Windows to Unix Line Endings is a text conversion tool that changes Windows-style CRLF line endings into Unix-style LF line endings. It is useful when text or source-code files created or edited on Windows need to be used in Unix, Linux, macOS, server or command-line environments.
The converter works directly in your browser and changes line-ending characters without intentionally modifying the words, code, indentation or other content in the text. This makes it useful for developers, system administrators, technical writers and anyone working with text files across different operating systems.
Why Use Windows to Unix Line Endings?
Different operating systems traditionally use different characters to mark the end of a line. Converting these characters can prevent compatibility issues and make text files consistent with the environment where they will be used.
CRLF to LF Conversion
Convert Windows CRLF line endings into Unix LF line endings quickly and consistently.
Source Code Friendly
Use the converter with programming code, scripts, configuration files and other technical text.
Lone CR Handling
Choose whether standalone carriage return characters should be preserved, converted or removed.
Final Line Ending Control
Preserve the final line ending, remove it or ensure the converted output ends with an LF character.
Instant Results
Convert text immediately in your browser without waiting for a file-processing service.
Private Browser Processing
Your text is processed locally in your browser rather than being uploaded to a conversion server.
How to Use Windows to Unix Line Endings
Converting Windows line endings to Unix format takes only a few steps.
- Paste your text — Insert the text, source code or other content containing Windows-style line endings into the input box.
- Choose your options — Select how standalone carriage returns and the final line ending should be handled.
- Convert the text — Click “Convert to Unix Line Endings” to replace CRLF sequences with LF characters.
- Copy the result — Review the converted text and click “Copy Output” to place the Unix-style text on your clipboard.
Convert CRLF to LF Online
CRLF and LF are two common ways of representing line endings in text files. Windows traditionally uses a carriage return followed by a line feed (CRLF), represented as \r\n. Unix and Linux systems generally use a single line feed (LF), represented as \n. When a file moves between operating systems, these different conventions can sometimes cause unwanted formatting or compatibility problems.
This Windows to Unix converter provides a straightforward way to normalise line endings without changing the substantive contents of your text. It can be useful for source code, shell scripts, configuration files, plain-text documents, logs and data that need to be used in Unix or Linux environments.
Windows CRLF vs Unix LF
A Windows CRLF line ending contains two control characters: carriage return and line feed. A Unix LF line ending contains only the line-feed character. Although both represent a new line, some tools can distinguish between them. Converting CRLF to LF removes the carriage-return character from Windows-style line endings and leaves a standard Unix line-feed character.
Why Line Ending Conversion Matters
Consistent line endings are particularly useful in software development and version control. Mixed line endings can create unnecessary differences in source-code comparisons, cause warnings in development tools or create problems with scripts and Unix-oriented utilities. Converting files to the expected line-ending format helps keep text consistent across environments.
Line Ending Conversion Details
The primary conversion performed by this tool is CRLF to LF. Existing LF characters are preserved. Standalone carriage-return characters can be handled separately using the lone carriage-return option. This gives you control when processing text that may contain older Macintosh-style CR line endings or other unusual line-ending sequences.
The conversion is character-based and does not interpret or rewrite the content of your text. It does not reformat source code, alter indentation, change encoding or modify punctuation. Processing happens locally in your browser, so the converter can be used for technical or sensitive text without requiring the content to be uploaded to a remote conversion service.
James William Steven Parker
Creator & Developer of YesTools
James William Steven Parker is a web developer and technology professional with extensive experience in web development, web design, SEO, web hosting, systems analysis and cybersecurity. He created YesTools to provide fast, practical and free online tools for everyday tasks and technical work.
Learn more about James and YesToolsFrequently Asked Questions
Explore More Free Tools
Explore the YesTools collection of free online tools, calculators, converters, generators and utilities.
Browse All Categories

