How to use the Text Unwrapper
- Paste the hard-wrapped text into Your text.
- Keep Re-join words split with a hyphen at the line end ticked for text from PDFs and books, or untick it for text with many hyphenated compounds.
- Copy the result: one line per paragraph, with a single blank line between paragraphs.
What it does and when to use it
Hard-wrapped text has a line break every 60 to 80 characters, put there by an email program, a typewriter-style file or a PDF layout. Pasted into a word processor, a website form or a phone screen, it shows ragged half-empty lines and breaks in odd places. Unwrapping restores flowing paragraphs that the new app can wrap by itself.
Typical sources:
- plain-text emails and mailing-list archives;
- text copied from PDFs, scanned books and OCR output;
- README and text files formatted for a terminal;
- subtitles and transcripts with one short phrase per line.
The difference from Remove Line Breaks is the hyphen repair and the focus on paragraphs. Here, paragraphs are always kept and words split across lines can be put back together. To wrap the result again at a new width, use the Text Wrapper. If the text also carries stray zero-width characters from the PDF, run the Invisible Character Remover as well.
How it works
First, Windows and old Mac line endings are turned into plain line breaks. The text is then split into paragraphs wherever a blank line appears, and each paragraph is trimmed.
Inside each paragraph, if the hyphen option is on, the tool looks for a letter, a hyphen, a line break and a lowercase letter, and joins them without the hyphen. The hyphen stays when the hyphenated form appears elsewhere in the text or the first part is a compound prefix such as self- or well-; it goes when the joined form appears elsewhere. Next, every remaining line break, with any spaces or tabs around it, becomes a single space. Empty paragraphs are dropped, and the paragraphs are joined with one blank line between them. This all happens in your browser.
Worked examples
Email with a split word. Three lines of an old email, a blank line, then “A new para-” and “graph starts here.” The result is two paragraphs: “Hard-wrapped text from an old email breaks every line at a fixed width.” and “A new paragraph starts here.”
Hyphen option off. The same text with the box unticked keeps the hyphen and adds a space: A new para- graph starts here.
Extra blank lines. “one”, three blank lines, “two”, a line of spaces, “three” becomes three paragraphs separated by exactly one blank line each.
Limits and tips
- Lists and poems are joined too, because each line break inside a paragraph looks like a wrap. Unwrap only the prose sections.
- Indentation at the start of paragraphs is removed.
Frequently asked questions
How does it know where a paragraph ends?
When is a hyphen at the end of a line removed?
Can it damage real hyphenated words?
My text has no blank lines between paragraphs. What happens?
How do we know nothing is uploaded? Test it yourself on the privacy proof page.