Wrap text to a width

Breaks long lines at a set column, always at a word boundary.

Set a width and press the button. Long lines are broken so that no line exceeds your column, and the break always lands between words — never in the middle of one.

Why 80

The number comes from punched cards, which held 80 characters, and it survived into terminals, then into code style guides, then into plain-text email conventions where RFC recommendations put the limit around 78 so quoted replies still fit. It persists because it is close to the line length that reads comfortably: typography research generally puts the ideal somewhere between 45 and 90 characters.

Other widths worth knowing: 72 for plain-text email that will be quoted several times, 100 or 120 for modern code style guides, 40 to 60 for narrow columns and mobile reading.

Hard wrapping and what it costs

This inserts real line breaks. That is the point — the text keeps its shape wherever it goes, including places that do not reflow, like a terminal, a code comment, a plain-text email or a fixed-width form field.

It is also the drawback. Hard-wrapped text does not reflow when the window is narrower, so on a phone it wraps again and you get a ragged alternating pattern. Editing a wrapped paragraph breaks the alignment and you have to re-wrap. So hard-wrap at the end, when the text is final, and keep an unwrapped copy if you are still editing.

The second button reverses it: joining the lines back into one, ready to be re-wrapped at a different width or pasted somewhere that handles its own wrapping.

How the breaking works

Lines are filled with as many whole words as fit within your width, then broken. A word longer than the width — a long URL, a chemical name, a hash — is left on its own line rather than being cut in half, because breaking a URL makes it unclickable and breaking an identifier makes it wrong.

Existing line breaks are respected as paragraph boundaries, so a document with paragraphs stays a document with paragraphs. Blank lines survive.

Uses

Doing it without this tool

Command line: fmt -w 80 file.txt or fold -s -w 80 file.txt. The -s in fold is what makes it break at spaces; without it, words are cut in half.

Vim: :set textwidth=80 then gqip to reformat a paragraph.

VS Code: word wrap is a display setting and inserts nothing. The "Rewrap" extension adds real hard wrapping.

Word: no hard wrapping at all — it reflows by design, which is why text copied out of Word into a plain-text context arrives as very long lines.

Try:
0Words
0Characters
0No spaces
0Sentences
0Paragraphs
0Lines
0Pages
0Reading
0Speaking

Runs entirely in your browser. Your text is never uploaded — open DevTools, Network tab, and you will see zero requests while you use this tool.

How to use it

  1. Paste your text into the box.
  2. Set the column — 80 for general use, 72 for email and commit messages.
  3. Press "Wrap lines".
  4. Press "Unwrap into one line" if you need to edit and re-wrap afterwards.

Related tools

Add prefix / suffixPuts text at the start and end of every line — quotes, bullets, tags, commas.Truncate textShortens each line to a maximum length, optionally without cutting a word.Filter linesDeletes — or keeps — every line that matches a word or pattern.Text repeaterRepeats your text as many times as you want, with any separator.Cursive textHandwriting-style letters you can paste anywhere plain text goes.Dice rollerRoll a d6, a d20, two d6 or percentile dice. Sums included.Title case vs sentence caseThree style guides, three different answers, and the four-letter rule that…

See all text tools →

Frequently asked questions

Will it cut words in half?

No. Lines are filled with whole words only. A single word longer than your width is left on its own line rather than being broken, so URLs stay clickable and identifiers stay correct.

Why is 80 characters the standard?

It comes from 80-column punched cards and survived through terminals into code style guides and plain-text email conventions. It also happens to sit inside the range that reads comfortably.

Does it keep my paragraphs?

Yes. Existing line breaks are treated as paragraph boundaries and blank lines are preserved, so document structure survives.

Can I undo the wrapping?

Yes, the "Unwrap into one line" button joins the lines back together so you can edit and re-wrap at a different width.

What width should I use for email?

Around 72 characters. That leaves room for quote markers to be added as the message is replied to without the text exceeding the usual 78-character recommendation.