How can I reformat a paragraph in Notepad++?

In UltraEdit I can select one or more long lines and reformat the paragraph to the set right margin (e.g. 60 or 80) by menu command Format/Reformat Paragraph, keyboard shortcut Ctrl + T. Note that it is hard formatting (inserting line ends), not how the document is displayed in the editor.

How can the equivalent be done in Notepad++?

5 Answers 5


It's sort of weird.

If you just want to wrap a paragraph at 72 characters you can just go to TextFX>TextFX Edit>ReWrap Text to (Clipboard or 72) width. Which will re-wrap your selected text to 72 characters.

If you want a 61 or 87 character wrap however, you need to copy the text "61" into your clipboard and then do the same thing (TextFX>TextFX Edit>ReWrap Text to (Clipboardor 72) width).

I'm sure Don HO would be interested in a patch for some TextFX Reformat Paragraph stuff, if you were so inclined.

  • 1
    The clipboard thing is impractical as I am constantly using this feature, but the hardcoded value of 72 is probably acceptable. I will see if I can figure out how to attach a keyboard shortcut to the ReWrap command. Commented Jan 24, 2010 at 23:55
  • 1
    Good-However. It will 'join' my lines together. It does not respect the new-lines I have manually inserted. Commented Sep 17, 2010 at 11:12
  • This doesn't preserve indentation, either
    – endolith
    Commented Oct 16, 2012 at 15:44
  • Note that TextFX is not supported with 64-bit Notepad++. You can, however, keep a 32-bit and a 64-bit version of the program on your machine, and use the 32-bit version to run TextFX. Alternatively, if all you want to do is wrap lines, you can use the methods described in the other answers to this question, which work in the 64-bit version (at least in v7.5.4).
    – Alan
    Commented Jan 22, 2018 at 17:00

This can now be done (at least in v5.9.8) via the combination of some commands in the Edit menu. Edit > Line Operations > Split Lines will insert a hard wrap at the width of the window. The hotkey for this is Ctrl-I. Edit > Line Operations > Join Line will join lines and has a hotkey of Ctrl-J.

So for a paragraph on one line, if you want to wrap at 60 or 80, resize your window to 60 or 80 characters wide, select the line you would like to hard-wrap, and hit Ctrl-I.

Alternatively, if your paragraph was already formatted to a different width, select all the lines of the paragraph and hit Ctrl-J. Then follow the aforementioned steps and you'll have a newly formatted paragraph!

  • 1
    This doesn't preserve indentation of the first line, though.
    – endolith
    Commented Oct 16, 2012 at 15:45
  • 5
    +1 for solution not involving additional plugins
    – Benny
    Commented Dec 28, 2012 at 3:51
  • 1
    this doesn't preserve functional formatting either, eg textbf{beup} isn't considered as one word :( Commented May 20, 2013 at 10:03
  • 1
    I think if you have a vertical edge enabled it wraps to that instead of the window size, as CodeLurker points out in his answer and as I experienced today (npp version=6.9.2).
    – Samuel
    Commented Aug 31, 2016 at 23:25

To put it all together, go to Settings > Preferences > Editing > Show Vertical Edge, and check it. If you don't actually want to see the "Vertical Edge," i.e. the wrapping line, select "Background Mode". Next, set your column width by clicking the number after Number of Columns.

Select your text, then hit Ctrl-J (i.e. Join Lines), Ctrl-I (Split Lines).

Edit: If Show Vertical Edge isn't checked, it wraps to the window instead.

  • This setting has transformed beyond recognition. It's now at: Settings > Preferences > Margins/Border/Edge. There is still a section called Vertical Edge Settings but its contents are now a list of space-separated column numbers. Blue margin lines appear there. Unchanged: Notepad++ is still nearly useless at reformatting paragraphs.
    – Bob Stein
    Commented Nov 2, 2023 at 12:57

Try Settings > Preferences > Editing > Show Vertical Edge


Pro-tip if you're looking to wrap by comma/delimiter (based on the answer by Michael Herold above):

  • Use a macro to separate each symbol into a new line
  • e.g. Home, Ctrl+Right, Right, Enter, for comma-delimited entries
  • then Play back the macro N times
  • Select all
  • Size your window to the desired column width (Settings -> Preferences -> Editing -> Number of Columns, and on the same page Show Verical Edge)
  • Ctrl+J
  • Select all
  • Ctrl+I

This trick will size by e.g. comma delimiter, whereas just using Ctrl+I will not, very useful if you have e.g. 1000+ such lines.

You must log in to answer this question.

Not the answer you're looking for? Browse other questions tagged .