Word Wrap

Hard-wrap text at a fixed column width.

Open tool

Overview

Hard-wrap your text so no line exceeds a fixed column width — typically 72, 76, or 80 characters. Word boundaries are respected by default, so words don't get split mid-letter unless they're already longer than the column limit.

Programmers preparing commit messages (Git convention is 72 columns), email authors fitting into a fixed-width signature block, writers preparing plain-text manuscripts, and anyone reformatting for a constrained-width display all reach for it. Many code style guides also enforce a hard wrap on source comments.

How it works

The tool walks your text word by word and starts a new line when adding the next word would exceed the column limit. Existing line breaks are preserved (a hard newline you typed is honored) or collapsed first into a single paragraph (reflow mode). Special handling for very long single tokens (URLs, long identifiers) varies — some modes break them, others let them overflow.

Trailing whitespace is stripped, and the chosen line-ending character (LF or CRLF) is applied consistently.

Examples

Input (width=20):
  The quick brown fox jumps over the lazy dog

Output:
  The quick brown fox
  jumps over the lazy
  dog
Input (width=10, with reflow):
  Multi-line
  source becomes
  a paragraph then wraps to:
  Multi-line
  source
  becomes a
  paragraph...

FAQ

Why 72 columns for commit messages?

Git's git log adds 4 columns of indent. A 72-character wrap leaves room for the indent and still fits in a 76- or 80-column terminal. The hard limit is 50 for the subject and 72 for the body.

Does it break long URLs?

Most modes leave long URLs intact, letting them overflow. URLs broken mid-string usually cause more problems than they solve.

What about non-Latin scripts?

CJK text doesn't use spaces between characters; word wrap on CJK requires script-specific rules (line-breaking opportunities, no-break rules around punctuation). The default mode is tuned for whitespace-delimited scripts.

Try Word Wrap

An unhandled error has occurred. Reload ×