Word Wrapper / Line Breaker
Wrap text to a specified line width with optional indent and break-long-words support.
Run tool
Text formatting for code comments, terminal displays, plain-text emails, and documentation often requires strict column limits. This online word wrapping tool formats your unformatted text into neat, readable blocks constrained to a chosen line length. By default, the tool sets the line width to 80 characters, which fits standard terminal windows and traditional source code styling. You can adjust the width setting to any integer value between 10 and 500 characters to match your specific layout requirements. The formatter supports custom indentation prefixes, inserting your chosen spaces or characters at the start of every generated line. It also includes an option to split words that exceed the target line width, preventing single long terms or URLs from spilling past your boundary. Hyphenated words are split at natural hyphen points when lines wrap. If you submit empty text, the output area simply returns empty text without errors. Paste your text, choose your formatting options, and view clean multi-line output instantly.
Instructions
- Paste or type your content into the Text input area.
- Enter a target line width between 10 and 500 characters, or leave it blank to use the default width of 80.
- Type an optional string or space sequence in the Indent field if you want each line to start with a prefix.
- Select or clear Break Long Words to decide whether words wider than the target width should be split.
- View the formatted text in the output box.
Examples
- Wrapping a 150-character sentence to a width of 40 characters splits the text into clean, four-line output without exceeding column 40.
- Formatting code commentary by setting a line width of 60 and an indent prefix of '// ' prepends each wrapped line with the comment marker.
FAQ
What is the default line width if none is specified?
When you enter text and leave the width field empty, the tool automatically applies a default width of 80 characters.
How are words longer than the line width handled?
When Break Long Words is enabled, words exceeding the target line width are split across lines. When disabled, the word is not broken and may extend beyond the set line width.
Can I use custom characters or symbols for the line indent?
Yes, any text or space sequence entered into the indent field is prepended to the start of every wrapped line.
What are the allowed minimum and maximum width values?
Supplied numeric widths are constrained to a minimum of 10 characters and a maximum of 500 characters.