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.

$ faq

What is the difference between hard wrap and soft wrap?
Soft wrap is visual only—text adjusts to screen width without changing the file. Hard wrap inserts actual newline characters (\n) into the text so it stays at a fixed width regardless of display. This tool creates hard wraps.
Why is 80 characters the standard text width?
The 80-character limit dates back to IBM punch cards and old terminal screens. Today it remains standard for readability and for viewing two files side-by-side in code diffs and version control systems.
What is the best width for plain text emails?
72 characters is standard for plain text emails. This leaves room for quote characters (>) to be added during replies without breaking formatting or causing ugly line overflows in email chains.
Will this tool break words in the middle?
By default, no. The wrapper respects word boundaries, finding the last space before the limit. Enable"Allow word breaks" only when you need strict column alignment regardless of word integrity.
Why wrap text for Git commit messages?
Git commit bodies should wrap at 72 characters per Git conventions. This ensures readable logs in terminal windows and proper display in various Git tools and interfaces.
Does wrapping preserve my existing paragraphs?
Yes. The tool maintains blank lines between paragraphs and can optionally preserve indentation for bullet points, code blocks, and structured content.