EllyTools

画像ツール

計算ツール

テキストツール

カラーツール

ファイルツール

便利ツール

改行の削除

テキストの改行を削除または別の文字に置換

入力

出力

使い方

1

不要な改行があるテキストを貼り付け

2

すべての改行を削除するか、余分な改行のみ削除するかを選択

3

整理されたテキストをコピー

よくある質問

関連ツール

こんな方におすすめ

  • PDFやメールからコピーしたテキストを整理する方
  • 貼り付けたコンテンツを整形するライター
  • ログデータやテキストファイルを整理する開発者

Remove Line Breaks: The Right Answer Depends on the Language

Copy a sentence out of a PDF and it arrives broken in the wrong places. There are two ways to remove those breaks, and Korean and Japanese need different ones. Using "remove all" on Korean glues the words together.

Text copied from a PDF, a paper or an email comes back broken at points where no break belongs. The line endings you saw on screen were not structure — they were the width of the page, and the characters holding them there come along with the copy.

This tool clears those breaks out. How it should clear them depends on what language the text is written in.

"Replace with space" versus "remove all"

English and Korean separate words with spaces. A line break falls where a space belongs, so the break has to become a space. Deleting it outright runs the words on either side together.

Japanese and Chinese work the other way. They do not put spaces between words, so replacing a break with a space inserts a gap the writing system never had and the result reads oddly. Those languages want "remove all".

So: English and Korean documents take "replace with space", Japanese and Chinese documents take "remove all". For a mixed document, use "replace with space" and fix the few awkward joins by hand.

The five modes

ModeWhat it doesWhen to use it
Replace with spaceTurns each break into one space, joining everythingEnglish or Korean copied from a PDF
Remove allDeletes breaks, joining text directlyJapanese or Chinese text; codes and values that must run together
Remove empty linesDrops blank lines, keeps the rest of the breaksLists that arrived double-spaced
Collapse blank linesReduces runs of blank lines to oneKeeping paragraph structure while tidying spacing
Trim each lineStrips leading and trailing spaces per lineLists with inconsistent indentation

Windows and Mac break lines differently

The character that ends a line differs by operating system. Windows uses two — a carriage return followed by a line feed — while macOS and Linux use one. Nothing distinguishes them on screen, but they diverge as soon as you count characters or feed the text into another program.

This tool normalises them before doing anything else, so a file written on Windows and one written on a Mac produce the same result. If a text editor has ever reported a line count you did not expect, or shown a stray symbol at the end of every line, this is usually why.

Where the stray breaks come from

  • PDFs and papers — breaks inserted to fit the page width, stored as real characters.
  • Quoted email — replies typically wrap the quoted section at a fixed width.
  • Word and other office documents — copying from inside a table or text box breaks at every cell.
  • Terminal output — copied already wrapped to the window width.
  • Web pages — the source HTML's indentation sometimes comes along with the copy.

Extended FAQ

My Korean text came out with all the words stuck together.

You used "remove all". Korean separates its chunks with spaces, so it needs "replace with space". "Remove all" is for Japanese and Chinese, which have no spaces to preserve.

I want to keep my paragraphs.

Use "collapse blank lines". It tidies runs of blank lines down to one while leaving the paragraph structure intact. "Replace with space" and "remove all" both flatten everything into a single line.

There are still spaces at the ends of lines.

Add "trim each line", or follow up with the extra-spaces tool. One exception: in Markdown, two trailing spaces mean a line break, so leave them alone in Markdown source.

The character count changed more than I expected.

Line breaks are characters too. In a file written on Windows each break is two of them, so the more lines there were, the bigger the difference.

Is my text stored anywhere?

No. Everything runs in your browser and nothing is sent to a server.