Inspect newline characters in Notepad

How to see whether a file uses CRLF, LF or CR line endings in Windows Notepad, what Notepad cannot show you, and when to use a byte-level check instead.

A line break looks the same on screen no matter which characters produced it. Underneath, a text file can end its lines with a carriage return plus line feed (CRLF), a line feed alone (LF), or a carriage return alone (CR). The difference matters when a file moves between Windows tools, scripts, version control and web forms. This review covers what Windows Notepad can tell you about newline characters, what it hides, and when a more precise check is needed.

Short verdict: is Notepad enough for checking line endings?

For a quick answer to "which line ending does this file use?", current Windows Notepad is usually enough. Its status bar names the detected format, so you can identify a file as Windows, Unix or classic Mac style without extra software. The tradeoff is that Notepad reports one label per file and does not draw individual newline or whitespace characters. If you suspect mixed line endings, stray carriage returns, or Unicode separator characters, Notepad cannot confirm or rule them out. In those cases, use a byte-level or code-point-level view.

The three common line endings

Name | Characters | Code points | Bytes in ASCII/UTF-8 | Typical origin
CRLF | Carriage return + line feed | U+000D U+000A | 0D 0A | Windows conventions
LF | Line feed | U+000A | 0A | Linux, macOS and most Unix-style tools
CR | Carriage return | U+000D | 0D | Classic Mac OS files and some older systems

Unicode also defines less common characters that some software treats as line breaks, including NEXT LINE (U+0085), LINE SEPARATOR (U+2028) and PARAGRAPH SEPARATOR (U+2029). No evidence was available on how Notepad displays or interprets these, so treat their behavior there as untested.

How to check the line ending in Notepad

  • Open the file in Notepad.
  • Make sure the status bar is visible. If it is hidden, turn it on from the View menu.
  • Look for the line-ending label in the status bar, shown as Windows (CRLF), Unix (LF) or Macintosh (CR).
  • Note the encoding label next to it as well, because encoding and line endings are separate properties of the file.

Older versions of Notepad recognized only CRLF. In those versions, an LF-only file could appear as a single long line. If your Notepad shows no line-ending label and displays a Unix-style file as one run of text, you are likely using an older build. The appearance alone tells you something, but not everything.

What Notepad shows and what it changes

Identifying stored characters is a different task from changing how text looks, and the two are easy to confuse.

  • The status bar label is a report. Notepad inspects the stored characters and summarizes them as a single line-ending type. Nothing in the file changes.
  • Word wrap is presentation only. It breaks long lines on screen to fit the window, but it adds no newline characters to the file. A wrapped paragraph is still one line when saved.
  • Pressing Enter inserts stored characters. Newer Notepad versions are described as keeping the file's existing line-ending style when you edit and save, rather than forcing CRLF. If an exact byte layout matters, verify this on your own build.
  • Converting line endings changes stored characters. Notepad does not show an obvious conversion command in the evidence reviewed here. Editors such as Notepad++ (a separate program with a similar name) provide one, under Edit > EOL Conversion.

Searches for "Notepad" often turn up Notepad++ instructions. Notepad++ can draw CR and LF markers inline through View > Show Symbol > Show End of Line, which shows each line individually. Windows Notepad has no equivalent option.

When the status bar is not enough

A single file-level label cannot reveal problems that occur on individual lines. Look closer when a script fails with an unexplained character at the end of a line, when a diff marks every line as changed, when text pasted from several sources behaves inconsistently, or when a field validator rejects input that looks clean. How Notepad labels a file that mixes CRLF and LF lines was not covered by the available evidence, so do not read its label as proof that every line matches.

PowerShell includes a hex viewer that shows the actual bytes:

Format-Hex .\example.txt

For a file containing "Line one", a CRLF break, then "Line two", the relevant bytes look like this. The 0D 0A pair is the CRLF. An LF-only file would show 0A alone at that position.

4C 69 6E 65 20 6F 6E 65 0D 0A 4C 69 6E 65 20 74 77 6F
L  i  n  e     o  n  e  CR LF L  i  n  e     t  w  o

This example uses only ASCII letters, so each character is one byte. In UTF-8 files containing accented letters, emoji or other non-ASCII text, one character can span several bytes. Newline bytes are still 0D and 0A, but the other characters will not line up one-to-one with their bytes. In UTF-16 files, each newline character takes two bytes. Check the encoding label before reading a hex dump.

Copying, sharing and accessibility

Line endings do not always survive a copy and paste. The clipboard, the source application and the destination can each normalize, keep or strip carriage returns, and no tested evidence for specific destinations was available here. If a destination needs a particular format, such as a configuration file, a shell script or a form with strict validation, check the result there rather than assuming the format in Notepad carried over. Saving or transferring the file directly is more predictable than pasting.

For readers, CRLF, LF and CR all render as an ordinary line break in software that supports them, so the choice rarely affects readability. Screen readers generally present the text, not the line-ending type. No scoped test of specific assistive technologies was available, though. Accessibility problems are more likely when a line break goes missing entirely and lines run together, or when a tool shows a stray carriage return as a visible symbol. For anything shared with people rather than programs, plain text with consistent line endings is the safest form.

Choosing the right check

  • Use the Notepad status bar to confirm a file's overall line-ending style quickly.
  • Use an editor that shows end-of-line symbols to inspect line endings one line at a time or to convert them.
  • Use a hex or code-point view when you need proof of exactly which characters are stored, including mixed endings or unusual Unicode separators.
  • Use plain text with one consistent line ending whenever a file will be processed by scripts, version control or strict validators.