Wrap Text
Break long lines of text at specific character lengths
Break long lines at a fixed width
Plain-text emails, commit messages, README files, code comments and terminal output often expect lines of no more than a set number of characters, commonly 72 or 80. A long paragraph pasted into those places runs off the edge or gets cut awkwardly. This tool inserts line breaks so that no line goes past the limit you choose.
How to wrap your text
- Paste or type your text into the Input Text box. Sample loads a sentence of placeholder text, and Paste reads the clipboard.
- Set the number next to Wrap at. The default is 80 and the smallest allowed value is 1.
- Decide about Break words, which is off by default.
- Press Wrap Text, then use Copy or .TXT (saved as wrapped-text.txt).
Word-boundary wrapping versus breaking words
With Break words off, the tool looks for the last space at or before the limit and cuts there, so words stay whole. If a single word is longer than the limit, such as a long URL, it has no space to cut at, and the tool then cuts at the limit anyway. With Break words on, every long line is cut at exactly the limit, even in the middle of a word. Use that mode when you need strictly fixed-width blocks, for example for data columns or ASCII layouts.
Where it is useful
- Formatting an email draft for clients that show plain text at 72 columns.
- Preparing a long description for a commit message body or source-code comment.
- Fitting text into a fixed-width area, a printed slip or a narrow display.
- Making pasted prose readable in a terminal or a monospaced code block.
Behavior worth knowing
- Existing line breaks are respected. Each line is checked separately, and lines already shorter than the limit are left as they are.
- The tool only adds breaks. If your text already has short hard-wrapped lines, run it through Unwrap Text first to get an even result.
- Spaces at the point of a cut are trimmed, so new lines do not start with a stray space.
- The limit counts characters, not pixels, so it suits monospaced output better than proportional fonts.
Character, word and line counts are shown before and after, and the summary confirms the width used. Everything runs in your browser page as JavaScript.
Related Tools
Related Tools