Replace "\n" with new line characters, using Notepad++

In case you have a file which contains “escaped” new lines (\n), like this:


and you want to replace the escaped new line sequences with actual new line characters, you can easily accomplish this task using Notepad++.

First load your file (or just copy paste the text) in Notepad++.


Then select Search → Replace from the menu, or hit Ctrl-H. The Replace dialog will show up. Therein make sure that you fill out the following values; Find what: \\n (yes, two back-slashes), Replace with: \n (yes, just one back-slash), and the most important, make sure you select the Extended (\n, \r, \t, \0, \x, …) radio button. Your Replace dialog must look like this:


Click the Replace All button, and all escaped new line sequences will be replaced with new line characters:


I hope this helped!

This entry was posted in Uncategorized. Bookmark the permalink.

85 Responses to Replace "\n" with new line characters, using Notepad++

  1. Max says:

    This really helped me out. Thanks a lot!

  2. Yemi says:

    Thanks for this!! Really helpful!

  3. Jem says:

    Thanks a lot! It works fantastic.


  4. siddhant says:

    nice work…

  5. Lakshman says:

    Thanks for your help. It really works.

  6. Kenneth says:

    Nice, helped me a lot. Thanks!

  7. thanks says:


  8. Midas says:


  9. Raphi says:

    Very handy tip. and exactly what I was looking for. Thanks

  10. Chromsome24 says:

    Ahhh… Thanks for the help..

  11. kalyani says:

    Nice!! It helps

  12. tek says:


    Do you have any idea why this does not work?
    I think, basically the “extended” function is not in my case now. I have used this for 7 years and now it just simply puts /n everywhere.

    If you have any idea, please, help me.


  13. Kanthu says:

    This is giving what exactly I want. Nice.. 🙂

  14. aliaa says:

    Very helpful 🙂

  15. Sharad says:

    It saved me a lot of work.. Thanks..

  16. minh says:

    very helpful, thanks 🙂

  17. God says:

    I as God, blessed you

  18. Prado says:

    Just saved me a lot of hand work 🙂

  19. Sesha says:

    Very Helpful, Thanks !!!

  20. Joe says:

    Awesome! I just read at least 4 or 5 other links but none mentioned that you have to search on double \\ and yours was the only correct reference. Thank you!!!!

  21. Keshav says:

    Thank you very much. Saved me writing a program to do it 🙂

  22. Joshua H says:

    If I could kiss you I would 🙂

  23. kedare says:

    Thanks 🙂

  24. Sujata says:

    Very helpful….Thanks!!!!

  25. Mahesh kohinkar says:

    thanks that works..

  26. HTS says:

    Thank you. This is exactly what I needed.

    I’m surprised Notepad++ doesn’t have a simple command to do this.

  27. Kektklik says:

    Thanks a ton. This will make reading a game’s Manifest.json file a lot easier.. when it finishes inserting 500+ lines.

  28. vicky says:

    thx a lot

  29. Andrew says:

    Great tutorial. I needed to sort this thing out for a database of over 100k, and it worked perfectly. Thank you so much 🙂


  30. STN says:

    wow thank you. Quick and neat 🙂

  31. Pretty simple and nice technique, Thanks for posting this. This is exactly I was looking for.
    Thanks Again……

  32. Biswajeet says:

    Is there any way we can do opposite operation,
    Consider every line ends with EOL

    Can we use EOL\n to replace with EOL, so all the new line can be removed

  33. Germán says:

    Thank you very much! I love notepad ++ a little more every single day 🙂

  34. rajum says:

    nice very help full to me. thanks mate.

  35. Darlene says:

    Thank you so mush, very helpfull 🙂

  36. Vamsi says:

    nice very help ful to me. thanks

  37. sujji says:

    This was very much helpful for me thanks.

  38. Debajyoti Chanda says:

    Thanks for this wonderful tip!!…comes in really handy when handling different types of codes and encoded message segments, especially to view them in a separate new line. Works in reverse mode too when one needs to replace new line with a continuous segment. Thanks for the assistance.

  39. Trapper Barnes says:

    Bless you sir! That’s exactly what I wanted!

  40. johnb says:

    Good info, thanks JB

  41. sinchan says:

    Thanks alot

  42. Vinoth says:

    Thank you so much! This saved me a lot of time!

  43. Ay says:

    Just what I needed. Thanks.

  44. nik_mc says:

    Thank you! This is perfect!

  45. Sarath Pallipravan says:

    It really helped me. Thanks

  46. itroz says:

    thanks for awesome article

  47. Alfonso Sanchez says:


    What’s the code to insert a PAGE BREAK?

    just like this… which is very helpful too..

  48. Ravi Sankar says:

    For me also, It is helpful.

    Thank you.

  49. Akash says:

    Handy thing to be aware of…. Nice Work… Helped a lot

  50. Isak says:


  51. Satheesh says:

    Thank you …It works well…

  52. abdollah saberi says:

    thank you. it was useful

  53. vinita says:

    Very helpful! Thank you!

  54. Trinh Ba Tu says:

    Very helpful! Thank you!

  55. Rafa says:

    I wish all tutorials were merely half as helpful… Quick, easy and short. Thank you very much!

  56. drim3r says:


  57. Khoa says:

    Thank you, you save my job!!!

  58. HawaiianSun says:


  59. André L Sobreiro says:

    Thank you very much.. Really usefull.

  60. Naveen says:

    Thank you so much

  61. Tom says:

    Great ..solved and helped me get rid of manual editing

  62. Christos says:

    Thank you

  63. Dilshan Jayasnka says:


  64. Brandon says:

    Many thanks, very helpful

  65. TXRock says:

    Super Helpful

  66. Gabriel Böhmler says:

    It works very well on notepad++, but when I save the file and open it in the normal notepad, it doesn’t work, the words are not separated per line… instead all of them are together…
    Anybody knows why?

  67. FF says:

    really helpful

  68. thanks says:

    Thanks, A Lot

  69. Suman says:

    Wonderful. worked for me. Thank you.

  70. Thomas says:

    Notepad2, do you know how it works there?

  71. Green says:

    Hi! I’ve never heard of Notepad2. But I’m actively using a Notepad++! Replacement functions are convenient. I often use replacing \t with ;

  72. Manasseh says:

    Awesome !! love it

  73. Anthony says:

    Thank You! You helped me solve the problem.

  74. Sharath says:

    This helped!! Thanks

  75. Andreas says:

    Notepad++ is simply magic. This program can almost do anything a developer might ask for 🙂

Leave a Reply

Your email address will not be published. Required fields are marked *