# Setting word wrapping and line breaks in text file

**URL:** https://boards.straightdope.com/t/setting-word-wrapping-and-line-breaks-in-text-file/744185
**Category:** Factual Questions
**Created:** [January 25, 2016, 5:00pm UTC](https://boards.straightdope.com/t/setting-word-wrapping-and-line-breaks-in-text-file/744185 "2016-01-25T17:00:30Z")
**Posts on this page:** 3
**Page:** 1

<div class="post-metadata">

### Author: ![Little\_Nemo](https://sea3.discourse-cdn.com/straightdope/user_avatar/boards.straightdope.com/little_nemo/32/3120_2.png) [@Little\_Nemo](https://boards.straightdope.com/u/Little_Nemo)
#### Post date: [January 25, 2016, 5:00pm UTC](https://boards.straightdope.com/t/setting-word-wrapping-and-line-breaks-in-text-file/744185/1 "2016-01-25T17:00:30Z")

</div>

I’m hoping somebody can help me with this.

I’m editing some text documents in WordPad. I want to save the text as close to plain text as possible without a bunch of HTML commands embedded in it. My problem is the original text does not have any breaks between lines. I want to break each line at around seventy-two characters (without splitting words however).

I can set the ruler at seventy-two characters and use the Word Wrap feature to set the text so each line breaks there. But it only displays the text that way; it doesn’t save the breaks.

I can go through and manually break each line but I’m hoping there’s an easier way. Is there any way that I can break the lines and then save the text with the breaks?

---

<div class="post-metadata">

### Author: ![Kimble](https://sea3.discourse-cdn.com/straightdope/user_avatar/boards.straightdope.com/kimble/32/19185_2.png) [@Kimble](https://boards.straightdope.com/u/Kimble)
#### Post date: [January 25, 2016, 8:35pm UTC](https://boards.straightdope.com/t/setting-word-wrapping-and-line-breaks-in-text-file/744185/2 "2016-01-25T20:35:00Z")

</div>

This online tool isn’t great, but it will probably do the job:

[http://tools.zenverse.net/word-wrap/](http://tools.zenverse.net/word-wrap/)

```auto

000000000111111111122222222223333333333444444444455555555556666666666777
123456789012345678901234567890123456789012345678901234567890123456789012
------------------------------------------------------------------------
I'm hoping somebody can help me with this. I'm editing some text
documents in WordPad. I want to save the text as close to plain text as
possible without a bunch of HTML commands embedded in it. My problem is
the original text does not have any breaks between lines. I want to
break each line at around seventy-two characters (without splitting
words however). I can set the ruler at seventy-two characters and use
the Word Wrap feature to set the text so each line breaks there. But it
only displays the text that way; it doesn't save the breaks. I can go
through and manually break each line but I'm hoping there's an easier
way. Is there any way that I can break the lines and then save the text
with the breaks? 

```

Otherwise, most free text processors (Notepad++, TextWrangler if you’re on a Mac) will do this as well. They might be worth downloading if you mess with text regularly.

---

<div class="post-metadata">

### Author: ![psychonaut](https://sea3.discourse-cdn.com/straightdope/user_avatar/boards.straightdope.com/psychonaut/32/4655_2.png) [@psychonaut](https://boards.straightdope.com/u/psychonaut)
#### Post date: [January 25, 2016, 9:11pm UTC](https://boards.straightdope.com/t/setting-word-wrapping-and-line-breaks-in-text-file/744185/3 "2016-01-25T21:11:16Z")

</div>

If you’re OK with using the command line, you could use [fmt](https://en.wikipedia.org/wiki/Fmt):

```auto

fmt -w72 input.txt >output.txt

```

I take it you’re using Microsoft Windows, in which case you can probably get the version of fmt included with [Cygwin](https://www.cygwin.com/).
