Text & Writing

Word Wrap Tool

Format a long plain-text message into shorter lines for notes, email drafts, or documentation. Choose word-aware wrapping or a hard character-cluster limit, preserve existing line boundaries, and decide whether long tokens can be split.

Free online tool

Loading tool…

0 output lines · longest: 0 grapheme clusters · 0 lines exceed the target.

Maximum input: 100,000 UTF-16 code units. Width 1–500 counts grapheme clusters, not pixels or terminal cells. Word mode reduces inline whitespace to one space; hard mode retains it. Existing newlines are preserved as boundaries, with CRLF and CR normalized to LF. Requires Intl.Segmenter. Processing stays in this browser; text is not submitted to a server.

Text is processed locally in your browser. No tool input is sent to a remote processing service.

GET STARTED

How to use the Word Wrap Tool

  1. 01

    Paste the text and set a target width from 1 to 500 grapheme clusters.

  2. 02

    Choose word wrapping to fit words, or hard wrapping to preserve inline whitespace exactly.

  3. 03

    In word mode, decide whether to split words longer than the width.

  4. 04

    Review line count, longest line, and any overlong lines, then copy or download the result.

Examples

Wrap at a word boundary

At width 10, “alpha beta gamma” becomes “alpha beta” on the first line and “gamma” on the next. Word mode inserts one space between retained words.

Choose what happens to a long token

At width 5, “abcdefgh” stays on an overlong line unless splitting is enabled. With splitting enabled, it becomes abcde followed by fgh.

Keep an emoji cluster together

A supported family emoji such as 👨‍👩‍👧‍👦 counts as one grapheme cluster. Hard wrapping does not split the joined sequence into separate family members.

Real newline characters versus visual wrapping

A text editor or browser can visually wrap a long line without changing the underlying text. This tool inserts actual LF newline characters into the output. The preview disables soft wrapping so you can inspect the inserted boundaries, and the download contains those same boundaries. A preset such as 72 or 80 is simply a convenient width choice; it does not guarantee conformance to a particular email, code, or document standard.

Word mode normalizes inline whitespace

Word wrapping extracts non-whitespace tokens from each existing line and fits them into the selected width with one space between adjacent tokens. Leading and trailing whitespace are removed. Tabs, repeated spaces, and other inline whitespace become ordinary single spaces. Blank input lines remain blank boundaries. This is useful for prose, but it can damage indentation or alignment in source code, tables, and poetry. Choose hard mode when preserving those characters matters.

Hard wrapping and oversized words

Hard mode cuts each existing line into chunks of at most the requested number of grapheme clusters. It preserves all inline characters, even when a cut lands inside a word or near a space. Word mode normally leaves a token longer than the width intact and reports an overlong line. Its Split words option instead cuts that token into grapheme-safe chunks. There is no dictionary hyphenation and no hyphen character is inserted.

Grapheme width is not display width

The width is based on the browser’s grapheme segmentation. A tab counts as one cluster even if an editor displays it across several columns. Wide CJK characters and emoji can occupy more display space than Latin letters, while combining sequences may occupy one glyph. The tool does not calculate pixels, terminal cells, font metrics, or Unicode line-breaking opportunities for every language. Existing CRLF and CR boundaries become LF, and existing lines are never joined into a single paragraph.

What to know

  • Maximum input: 100,000 UTF-16 code units; target width: 1–500 grapheme clusters. Requires Intl.Segmenter.
  • No pixel or terminal-cell measurement, dictionary hyphenation, paragraph unwrapping, or full Unicode line-breaking implementation.

Common questions

Can it unwrap paragraphs before wrapping?

No. Existing line breaks remain boundaries. Join unwanted hard breaks separately before wrapping if they belong to one paragraph.

Why does a line exceed my chosen width?

In word mode, a word longer than the target stays intact unless Split words is enabled. The overlong-line count makes these cases visible.

Does width 80 guarantee 80 terminal columns?

No. The setting counts grapheme clusters, not terminal display cells. Tabs, CJK characters, and emoji can occupy different numbers of columns.

Sources & references