Line Break Inserter
Insert a line break every N characters (word-boundary-aware) or every N words, or convert every existing newline into an HTML <br> tag.
Result:
How to Use the Line Break Inserter
Paste your text and choose a mode. "Every N Characters" inserts a line break roughly every N characters, but it's word-boundary-aware so it never splits a word in half — it looks for the nearest space instead. "Every N Words" inserts a break after every N words regardless of line length. "Newlines to <br>" converts every existing single newline in your text into an HTML <br> tag followed by a newline, ready to paste into HTML source.
Example
Running "Every N Words" with N set to 3 on The quick brown fox jumps over the lazy dog produces three lines: The quick brown, fox jumps over, and the lazy dog.
Common Use Cases
- Wrapping long text to a fixed character width for a fixed-width display, label, or terminal output.
- Breaking a long sentence into short, evenly-sized lines for a slide or lyric sheet.
- Converting plain-text paragraphs into HTML source with explicit
<br>line breaks.
FAQs
- Will "Every N Characters" ever break in the middle of a word? No — it looks for the nearest word boundary at or before the character limit, so a line may end up slightly shorter than N characters rather than splitting a word.
- What happens to existing line breaks in "Every N Characters" or "Every N Words" mode? Those two modes treat the input as one continuous stream of words, so existing line breaks are effectively removed and replaced by the new break pattern.
- Does "Newlines to <br>" affect blank lines? Yes — every newline character, including ones between blank lines, is followed by a
<br>tag, matching how browsers render explicit line breaks in HTML.
