Line Ending Converter
Detect and convert line endings between CRLF (Windows), LF (Unix/Mac), and CR (old Mac). Paste text or upload a file to instantly see detailed line-ending statistics - then convert to your desired format with one click. All processing runs locally in your browser - no uploads, no signup, completely free.
Paste text or upload a file to detect and convert line endings between CRLF (Windows), LF (Unix/Mac), and CR (classic Mac). View detailed statistics, identify mixed line endings, and convert with one click. All processing is local - no data uploaded to any server.
Drop a text file here or click to browse
Supports TXT, CSV, JSON, HTML, XML, MD, and code files
0 characters
Paste text or upload a file to automatically detect the current line ending format. The tool shows detailed statistics (CRLF, LF, CR counts) and highlights mixed endings. Select a target format (LF for Unix/Mac, CRLF for Windows, CR for legacy Mac) and click Convert to normalize all line endings. Download or copy the converted result. All processing is local - nothing is uploaded to any server.
Why Use Our Line Ending Converter?
CRLF, LF & CR Detection
Instantly detects all three line ending formats: CRLF (\r\n, Windows), LF (\n, Unix/Mac), and CR (\r, classic Mac OS). Shows exact counts for each type, total line count, and the dominant format percentage. Mixed-ending detection alerts you when a file uses inconsistent line endings.
One-Click Format Conversion
Convert between any line ending format with a single click. Choose from LF (Unix/Mac), CRLF (Windows), or CR (legacy Mac) targets. The converter normalizes all line endings internally before applying the target format, ensuring consistent results even with mixed endings.
Mixed Ending Detection & Alerts
The Line Ending Converter detects and reports mixed line endings - files that contain a combination of CRLF, LF, and/or CR sequences. A clear warning banner shows the count of each type and recommends conversion to normalize the file, preventing cross-platform compatibility issues.
100% Browser-Based Processing
All line ending detection and conversion runs entirely in your browser. Your text and files are never uploaded to any server - they are read locally using the File API and processed on your device. No data logging, no signup, no server uploads. Completely free and private.
Common Use Cases for Line Ending Converter
Cross-Platform Development
When developers on Windows, macOS, and Linux collaborate on the same project, line ending inconsistencies can cause merge conflicts and make diffs unreadable. Use the Line Ending Converter to normalize all files to LF before committing, ensuring consistent formatting across the team.
Git Repository Cleanup
Fix line ending issues in Git repositories by normalizing files before commit. Configure core.autocrlf or use .gitattributes, but first use the Line Ending Converter to inspect and fix existing files. LF is the recommended format for Git to ensure clean diffs and cross-platform compatibility.
Server Deployment & CI/CD
Linux servers and Docker containers expect LF line endings. Deploying files with CRLF endings can cause shell script errors, configuration parsing failures, and unexpected behavior. Convert all files to LF before deployment to ensure reliable server operation.
Legacy File Migration
When migrating files from classic Mac OS (CR endings), Windows (CRLF), or legacy mainframe systems to modern Unix/Linux environments, use the Line Ending Converter to detect and normalize the format. Essential for digital archiving and system migration projects.
Windows Application Compatibility
Some Windows applications, batch scripts (.bat, .cmd), PowerShell scripts, and legacy tools require CRLF line endings. Use the Line Ending Converter to ensure files intended for Windows use the correct format, preventing runtime errors and parsing failures.
Code Review & Diff Quality
Line ending inconsistencies create noisy diffs where every line appears changed due to formatting differences. Normalize all files to a consistent line ending format before code review to ensure that diffs show only actual content changes, not formatting noise.
Understanding Line Endings
What Are Line Endings?
Line endings (also called newlines, EOL, or line breaks) are special characters at the end of each line of text that mark where one line ends and the next begins. Different operating systems use different characters: Windows uses CRLF (Carriage Return + Line Feed, \r\n), Unix/Linux/macOS use LF (Line Feed, \n), and classic Mac OS used CR (Carriage Return, \r). While invisible in most editors, these differences cause real problems in cross-platform development.
How Line Ending Conversion Works
The Line Ending Converter first scans the entire text to count occurrences of each line ending type (CRLF, LF, CR). It distinguishes CRLF from standalone CR by counting CRLF pairs first, then counting remaining CR and LF characters. When converting to a target format, it first normalizes all endings to LF internally, then replaces LF with the target ending (CRLF, LF, or CR). This two-step process ensures clean conversion even with mixed endings.
Why Line Endings Matter
Inconsistent line endings cause a range of problems: shell scripts with CRLF fail on Linux with "command not found" errors (the hidden \r breaks the shebang), Git shows every line as changed when core.autocrlf mismatches, Python scripts throw SyntaxError on CRLF in some environments, Makefiles fail with "missing separator" errors, and Docker ENTRYPOINT scripts break with CRLF. Normalizing line endings prevents these issues.
Browser-Based & Private
All processing runs entirely in your browser - your text and files are never uploaded to any server. The Line Ending Converter uses the File API and string operations to analyze and convert line endings entirely on your device. No data logging, no server requests, no third-party services. This makes it safe for analyzing sensitive configuration files, private code, and confidential documents.
Related Tools
Steganography Detector
Upload an image to detect potential hidden data using LSB (Least Significant Bit) steganography analysis. Analyzes pixel-level modifications, shows a heatmap of altered pixels, detects statistical anomalies, and extracts hidden text messages if found. Compatible with standard LSB encoding and the STEG magic header format. All processing happens locally in your browser - free online steganography detector, no signup required.
Image File Size Analyzer
Upload any image to see a detailed binary-level breakdown of what contributes to its file size - pixel data, compression overhead, metadata (EXIF/IPTC/XMP), color profiles (ICC), and structural headers. Get prioritized optimization tips with estimated savings for web performance, mobile app optimization, and storage reduction. Supports JPEG, PNG, GIF, WebP, BMP, TIFF, AVIF, and HEIC - all processing runs locally in your browser, no server upload required. Free online image file size analyzer.
File Magic Byte Detector
Upload any file to instantly detect its true file type by reading the magic bytes (file signature / header). The tool bypasses incorrect file extensions and reveals the real format. Shows hex dump with matching signature bytes highlighted, ASCII interpretation, MIME type, file category, and extension match analysis. Supports over 120 file signatures across 16 categories: images, audio, video, documents, archives, executables, fonts, certificates, disk images, and more. All processing runs locally in your browser - free online File Magic Byte Detector, no signup required.
Image Clone Detector
Detect copy-move forgeries in images using pixel-block matching. Upload any image to find cloned/copied regions, view heatmap overlays showing the location and intensity of detected clones, and get confidence scores with region details. Three sensitivity presets for different detection needs. 100% private browser-based processing - free online Image Clone Detector.