ToolJutsu
All tools
Text Tools

Line Break Tool

Add or remove line breaks from text.

Processed on your device. We never see your files.

How to use Line Break Tool

What this tool does

The Line Break Tool handles three distinct operations on line breaks in text: it can remove them, add them, or convert them between the three standard formats. Choose the mode from the segmented control at the top, paste your text, and the result appears immediately.

In Remove line breaks mode the tool strips every line break and replaces each one with a separator you specify — typically a space, to join paragraphs into a single running line, but you can use any string. In Add line breaks mode it re-wraps plain text to fit within a column width you set, breaking at word boundaries so no word is cut in half. In Convert line endings mode it normalises all line endings in the text and rewrites them as Windows CRLF, Unix LF, or classic Mac CR, whichever you choose.

Why you might need it

These three operations come up constantly in everyday text work.

Removing line breaks is essential when you paste a block of text — a quote from a PDF, a paragraph from a web article, or an export from a spreadsheet — and it arrives with hard line breaks that break the flow. Turning them into spaces produces a single, clean paragraph ready to paste into an email or document.

Adding line breaks is the reverse need: a long single-line string that arrived from a database export, a minified configuration file, or a template system needs to be wrapped to be human-readable. Editors like Vim and Emacs have gq and fill-paragraph for this, but not everyone has those tools available. Setting a column width of 72 or 80 characters and letting the tool wrap the text produces clean output that fits a terminal or a diff view.

Converting line endings is a quiet but persistent source of bugs. A shell script with CRLF endings will fail on Linux with a bad interpreter error. A CSV file with mixed endings may be parsed inconsistently. Normalising before distribution prevents a whole class of cross-platform problems.

How to use it

  1. Choose the mode you need from the Remove line breaks, Add line breaks, or Convert line endings options at the top.
  2. Paste your text into the Your text box, or use Load sample to try the tool with a pre-loaded example.
  3. Set any mode-specific options: for Remove, type the replacement string; for Add, enter the column width; for Convert, pick the target line ending.
  4. Read the result in the Result box below, which updates in real time.
  5. Use Copy output to put the result on your clipboard, then Clear to start fresh.

Common pitfalls

In “Remove line breaks” mode, leaving the replacement field empty will concatenate lines directly, which means the last word of one line and the first word of the next run together without a space. That is almost never what you want for prose. Leave it set to a single space unless you specifically need run-together output.

In “Add line breaks” mode, the tool first collapses any existing line breaks into spaces so it can re-wrap cleanly from scratch. If you have intentional paragraph breaks and want to preserve them, split the text into paragraphs first, process each separately, and rejoin.

In “Convert line endings” mode, some editors display CRLF files correctly but store them with invisible characters that cause issues in other tools. If your file looks right on screen but misbehaves in a terminal or version control, a conversion to LF is often the fix.

Tips and advanced use

The 72-character column width is a long-standing convention for email body text, where many clients impose a hard wrap at 76 or 78 characters and a margin of a few characters gives you room. The 80-character width suits most terminal windows. Git commit message bodies conventionally wrap at 72 characters.

For Markdown files, wrapping at 80 columns with a word-aware break makes diffs much more readable in code review tools, since each diff hunk shows a manageable number of changed words rather than a single enormous line.

Converting to LF before committing to a Git repository, combined with a .gitattributes file that enforces LF for text files, avoids the common situation where one contributor on Windows submits CRLF files and another on Linux sees every line as changed. The conversion step here handles the immediate file; the .gitattributes file handles the long term.

All processing runs locally in your browser, so you can safely use this tool with sensitive documents, configuration files containing credentials, or any other content you would not want to send to an external service.

Frequently asked questions

Does this tool send my text to a server?
No. All three modes — removing line breaks, adding them, and converting line endings — run entirely in your browser. Your text is never uploaded or stored. You can verify this in your browser's Network tab, which will show no outgoing requests while you use the tool.
What is the difference between CRLF, LF, and CR?
These are the three conventions for marking the end of a line in plain text. Windows uses CRLF (carriage return followed by line feed, the byte pair 0x0D 0x0A). Unix and modern macOS use LF (line feed only, 0x0A). Classic Mac OS, before OS X, used CR alone (0x0D). Mixing them in one file causes visible or invisible formatting problems in many tools.
How does the word-aware wrapping work?
When you choose 'Add line breaks', the tool joins all existing line breaks into spaces and then re-wraps the resulting text at your chosen column width. It always breaks at a word boundary — never in the middle of a word — so no word is split across two lines. If a single word is longer than the column width, it occupies its own line.
What can I use as the replacement when removing line breaks?
The replacement field accepts any string. A space is the most common choice, joining lines into a paragraph. An empty string concatenates lines with no gap. You can also use a pipe character, a comma, or any other delimiter to produce structured output from multi-line input.
Why might I need to convert line endings?
Version control systems, code editors, and some command-line tools are sensitive to line endings. A file committed with CRLF line endings on Windows can show every line as changed when opened on a Unix system. Shell scripts must use LF or they will fail. Converting before committing or sharing a file avoids these cross-platform issues.

Related tools