Word Wrap Tool

Wrap text to a fixed character width on word boundaries.

Free word wrap tool that hard-wraps text to a fixed character width on word boundaries, with an option to break long words. Useful for plain-text email, code comments and terminals. Runs entirely in your browser. It runs free in your browser on Gera Tools, with nothing uploaded.

Last updated Source: Gera Tools

Where does the line break?

Lines are broken at word boundaries (at spaces) so words stay intact and no line exceeds your chosen width, unless a single word is longer than the width.

Wrap text to a fixed width

Plain-text email, code comments, README files, and terminal output often need a fixed line width. This word wrap tool reflows your text so every line stays within the character width you choose, breaking only at word boundaries so words are never split mid-letter (unless you ask it to).

How it works

The tool reads your text word by word and packs as many words as will fit on each line without exceeding your chosen width, then starts a new line. Real newline characters are inserted, so it is a hard wrap that stays put wherever you paste the result. If a single word is longer than the width, it normally sits on its own line; turning on break long words hard-splits it across lines instead, which is handy for long URLs and identifiers.

OptionBehaviour
WidthMaximum characters per line
Break long words offOver-long words stay whole on one line
Break long words onOver-long words are hard-split to fit

Example

Wrapping “The quick brown fox jumps over the lazy dog” to a width of 20 produces:

The quick brown fox
jumps over the lazy
dog

Each line stays at or under 20 characters, and every break falls between words.

Everything runs in your browser — nothing is uploaded.

What width should you use?

The choice of line width depends almost entirely on where the wrapped text will land:

72 characters is the classic standard for plain-text email body text. The IETF’s RFC 2822 recommends keeping lines under 998 characters but suggests 78 as a practical limit; many email clients and mailing-list conventions use 72 to leave headroom for > quotation prefixes that add characters when someone replies.

80 characters is the long-established terminal standard, originating from 80-column punch cards and early VT100 terminals. It remains the default for code comments, many style guides (PEP 8 for Python recommends 79), commit messages, and README files intended to read cleanly in terminal pagers like less.

100 or 120 characters is increasingly common in modern codebases that use wide monitors and configure their editors and linters accordingly. If your team’s style guide uses 100-column line limits (as many TypeScript and Java projects do), wrapping documentation strings and comments to 100 keeps them consistent with the surrounding code.

60 characters is sometimes used for email newsletters and long-form prose that will be read in a rendered email client — narrower columns can improve readability in certain font sizes and viewport widths.

When in doubt, 72 is the safest default for anything that may be read in a plain-text context, and 80 for code.

Hard wrap versus soft wrap

A soft wrap is purely visual — the display reflows lines at the window edge, but the underlying text has no newline characters inserted. Word processors and most modern text editors soft-wrap by default, which is why pasting the same text into two apps can look completely different. A hard wrap inserts actual newline characters, so the lines stay fixed regardless of window width, font, or rendering environment.

Hard wrapping is necessary whenever the target output does not reflow: terminal output piped to a file, git commit messages (where long first lines cause problems in some tools), docstrings in source code, or content sent over SMTP where line length affects deliverability.

This tool always produces a hard wrap. If your source text already contains hard line breaks, the tool first joins them into paragraphs (to avoid wrapping an already-wrapped line to a shorter width than intended) and then re-wraps at your chosen width. Blank lines between paragraphs are preserved as paragraph separators.