Word Wrap
Wrap long lines of text at a specified character width without breaking words mid-syllable.
What Is Word Wrap?
A word wrap tool automatically breaks your text at a specified character width, inserting line breaks so no line exceeds the defined column limit. Enter your character width (80, 72, 100, or any custom value) and the tool reformats your text to fit within that width, breaking at word boundaries to avoid splitting words in the middle.
Word wrap at specific widths is essential for several technical contexts. Email plain-text standards recommend wrapping at 72–78 characters to ensure readability across all email clients. Unix convention in code files is 80 characters. Many documentation standards use 100 or 120 characters. Terminal output benefits from wrapping at terminal width (typically 80 or 120) for clean display. Monospace code files in version control also benefit from consistent line lengths that make diffs easier to read and review.
See also: Remove Line Breaks, Remove Empty Lines, Add Line Numbers, Lorem Ipsum Generator
A very long line of text...→Wrapped at 80 charsWho Should Use This Tool?
Wrap plain-text email content at 72 characters per line — the recommended width for maximum email client compatibility.
Format code comments, README files, and documentation at 80 or 100 characters per line to match project or language style guides.
Wrap configuration file comments and shell script text at terminal-width limits for clean, predictable display in terminal environments.
Key Use Cases
- →Wrap plain-text email content at 72 characters for RFC-compliant email formatting that displays correctly in all clients.
- →Format README.md and documentation files at 80 or 100 characters to match project contribution style guides.
- →Wrap terminal output and shell script comments at 80 characters for display on standard terminal window widths.
- →Reformat imported content from a narrow-width source to a wider display target by rewrapping at a new character limit.
- →Prepare code review patches and diff outputs at consistent line lengths to improve readability in side-by-side diff views.
How to Use Word Wrap
- Paste or type your text into the Input Text box.
- The result appears instantly on the right.
- Click Copy to copy the output to your clipboard.
- Click Clear to reset and process new text.
Common Mistakes & Pro Tips
- !Wrapping structured content like Markdown tables, code blocks, or JSON — hard wrapping these will break their formatting and structure. Only wrap natural-language paragraphs and comment text, not structured data.
- !Confusing visual wrap with hard wrap — most text editors and word processors do visual (soft) wrapping that adjusts to window width without inserting actual line break characters. Word wrap for emails and code files requires hard wrap: actual \n characters inserted in the text at the column boundary.
Frequently Asked Questions
Everything you need to know about Word Wrap
What is the difference between hard wrap and soft wrap?
+
Soft wrap (visual wrap) is what your text editor and browser do by default — text flows to the next visual line when it reaches the edge of its container, but no actual newline character is inserted. The text is one long line in storage. Hard wrap inserts actual newline characters (\n) at the wrap point, making each visual line a separate line in the underlying text. Email, terminals, and some documentation systems require hard wrap.
Why do emails use 72 or 78 character line limits?
+
Email standards RFC 2822 and RFC 5321 recommend lines no longer than 78 characters in plain-text email for compatibility across all mail transfer agents and email clients. The 72-character convention leaves a 6-character margin of safety for quoted reply indentation ("> " prefix adds 2 characters per level of quoting). Long lines may be broken by mail servers, potentially mid-word, so wrapping at 72 prevents server-introduced breaks.
Should code lines be limited to 80 characters?
+
The 80-character limit traces back to 80-column terminal displays from the 1970s. It remains a common convention: PEP 8 (Python) sets 79 characters for code, 72 for docstrings. Most JavaScript and TypeScript projects use 80 or 100. Google's style guides use 80 for most languages. Many teams now use 100 or 120, reflecting modern widescreen displays. The practical goal: lines that fit comfortably in a standard split-editor view without horizontal scrolling.
Does word wrap work on text with existing line breaks?
+
Most word wrap tools first unwrap the existing text (joining lines that were manually wrapped at the old width) then rewrap at the new width. This prevents cumulative wrapping where already-short lines get wrapped again. If your tool doesn't auto-unwrap, run Remove Line Breaks first to join the text into flowing paragraphs, then apply word wrap at the new target width.
What happens to long URLs and non-breaking content?
+
URLs and long identifiers that exceed the wrap width present a challenge. A URL that is 120 characters cannot be wrapped at a word boundary without breaking the URL. Most word wrap tools include the URL on its own line if it's the only token that exceeds the limit, or may break at the closest word boundary before or after the URL. For email and documentation, long URLs are typically placed on their own line or converted to short links.
Related Tools
Last reviewed: August 2026