TextArray
100% local

Add or remove line breaks

Join broken lines into one block or split text into new lines.

Input
Output

Add or remove line breaks

Text copied from a PDF, an email client or a terminal often arrives with line breaks in all the wrong places. This tool fixes that in one step, and can also add breaks where you need them. Four modes cover the usual cases.

Remove all line breaks flattens everything into a single line, joined by whatever you type in the "Join with" field — a space by default, but a comma and space or an empty string work just as well when you are building a list or gluing a hyphenated word back together. Keep paragraph breaks is the mode for prose: single newlines inside a paragraph collapse into spaces while blank lines between paragraphs stay, so a PDF copy becomes readable text again. Break after each sentence puts every sentence on its own line, which is useful when reviewing writing, preparing subtitles or diffing translations sentence by sentence. Break every N characters wraps the text to a chosen width between 10 and 500 characters, breaking at the last space before the limit so words are never cut in half — a single word longer than the limit is left whole rather than broken.

Windows (CRLF), Unix (LF) and old Mac (CR) line endings are all recognised and the output is normalised to LF. The tally under the output shows how many lines went in and how many came out, so the effect of each mode is visible at a glance.

Everything runs in your browser. Your text is never uploaded, which makes the tool safe for drafts, contracts or any document you would not paste into an online service. Copy the result or download it as a .txt file.

FAQ

How do I remove line breaks without losing paragraphs?
Choose "Keep paragraph breaks". Single newlines inside a paragraph become spaces, while blank lines that separate paragraphs are preserved.
Can I join lines with something other than a space?
Yes. The "Join with" field is used in place of every removed break — type a comma and a space to build a list, or leave it empty to concatenate directly.
Does wrapping cut words in half?
No. Breaks happen at the last space before the limit. A single word longer than the limit stays on its own line rather than being split.
Which line endings are supported?
Windows (CRLF), Unix (LF) and classic Mac (CR) input all work. The output always uses LF line endings.
Is my text uploaded anywhere?
No. The tool runs entirely in your browser and your text never leaves your device.