Skip to content
shellhacks.dev
Tooling

Text Wrapper

Hard-wrap paragraphs at a column width such as 72 for git commit bodies or 78 for email, with an optional prefix for quotes and comments, keeping paragraph breaks.

Free · No sign-up · Your inputs stay in your browser

Input

Wrap text at a fixed width

Output

Wrapped

Longest line 71 columns

Git convention is a subject under about 50 characters and a body wrapped at 72, so git log's four-space indent still fits in 80 columns; RFC 5322 recommends 78 for email. fold -s -w 72 does the same in a shell, and fmt -w 72 also joins short lines.

Runs in this browser. Nothing you paste is sent to a server.

Where fixed widths matter

Git does not wrap commit messages, and git log indents the body by four spaces, so a body wrapped at 72 still fits in 80 columns; a long subject is truncated in many tools. Plain-text email is wrapped at 78 characters by convention from RFC 5322, and many code styles limit comments to 80 or 100.

In a shell

fold -s -w 72 wraps at spaces, and fmt -w 72 also joins short lines into paragraphs.

Share

Frequently asked questions

What width should a git commit message use?
A subject of about 50 characters, a blank line, then a body wrapped at 72.
Why are some lines longer than the width?
A single word longer than the width, such as a URL, cannot be wrapped without breaking it. Turn on breaking long words if that is acceptable.
Is what I paste sent anywhere?
No. The tool runs entirely in your browser with JavaScript. Nothing you type or paste is sent to our server or stored.

Go deeper

Suggested reading

Keep planning

Similar tools