Text Wrap / Unwrap
Wrap text at specified column width or unwrap text back into paragraphs. Word-aware wrapping, hard vs soft wrap, preserve paragraphs. Free online text wrapping tool.
Why Use a Text Wrap / Unwrap Tool?
Text wrapping is essential when formatting content for terminals, email clients, or any context with limited line width. Our tool supports both wrapping text at a specified column width and unwrapping previously wrapped text back into continuous paragraphs. With word-aware wrapping, paragraph preservation, and hard/soft wrap modes, you have full control over how your text is formatted.
Key Features
- Wrap text at any column width (default 80 characters)
- Unwrap: join lines back into paragraphs
- Preserve paragraphs (double newlines) option when unwrapping
- Word-aware wrapping (soft wrap) vs hard wrap (break mid-word)
- Line count comparison before and after processing
How It Works
- Select Wrap or Unwrap mode
- Configure options: column width for wrapping, or paragraph preservation for unwrapping
- Paste or type your text in the input area
- Copy the processed result to your clipboard
Technical Details
The soft wrap algorithm splits text by whitespace and iteratively builds lines, adding words only if they fit within the specified column width. Hard wrap simply slices the string at the column boundary. The unwrap function distinguishes between single newlines (line breaks to be joined) and double newlines (paragraph separators). All processing is done client-side with no external dependencies.
Frequently Asked Questions
What is the difference between soft wrap and hard wrap?
Soft wrap is word-aware — it never breaks words mid-word, instead moving the entire word to the next line. Hard wrap breaks lines at exactly the specified column width, even if it means splitting a word in the middle.
What does 'Preserve Paragraphs' do when unwrapping?
When unwrapping with 'Preserve Paragraphs' enabled, double newlines (blank lines between paragraphs) are maintained. Only single line breaks within paragraphs are joined. When disabled, all lines are joined into a single paragraph.
What column width should I use?
The default column width of 80 characters is the traditional terminal width and works well for most purposes. For email, 72 characters is common. For code comments or documentation, 80-100 characters is typical.
Related tools
Text Compare
Compare two texts side by side and find differences with highlighted word-by-word diff
Word Counter
Count words, characters, sentences, paragraphs and estimate reading time instantly
Case Converter
Convert text to UPPER CASE, lower case, Title Case, Sentence case, camelCase, PascalCase, snake_case, and kebab-case
Text Repeater
Repeat text multiple times with customizable separator options
Remove Duplicates
Remove duplicate lines from text with options for case sensitivity, trimming, and order preservation
Find & Replace
Find and replace text with support for case sensitivity, whole word matching, and regular expressions