DuckyTools
Home Text Word Wrap

Word Wrap Text

Hard-wrap text to a fixed column width, with optional indent and hanging indent.

Word Wrap is a free online tool that hard-wrap text to a fixed column width, with optional indent and hanging indent. It runs entirely in your web browser using plain JavaScript, so files are processed on your own device and never uploaded to a server. There is no sign-up, no file size limit imposed by the site, no watermark and no paid tier.

Price
Free — no account, no quota, no watermark
Category
Text
Where it runs
In your browser, on your device
Files uploaded
None
Technology
plain JavaScript
Settings
4
Works offline
Yes, after the first visit

About Word Wrap

Hard wrapping inserts real line breaks, unlike the soft wrapping an editor does at the window edge — the difference matters wherever the text will be read somewhere you do not control. The conventions are specific: git commit bodies wrap at 72 so that `git log`, which indents by four spaces, still fits an 80-column terminal; plain-text email settles at 72–78; and manual pages use 80. The hanging indent handles list items and quoted blocks, where the first line starts further left than the rest.

How to use it

  1. Paste the text you want to run through word wrap.
  2. Set wrap at, indent every line and extra indent after the first line and the remaining options.

The 4 settings

SettingWhat it doesDefault
Wrap atRange 20–160 chars.72 chars
Indent every lineRange 0–20 spaces.0 spaces
Extra indent after the first lineRange 0–20 spaces.0 spaces
Keep paragraph breaksOn or off. On by default.On

Under the hood

Runs onplain JavaScript — runs the whole thing
ControlsWrap at, Indent every line, Extra indent after the first line, Keep paragraph breaks

Questions

Why 72 characters for a commit message?

Because `git log` indents the body by four spaces, and 72 + 4 leaves room inside the 80-column terminal that convention assumes. The subject line is a separate rule — 50 characters, so it fits in `git log --oneline` and in GitHub’s listings.

What if a single word is longer than the width?

It is left intact on its own line rather than broken, and the tool tells you it happened. Breaking a long URL mid-string usually makes it unusable, which is worse than one over-long line.

Should I hard-wrap Markdown?

Opinions differ and both are defensible. Hard wrapping produces readable diffs line by line; soft wrapping means a small edit does not reflow — and therefore rewrite — the whole paragraph in the diff. Pick one per project and be consistent.