Home Text Tools Text Wrap Tool
↩️
Text

Text Wrap Tool

Wrap long lines of text at a custom column width (20–200 characters). Supports smart word-boundary wrapping, paragraph preservation, long-word breaking, unwrap mode, and common width presets for email, code, terminals, and documents.

🔒 Browser-based📐 20–200 char width↩ Wrap & Unwrap👁 Column ruler
Switch Tool:
🔒 100% Private — All processing runs in your browser. Your text is never sent to any server.
← column 80

📖How to Use the Text Wrap Tool

  1. 1
    Paste your text

    Paste any long-form text, email body, code comments, README content, or terminal output into the input box. The current line length distribution is shown so you can see how many lines already exceed your target width before wrapping.

  2. 2
    Set your wrap width and options

    Use the slider or type a number to set your maximum column width. Common presets: 72 (email/RFC 2822), 80 (terminals, classic code), 100 (modern code), 120 (wide code). Toggle Preserve paragraphs to wrap each paragraph independently.

  3. 3
    Wrap, review, and copy

    The wrapped output appears instantly. A column ruler above the output shows the wrap position as a visual guide. Use Unwrap mode to join soft-wrapped lines back into long paragraphs. Copy or download the result.

💡Quick Reference

WidthBest for
40–60 charsMobile / narrow
72 charsEmail (RFC 2822)
80 charsTerminal / PEP 8
100 charsModern code
120 charsWide IDE / docs

Frequently Asked Questions

What is text wrapping and when do I need it?

Hard text wrapping inserts actual line-break characters at a specified column width, so no line exceeds that length in the raw text. This differs from soft wrapping (which your browser or editor does visually without changing the text). You need hard wrapping for plain text emails (RFC 2822 recommends 72 characters), code comments, README files, and text prepared for fixed-width display environments.

What is the standard column width for different contexts?

72 characters is the traditional email standard (RFC 2822). 80 characters is the Unix terminal standard, still used by PEP 8 (Python), many C style guides, and git commit message conventions. 100 characters is a popular modern code standard (Google, Prettier default). 120 characters is used by many IDE defaults.

What does Preserve paragraphs do?

When enabled, the tool treats double line breaks (blank lines) as paragraph separators. Each paragraph is wrapped independently, and the blank line between paragraphs is preserved in the output. When disabled, the entire input is treated as one continuous block — useful when cleaning up text copied from a PDF.

What is Unwrap mode and when should I use it?

Unwrap mode joins hard-wrapped lines back into long paragraphs by replacing single line breaks with spaces. It preserves paragraph structure by keeping double line breaks. This is useful when you have text copied from a PDF, old email with hard wrapping, or README content you want to reformat at a different width.

What happens to words that are longer than the wrap width?

By default, words longer than the wrap width are placed on their own line and allowed to exceed the width. This preserves readability — a long URL or function name is better on its own line than broken mid-character. Enable Break long words to force hard breaks at exactly the wrap width.

Can I use this tool for code comments?

Yes, but with care. The tool wraps at word boundaries (spaces), which is appropriate for natural language comments and docstrings. If your code comments use special formatting (aligned columns, ASCII tables), wrapping may break that alignment. Use a language-aware formatter for code comments in production projects.