Fixed-width Text Wrapper
Wrap paragraphs to a chosen line width without breaking words
Fixed-width Text Wrapper — what it does
Wrap paragraphs to a fixed character width without breaking words mid-way, with an option to preserve the blank lines between paragraphs. It produces the hard-wrapped plain text still expected by commit messages, older email clients, terminal output and monospace documentation.
Worked example
A two-paragraph meeting note wrapped at a line width of 40 with Preserve paragraphs ticked.
Input text
Hi Mark, the Q4 budget review has moved to Thursday 10:30 in the Harbour room. Please bring the updated vendor list and the https://intranet.example.com/finance/q4-budget-review summary. If you cannot make it, send your numbers to ann.lee@example.com by Wednesday noon.
Output — wrapped at 40
Hi Mark, the Q4 budget review has moved to Thursday 10:30 in the Harbour room. Please bring the updated vendor list and the https://intranet.example.com/finance/q4-budget-review summary. If you cannot make it, send your numbers to ann.lee@example.com by Wednesday noon.
The 53-character URL cannot be broken, so it sits alone on an overlong line. With Preserve paragraphs unticked the blank line disappears and both paragraphs are wrapped as one block.
When this tool helps
- Formatting a commit message body to the conventional 72-character width.
- Preparing plain-text email that reads correctly in clients that do not reflow.
- Wrapping text destined for a terminal, README or fixed-width report.
How to use it
- Paste the text to wrap.
- Set the line width in characters.
- Choose whether to preserve paragraph breaks.
- Process and copy or download the wrapped text.
Accuracy, limits, and good practice
- Seventy-two characters is the long-standing convention for email and commit bodies, leaving room for quoting indentation on reply.
- Wrapping inserts real line breaks, so re-wrapping later at a different width means starting from the unwrapped source.
- Words longer than the line width — long URLs especially — cannot be broken without corrupting them and will overhang.
- Wrap last, after all editing is done. Every later edit to a hard-wrapped paragraph leaves ragged lines that have to be re-wrapped.
Frequently asked questions
What width should I choose?
72 for email and commit messages, 80 for terminal and code contexts, 100 or more only for wide monospace documentation.
Will it split words?
No. Wrapping happens at whitespace, so words stay intact even when that leaves a line slightly short.
How do I unwrap text?
Use the join lines tool to recombine hard-wrapped lines back into flowing paragraphs.
Does it preserve indentation?
Leading whitespace on a line is treated as part of the text, so indented blocks need checking after wrapping.
Is there a minimum or default width?
Yes: anything below 5 is raised to 5, and a blank or non-numeric width falls back to 80. At width 5 almost every word gets its own line (the note above becomes 38 lines). Breaks only happen at whitespace, so text without spaces, such as Chinese or Japanese prose, is treated as one word and is not wrapped at all.
What is the downloaded file called, and what does it contain?
Download saves the most recent wrapped result as wrapped-text.txt. It does nothing until you have clicked Wrap at least once, and if you change the width without clicking Wrap again, the file still holds the earlier result.
Related tools on this site
- URL Query Parser & Builder — Inspect URL parameters or build a URL from key-value pairs
- CSS Gradient Generator — Build linear or radial gradients and copy the generated CSS
- JSON to XML — Convert JSON data into an XML document
Further reading: Cleaning Up Text You Pasted From Somewhere Else
Everything above runs inside this page. Fixed-width Text Wrapper needs no account, no upload, and no server round trip — close the tab and nothing is left behind.
固定寬度文字換行能做什麼
把段落依固定字元寬度換行,且不會把單字從中切斷,並可選擇保留段落之間的空行。產出的正是提交訊息、舊式郵件軟體、終端輸出與等寬文件仍在期待的硬換行純文字。
實際範例
兩段會議備忘以 40 字元寬度換行,保留段落有勾選。
原文
Hi Mark, the Q4 budget review has moved to Thursday 10:30 in the Harbour room. Please bring the updated vendor list and the https://intranet.example.com/finance/q4-budget-review summary. If you cannot make it, send your numbers to ann.lee@example.com by Wednesday noon.
換行後(寬度 40)
Hi Mark, the Q4 budget review has moved to Thursday 10:30 in the Harbour room. Please bring the updated vendor list and the https://intranet.example.com/finance/q4-budget-review summary. If you cannot make it, send your numbers to ann.lee@example.com by Wednesday noon.
53 個字元的網址無法拆開,所以單獨佔了一行而且超寬。取消保留段落後空行會消失,兩段會合成一塊一起換行。
什麼時候用得上
- 把提交訊息內文排成慣例的 72 字元寬度。
- 準備在不會自動重排的郵件軟體中也讀得正確的純文字信。
- 為終端機、README 或等寬報表換行文字。
使用步驟
- 貼上要換行的文字。
- 設定每行字元寬度。
- 選擇是否保留段落換行。
- 執行處理,複製或下載結果。
精確度、限制與實務建議
- 72 字元是郵件與提交訊息的長年慣例,回覆時還留得下引文縮排的空間。
- 換行會插入真正的斷行,日後要改寬度必須從未換行的原文重來。
- 比行寬還長的字串(尤其是長網址)無法在不破壞它的前提下切斷,只能超出。
- 請在所有編輯完成後最後才換行。硬換行的段落之後每改一次,就會留下必須重新換行的參差行尾。
常見問題
寬度該選多少?
郵件與提交訊息用 72,終端機與程式情境用 80,寬版等寬文件才用 100 以上。
會把單字切開嗎?
不會。換行只發生在空白處,即使因此讓某行略短,單字仍保持完整。
怎麼把換行還原?
用「合併行」工具把硬換行的文字重新接回連續段落。
會保留縮排嗎?
行首空白視為文字的一部分,因此有縮排的區塊在換行後需要再確認一次。
寬度有最小值或預設值嗎?
有:小於 5 的值會提高到 5,留空或非數字則退回 80。寬度 5 時幾乎每個字各佔一行(上面的備忘會變成 38 行)。另外只會在空白處斷行,所以中文、日文這類沒有空格的文字會被當成一個字,完全不會換行。
下載的檔案叫什麼、內容是什麼?
下載會把最近一次換行的內容存成 wrapped-text.txt;至少按過一次換行按鈕才會有檔案,而且改了寬度卻沒再按換行的話,存下來的仍是先前的內容。
本站相關工具
- URL 查詢參數解析與建立 — 查看網址參數,或由鍵值資料建立完整網址
- CSS 漸層生成器 — 建立線性或放射漸層並複製 CSS 程式碼
- JSON 轉 XML — 將 JSON 資料轉換成 XML 文件
延伸閱讀: 清理從別處貼上的文字
以上步驟全部在這個頁面內完成,固定寬度文字換行 不需要註冊、不上傳檔案、也不經過伺服器,關閉分頁後不會留下任何資料。