Text / Lines
Word Wrap Tool: Wrap Text at a Fixed Width
Break long lines at spaces so every line fits within a set number of characters, keep blank lines between paragraphs, and optionally add a prefix such as // or > to every line, for commit messages, code comments, and plain-text email.
Word Wrap Tool: Wrap Text at a Fixed Width: Words are added to a line until the next one would not fit, then a new line starts. Paragraphs, separated by a blank line, are wrapped separately and the blank line is kept. The width counts the prefix too, and a word longer than a whole line either stays on a line of its own or, if you allow it, is split. Runs 100% locally in your browser with zero server file uploads.
- Category
- Text tools
- Runs
- In your browser
- Cost
- Free · no sign-up
- Availability
- Ready to use
Runs entirely in your browser
Wrapped text
Word wrap breaks long lines at spaces so that every line fits within a set width, which is useful for plain-text email, commit messages, code comments, and fixed-width displays. Blank lines between paragraphs are kept.
5 lines; the longest has 70 characters
Lines break at spaces, never inside a word unless you allow it, and blank lines between paragraphs are kept. The width includes the prefix, so with // and a width of 80 the text itself gets 77 characters. Git commit message bodies are usually wrapped at 72 characters and plain-text email at 72 to 78.
Why 72 characters
Plain-text email clients quote replies with > at the start of each line; wrapping at 72 leaves room for several levels of quoting before an 80-column screen overflows. Git tools indent commit messages by four spaces in logs, which is why commit bodies follow the same 72.
Prefixes
Adding // or # wraps a comment block for code; > makes a quoted reply. To add a prefix without wrapping, use prefix lines.
How to use it
- Paste the text.
- Choose the width, such as 72 or 80, and an optional prefix.
- Copy the wrapped text.
Privacy & limitations
Wrapped in your browser.
Related tools
Frequently asked questions
What width should I use?
72 characters for Git commit message bodies and plain-text email, 80 for many coding styles and terminals.
Can I unwrap text?
Yes: use remove line breaks to join wrapped lines back into paragraphs.
Does it count characters or display width?
Characters. Chinese, Japanese, and Korean characters take two columns in a monospaced terminal, so lines of them look about twice as long.
Free tool · runs in your browser · no account required