Text Wrapper

Hard-wrap text to 72/80 characters, add > or // prefixes, or unwrap lines.

About this tool

Paste text, choose a preset or set the line width, an optional prefix such as > or //, and an indent. Wrap at words keeps whole words together, Break at exact width splits at the character count, and Unwrap joins hard-wrapped lines back into paragraphs. Keep existing line breaks to protect lists and code. The result updates as you type, with the line count and longest line.

Why and when to hard-wrap text

Most apps wrap text visually to fit the window, but some places need real line breaks at a fixed width. Plain-text email traditionally wraps at 72 characters so that quoted replies, which add "> " to every line, still fit within 80 columns. Git commit message bodies follow the same 72-character convention because tools like git log indent them. Many coding style guides limit comments to 80 or 100 characters, README files and documentation often wrap at 80 for easy reading in terminals, and some old systems simply truncate long lines. This tool wraps each paragraph separately, so blank lines between paragraphs stay, and the width includes any prefix you add, which means "> " quoting or "// " comments still fit the limit. Words longer than the width, such as long URLs, can be left intact or broken. The reverse problem is just as common: text copied from emails, PDFs or old documentation arrives with a hard break at the end of every line, and Unwrap joins those lines back into flowing paragraphs while keeping the paragraph breaks. Honest limits: width is counted in characters, so emoji, CJK text and other wide characters can look longer than the limit in a terminal, and bullet lists and code are treated as prose unless you keep existing line breaks. The text cleaner removes extra spaces and line breaks, and the word counter counts characters.

Frequently asked questions

What line length should a commit message use?

Keep the summary line to about 50 characters and wrap the body at 72.

How do I remove line breaks from copied text?

Choose Unwrap. Lines within each paragraph are joined, and blank lines between paragraphs are kept.

Does the prefix count towards the width?

Yes. With width 72 and prefix "> ", the text itself wraps at 70 characters.

Is my data saved?

No. Wrapping runs in your browser and nothing is stored or sent.