TT Text Tools

Word Wrap — Hard Wrap Text at N Columns

Hard-wrap text at 72, 80 or any column width with indent, hanging indent and comment prefixes. Rewrap paragraphs for commit messages, email and code.

🔒 Runs entirely in your browser — nothing is uploaded

columns
Advertisement

Wrap text at a fixed column width

Plain-text formats still have line-length conventions. Git commit message bodies and plain-text email are traditionally wrapped at 72 characters, terminals and many code style guides use 80, and README files, docstrings and configuration comments are easier to read when they do not run off the screen. This word wrap tool inserts real line breaks so that no line is longer than the width you choose, breaking only between words.

Type any width or use the quick buttons for 50, 72, 80 and 100 columns. With "Reflow paragraphs" enabled, the tool first joins the lines inside each paragraph and then wraps them again, so text that was previously wrapped at another width comes out evenly. Blank lines are kept, so paragraphs stay separate. Turn reflow off to wrap each existing line on its own, which preserves short lines such as list items and headings.

Indents, hanging indents and comment prefixes

The indent adds spaces to the start of every output line and counts toward the width, so a 72-column wrap with a 4-space indent still produces lines of at most 72 characters. A hanging indent adds extra spaces to every line except the first, which is the classic layout for bibliography entries, command-line help text and numbered list items.

Choose a prefix to turn the wrapped text into an email quote (> ) or a code comment (# or // ). The prefix is written at the start of each line after the indent, so you can paste the result straight into source code or a reply. Long words such as URLs are never split unless you tick "Break words longer than the width"; the status line warns you when a word is wider than the limit.

Runs in your browser

All wrapping happens locally. Your text is not uploaded, and the result is ready to copy as soon as you type.

How to use

  1. Paste your textAdd paragraphs, a commit message, a comment block or any long lines.
  2. Set the widthType a column count or click 50, 72, 80 or 100.
  3. Add indentationChoose an indent, a hanging indent, and optionally a quote or comment prefix.
  4. Copy the wrapped textThe status line confirms the number of lines and the longest line length.

Frequently asked questions

What is hard wrapping?
Hard wrapping inserts real line breaks so no line exceeds a set number of characters. Soft wrapping, by contrast, only changes how an editor displays long lines.
Which width should I use?
72 characters is the convention for Git commit message bodies and plain-text email, 80 is common for code and terminals, and 100 or 120 is used by some code style guides.
What does "Reflow paragraphs" do?
It joins the existing lines of each paragraph before wrapping, so text that was already wrapped at a different width is rewrapped cleanly. Blank lines between paragraphs are preserved. Turn it off to wrap each line separately.
What happens with words longer than the width?
By default a long word such as a URL is kept on its own line even if it is wider. Tick "Break words longer than the width" to split it.
Advertisement