Embed this tool on your site
About this tool
The Word Wrap / Hard Wrap tool reformats text by inserting hard newlines so lines stay within a chosen column width. Unlike soft word wrap in text editors (which is only visual), hard wrapping embeds actual newline characters into the text. That matters for plain-text email (RFC 2822 recommends 78 characters or fewer), Git commit message bodies (72 columns), terminal output and code comments. Pick a width from 40 to 120 with the slider and click Wrap Text. The tool breaks only between words, so a single word longer than the width (a long URL, for example) stays on its own line. With Preserve paragraphs on, blank lines are kept and each paragraph is reflowed separately; existing line breaks inside a paragraph are joined first. The output panel shows the number of lines, the longest line and the word count.
Why use it
Inserts real newlines — not just visual wrap — for plain-text portability.
Column width slider from 40 to 120 characters.
Word-boundary wrapping prevents broken words in the output.
Ideal for emails, Git commits, terminal scripts, and code comments.
Line count, longest-line and word-count stats verify the result.
Preserves paragraph boundaries by leaving blank lines untouched.
How to use
- Paste the text you want to wrap into the input area.
- Drag the Column width slider (40-120, default 80).
- Leave Preserve paragraphs on to keep blank lines between paragraphs, or turn it off to reflow everything as one block.
- Click Wrap Text.
- Check the Longest line stat to confirm no line exceeds your width.
- Click Copy to copy the hard-wrapped output.
When it helps
- Formatting plain-text emails that require 76-character line limits.
- Wrapping Git commit message bodies at 72 characters per convention.
- Preparing terminal output or man page content with fixed line widths.
- Wrapping long code comments to fit within a project's line-length limit.
- Pre-formatting plain-text README files for old terminal viewers.
- Wrapping log file content to fit dashboard widgets with fixed column widths.
Examples
01Standard 40-column wrap
InputThe quick brown fox jumps over the lazy dog and runs back home again.
Expected resultThe quick brown fox jumps over the lazy
dog and runs back home again.
InputRefactor the user service to use the new authentication middleware and remove the deprecated session cookies.
Expected resultRefactor the user service to use the new authentication middleware and
remove the deprecated session cookies.
InputHello team, please review the attached document and send your comments back by Friday end of business.
Expected resultHello team, please review the attached document and send your comments back
by Friday end of business.
Tips
- Use 72 columns for Git commit message bodies — that is the universal convention.
- Use 76 or 78 for plain-text emails per RFC 2822 — leaves room for the leading '> ' in quoted replies.
- Use 80 for general terminal output — most legacy terminals are 80 wide.
- Long unbroken strings (URLs, hashes) are never split; shorten or break them by hand if a strict limit matters.
- After wrapping, paste into a fixed-width font editor to verify visual alignment.
Frequently Asked Questions
What is the difference between soft wrap and hard wrap?⌄
Soft wrap is visual only — the editor displays shorter lines but the underlying text has none. Hard wrap inserts actual newline characters, making the line breaks permanent in the text.
Does it preserve existing blank lines?⌄
With Preserve paragraphs checked (the default), blank lines separating paragraphs are kept. Unchecked, the whole input is reflowed as one paragraph.
What column width should I use for email?⌄
RFC 2822 recommends lines of 78 characters or fewer. 76 characters is a safe maximum that accounts for any added prefix characters.
Does it handle indented text?⌄
No. Each paragraph is trimmed and its words rejoined with single spaces, so leading indentation and runs of spaces are removed.
What if my text already has line breaks?⌄
Existing line breaks within paragraphs are joined first, then the text is rewrapped at your specified width. Blank lines (paragraph separators) are preserved when Preserve paragraphs is on.
How are characters counted?⌄
The width uses JavaScript string length, which counts most characters as 1 but emoji and other characters outside the Basic Multilingual Plane as 2. Wide CJK characters count as 1 even though terminals display them two columns wide.
Can it wrap inside long URLs?⌄
No. Wrapping only happens between words, so a URL or other unbroken string longer than the width stays whole on its own line.
Glossary
- Hard wrap
- Inserting actual newline characters into text at a target column width — survives copy-paste.
- Soft wrap
- Visual-only line wrapping in an editor; the underlying text has no newlines.
- Column width
- The maximum number of characters allowed per line in a hard-wrapped document.
- RFC 2822
- The IETF standard for plain-text email message format, recommending lines under 78 characters.
- Carriage return
- The \r character, used (with \n) for Windows-style line endings.
- Paragraph separator
- A blank line that delimits paragraphs in plain text — preserved by good wrapping algorithms.
A LITTLE HELP. A LOT DONE.
Good tools.
Great flow.
Your shortcut to the everyday. Create, convert, calculate,
and get back to what you love.
✳
✳
✓ Free to use✓ No sign-up✓ 500+ possibilities