The useful answer

Choose the line-ending convention required by the receiving system. LF uses one byte per break; CRLF uses two. The visible text can look identical while the file bytes differ.

Before you start

A text file can appear unchanged after conversion and still be meaningfully different to a downstream process. Line endings are a common example. Many applications accept both LF and CRLF, but a specific import, script or legacy system may expect one form.

Our sample contains three short lines and ends with a final line break. Format Lab first normalizes existing CRLF and lone CR breaks to LF, then writes the selected convention. It does not remove empty lines or trim the text. This is a targeted byte-format change, not a cleanup of the document’s content.

Your practice file

line-ending-sample.txt · Original Deskcraft example · Reusable for practice

Download source ↓

The walkthrough

Use a small baseline file

Download line-ending-sample.txt. It contains three named stages, each on its own line, with a final newline after the last stage. This makes the expected number of breaks easy to count.

Export an LF copy

Select Normalize line endings and choose LF. Leave the BOM option off so the only variable is the line ending. Convert the text and record the byte count and three line breaks.

Export a CRLF copy

Change the line-ending selector to CRLF and convert again. The visible preview should look the same. Each of the three breaks now contains an additional carriage-return byte.

Check the saved bytes when necessary

Download the result and use a text editor that reports line-ending style. The CRLF version should be three bytes larger than the LF version for this exact ASCII sample. Do not use visual line wrapping as a substitute for checking actual breaks.

Keep the required delivery convention

Name or document the chosen output style if your workflow depends on it. If there is no compatibility requirement, consistency is usually more useful than repeatedly converting files between conventions.

Before & after, in practice

What we checkedStarting comparisonAfter the change
Output70 bytes73 bytes
File extensiontxttxt

Recorded in Chrome 153.0.8010.54. These are measurements of this practice file, not guaranteed results for every file or browser.

Format Lab: Starting comparison for Normalize line endings without joining your lines
Starting comparison. Actual Format Lab operation captured with the supplied practice file. Select the image to inspect the settings at full size.
Format Lab: After the change for Normalize line endings without joining your lines
After the change. Actual Format Lab operation captured with the supplied practice file. Select the image to inspect the settings at full size.
Inspect the demonstrated result

Download the actual output recorded for this walkthrough.

Download result ↓

When it goes wrong

Lines look doubled in another editor

The receiving app may mishandle the line endings or display carriage returns unusually. Inspect the actual bytes and choose its expected convention.

A long line wraps in the preview

Visual wrapping is not a newline character. The tool’s line-break count measures actual newline characters in the output.

The final newline disappeared elsewhere

Another editor may remove it on save. Recheck the delivered file if that final delimiter matters to the importer.

The final check

Expect exactly three logical lines and three line breaks in both copies. With the BOM off, the CRLF copy should be three bytes larger. The words and their order should be identical.

Keep one clean original. The tools create a new copy. They do not overwrite your source. For important work, verify the downloaded result in the application that will actually use it.

Further reading & method

These links explain the underlying formats or browser behavior. The steps, examples, screenshots and measured results above come from the Deskcraft tools. Screenshots do not depict Excel, Photoshop or another commercial application.

See how these guides are made. Found an error? Send a correction with the guide title and the step you tried.