TextArray
100% local

Word wrap

Wrap text so no line exceeds a set number of characters.

Input
Output

Word wrap

Paste text and wrap it so no line runs past a set width — 80 characters by default, or any limit you type in. Use it to format commit messages and plain-text emails, fit code comments or documentation into a style guide's column limit, prepare text for terminals and fixed-width displays, or tame a wall of text pasted from a PDF.

Two wrapping modes cover the common cases. "Keep existing breaks" wraps each line on its own and leaves your line structure alone, so lists and already-broken text stay intact. "Reflow paragraphs" first joins the lines of each paragraph back together and then wraps the whole paragraph at the new width — the right choice when the text arrived pre-wrapped at some other width and you want clean, even lines. Blank lines between paragraphs are kept either way.

Beyond plain left-aligned wrapping, the alignment option can center every line by padding it with spaces from the left, or justify the text by stretching the spaces between words so each full line reaches the exact width — the last line of each paragraph stays natural. Words longer than the limit normally overflow on their own line; turn on "Break long words" to hard-split them at the width instead, which is handy for long URLs and identifiers.

Everything runs locally in your browser — nothing you paste is uploaded anywhere. The tally under the output shows how many lines went in and came out plus the longest line, so you can confirm the limit holds before you copy the result or download it as a .txt file.

FAQ

What is the difference between keeping breaks and reflowing?
Keeping breaks wraps each existing line separately and never joins lines. Reflowing first merges each paragraph into one stream of words and wraps it fresh, which removes old, uneven breaks.
How are characters counted?
By visible characters (Unicode code points), so accented letters and emoji count as one character each, not by bytes.
What happens to words longer than the width?
By default they stay whole and overflow on their own line. Enable "Break long words" to split them at exactly the width.
Does justification change my words?
No. Justify only widens the spaces between words so full lines reach the set width. The last line of each paragraph is left as it is.
Is my text uploaded anywhere?
No. The tool runs entirely in your browser and your text never leaves your device.