Skip to content

Text Wrapper & Fixed Width Formatter

Insert line breaks at your specified width for READMEs, Git commits, and emails

0
Characters
0
Lines Before
0
Lines After
0
Longest Line

Standard Widths

Custom Width

characters per line

Options

0 line breaks added

Column Width Reference

Width Use Case Standard
72 Plain text emails, Git commit bodies RFC 2822, Git conventions
80 Code comments, terminal output, README files PEP 8, most style guides
100 Modern code with descriptive names Google Java Style Guide
120 Wide monitors, modern IDEs Many modern projects

Why Hard Wrap Your Text?

Need to standardize text for a README file, Git commit, or plain text email? Hard wrapping inserts line breaks at your specified width ensuring text looks consistent on any device or terminal window.

Better Version Control Diffs

Hard wrapping makes Git diffs much easier to read. Without wrapping, changing one word in a paragraph flags the entire paragraph as modified. With 80-character lines, only the affected line shows in the diff.

Preserve Your Formatting

Unlike basic line breakers, this tool respects existing paragraph breaks and indentation. Bullet points, code blocks, and structured content remain readable after wrapping.

Word Boundary Respect

Smart wrapping finds the last space before the column limit rather than chopping words in half. Only enable word breaks when you need strict column alignment for ASCII art or fixed-width tables.

For Developers

Basic word-wrap algorithm in JavaScript:

line.replace(new RegExp(`(.{1,${width}})(\\s|$)`, 'g'), '$1\n').trim()

This breaks at word boundaries up to the specified width.

Frequently Asked Questions