Skip to content

EOL Conversion plugin

Rewrite a document's line endings to one consistent convention. Useful when a file has mixed or platform-foreign line endings.

Your file keeps its line endings

OctoEdit detects a file's line endings when it opens it and writes the same ones back on every save. A Unix file with LF endings checked out on Windows stays LF; a CRLF file stays CRLF; a classic-Mac CR file stays CR. Pressing Enter inserts the ending the file already uses, so editing a file never introduces a second convention into it — a save with no edits leaves the bytes byte-for-byte identical, and your version control shows nothing.

A brand-new, unsaved document starts with the platform's convention — CRLF on Windows, LF elsewhere.

The line ending belongs to the document, not to this plugin: the menu below shows it and changes it, and the editor core is what does the writing.

The status bar names the active document's line ending in its own segment — Windows (CR LF), Unix (LF) or Macintosh (CR) — and follows the active tab, so you can see what each file is without opening the menu.

Where to find it

Edit ▸ EOL Conversion:

Command Rewrites every line ending to
Windows (CR LF) \r\n
macOS (CR) \r (classic Mac)
Linux (LF) \n

The ending the active document currently uses is ticked in the menu.

How it works

The conversion always applies to the whole document (any selection is ignored), in a single step you can undo at once. It does two things: it rewrites the line endings already in the buffer, and it records the new convention on the document — so Enter inserts the new ending from then on and the next save writes it. The status bar confirms the chosen target.

Converting a file with no line endings at all (a single line) still works: no bytes move, but the document remembers the choice for the first Enter you type.

EditorConfig can enforce this on save

To normalise line endings automatically for a project, set end_of_line in an .editorconfig — the editor applies it on every save without a manual command, and moves the document to that convention so later Enter keystrokes match what was just written.