Break Lines by Characters screenshot

Break Lines by Characters

Cut every line at an exact character count, splitting long words, for fixed-width output such as SMS segments or code columns.

Privacy First
0 Runs
Updated 2026-11-22
Runs in your browser
No upload
Deterministic

What this page does

Some outputs have a hard character limit and no room to move a long word to the next line. This page cuts every line at exactly the width you set, splits a word when the width falls inside it, and keeps the original line breaks as breaks.

How to use it

Paste or type the text and press Run. The result appears beside the form. With "abcdefghij", the page gives:

abcdefghij

The rule it applies

Every input line is cut into consecutive runs of exactly the chosen width, with the final run holding the remainder; the cuts are counted in code points, so one emoji advances the column by one.

The characters and their order are unchanged: the only added bytes are the newlines at the cut points, and an existing newline is still a break. Every character is read in your browser: nothing is uploaded and nothing is stored.

Some outputs have a hard character limit and no room to move a long word to the next line. This page cuts every line at exactly the width you set, splits a word when the width falls inside it, and keeps the original line breaks as breaks.

The rule this page applies: Every input line is cut into consecutive runs of exactly the chosen width, with the final run holding the remainder; the cuts are counted in code points, so one emoji advances the column by one.

Worked example: "abcdefghij" with the default controls gives the output recorded in the example below, character for character.

How to use the Break Lines by Characters

Paste or type the text into the box, set Characters per line, then press Run. The page re-reads whatever is in the box and prints the rule it applied.

Worked example: with "abcdefghij" the page prints the output in the What to Expect block below, and running it again prints the same bytes.

The rule this page applies

Every input line is cut into consecutive runs of exactly the chosen width, with the final run holding the remainder; the cuts are counted in code points, so one emoji advances the column by one.

The characters and their order are unchanged: the only added bytes are the newlines at the cut points, and an existing newline is still a break.

What to Expect

Best for

  • SMS and pager messages with a hard segment size
  • Fixed-width code or log columns

Not ideal for

  • Prose, where splitting a word is undesirable
  • Visual wrapping in a proportional font

What this tool keeps

  • Your text, read in this tab and nowhere else
  • The same answer on every run
  • Nothing sent, stored or logged

What may need cleanup

  • Your own wording, which the page never composes for you
  • Spacing carried over from the text you pasted

Common errors

  • A width that is not a whole number between 1 and 1000 is refused with the range named.
  • An empty box, which the page refuses rather than printing a blank result

Example use cases

  • Splitting a message into 70-character segments
  • Producing a 40-column transcript

Sample input

abcdefghij

Sample output

abcdefghij

Who this is for

  • developers
  • support teams

Frequently asked questions

What rule does this page apply?

Every input line is cut into consecutive runs of exactly the chosen width, with the final run holding the remainder; the cuts are counted in code points, so one emoji advances the column by one.

What input does it refuse?

A width that is not a whole number between 1 and 1000 is refused with the range named.

What is left unchanged?

The characters and their order are unchanged: the only added bytes are the newlines at the cut points, and an existing newline is still a break.

Is anything uploaded?

No. The text is read by JavaScript in this page and nothing is posted, stored or logged.

Will it split a word?

Yes, whenever the width falls inside one. That is the difference between a hard break and word wrap, and the page states it rather than hiding it.

How are emoji counted?

One code point is one column, so a family emoji built from several code points counts as several. The count is characters, not grapheme clusters.

Developer program

Build custom tools for your store

Join the SDK program to create useful ecommerce utilities for your store.