Text Reflow
Reflow wrapped hard-wrapped prose to a target column width without breaking words.
- Runs locally in your browser
- No upload required
Try it
Supported formats
Privacy
Runs entirely in your browser. Your input is never uploaded, stored, or sent to a third party.
Reflowed 2 paragraph(s) to 24 columns; longest line is 24 characters.
How it works
- Split the text on blank lines into paragraphs.
- Flattened soft line breaks inside each paragraph, then greedily packed words into lines of at most the target width.
- Re-joined paragraphs with a single blank line.
- Hard paragraph breaks (one or more blank lines) are preserved; only single line breaks inside a paragraph are treated as soft wrapping.
- A word longer than the target width is placed on its own line rather than split.
Methodology
- Split into paragraphs on runs of blank lines.
- Within each paragraph, collapse whitespace and greedily pack words into lines no longer than the width.
- Re-join paragraphs with a blank line and report the paragraph, line and longest-line counts.
Usage
- Paste the text to reflow.
- Set the target column width.
- Read or copy the reflowed text.
Examples
These are examples, not current values: they use fixed inputs, while the interactive tool computes live results in your browser.
Two columns of hard-wrapped prose
{
"text": "The quick brown fox\njumps over\nthe lazy dog.\n\nSecond paragraph here.",
"width": 24
}Preserve paragraphs
{
"text": "First paragraph.\n\nSecond paragraph.",
"width": 80
}Narrow column
{
"text": "one two three four five six",
"width": 20
}Limitations
Soft versus hard wraps
When an editor wraps long prose it usually inserts a real newline (a *hard* wrap). That is why text copied from a narrow window arrives with short, ragged lines. Reflowing replaces those soft wraps with space and re-wraps at a width you choose.
Blank lines are treated as intentional paragraph breaks and are kept. Because the tool is prose-oriented, apply it to paragraphs rather than to code, tables or lists.
Frequently asked questions
- Will it change my Markdown?
- It reflows the text as prose, so fenced code blocks, tables and list indentation can be altered. Use it on plain paragraphs, not on structured documents.
- How does it treat single versus blank line breaks?
- A single newline is treated as soft wrapping and removed; one or more blank lines mark a hard paragraph break and are preserved.
Sources
Send feedback
Tell us if this tool helped, report a problem, or suggest a tool. Only the message you type is sent — never the input you used in the tool.
Was this tool useful?
Prefer to write to us directly? See the contact page.