Quickly Edit CSV Files With Advanced Find & Replace Tools in Notepad++

Chris Hoffman 01-08-2012

edit csv file notepadNotepad++ is an extremely powerful (and free!) text editor. Its find and replace tools can do everything from a simple search and replace in a single file to a regular expression-based search and replace across thousands of files at once. Notepad++ is particularly ideal for quickly editing and changing data in CSV files, but it’s also amazing for editing HTML Top 11 HTML Tags Every Blogger & Website Owner Must Know The world wide web knows many languages and is coded in several different ones. The one language however, that can be found all over and has been around since the invention of webpages, is the... Read More , CSS 4 Free and Excellent Tools for Editing CSS Code Websites are wondrous tools which convey all sorts of information and ideas. They have evolved quite a lot in merely 10 to 15 years, and they are now expected to be top-notch and beautifully designed.... Read More , TXT Edit Text Files In Your Dropbox From Your Browser With TextDropApp Edit any text file in your Dropbox from your browser. It's easy to with TextDropApp, a web-based text editor that uses Dropbox for storage. Whether you want to edit text documents from Chrome OS or... Read More – or any other type of file that can be opened and edited as text.


Comma separated value (CSV) files are a standard way of exchanging data between spreadsheets, databases, and other applications How To Move Your Contacts From Windows Mobile To Android Read More . If you’d like to tweak the data before importing it into another application, Notepad++’s search and replace tools are just the ticket.

Basic Search & Replace

To start performing a search and replace, open the file you want to edit in Notepad++, click the Search menu at the top of the window, and select Find. (You can also press Ctrl+F.) Click the Replace tab, enter your desired text in the Find what and Replace with boxes, and click Replace All.

edit csv file notepad

Although this is a basic, single-document search and replace with no regular expressions, you can customize it quite a bit. For example, if you only want to search and replace for text in part of the file, enable the In selection check box here and select a section of text in the file with your mouse. You can also enable the Match whole word only or Match case check boxes – by default, Notepad++ performs a case-insensitive search and matches all text, whether it’s an entire word or just part of a word.

Search & Replace In Multiple Files

You can easily open multiple documents in Notepad++ – for example, by right-clicking them in Windows Explorer How To Improve Windows Explorer By Adding New Columns Windows Explorer is one of the most used Windows applications and at the same time probably also the least acknowledged productivity tool. You are using Windows Explorer every day to interact with your computer as... Read More and selecting Edit in Notepad++. Once you have, you can use the Replace All in All Opened Documents button instead of the Replace All button to perform a search and replace in all open documents in Notepad++. Once you’ve performed the search and replace, you can click the File menu and select Save All to save all your opened files with a single click.


edit csv file

If you have a directory full of files you want to perform a search and replace on, you can select the Find in Files tab in the search and replace window (or press Ctrl+Shift+F).

From here, you can specify a directory of files you want to perform a search and replace on How to Find and Replace Words in Multiple Files What do you do if you have to replace a single word in dozens or even thousands, of text files? You keep calm and download Notepad++ or Replace Text to do the job in seconds. Read More . By default, Notepad++ will perform a search and replace on all files in subdirectories under this main directory – uncheck the In all sub-folders check box if you just want to perform a search and replace on the files in the top-level directory. You can also use the Filters box to only perform a search and replace on certain files – for example, you could use the filter *.csv to only perform a search and replace on .csv files or *.csv ; *.txt to perform a search and replace on both .csv and .txt files.

edit csv file


Multi-Line Search & Replace

The dialogs built into Notepad++ have one obvious limitation – they can’t search for a multiple-line section of text and replace it. If you’re replacing a chunk of code with another chunk of code, this can be important. To easily perform a multi-line search and replace, try the ToolBucket plugin. You can install it by clicking the Plugins menu in Notepad++, pointing to Plugin Manager, selecting Show Plugin Manager, clicking the check box next to ToolBucket in the list of available plugins, and clicking Install.

After restarting Notepad++ to enable the plugin, click the Plugins menu, point to ToolBucket, and select Multiline find and replace (or press Alt+Shift+F). Unlike Notepad++’s built-in dialogs, this dialog accepts multiple lines of text.

edit csv file

For more awesome Notepad++ plugins, check out our list of recommended Notepad++ plugins Soup Up The Notepad++ Text Editor With Plugins From The Notepad Plus Repository [Windows] Notepad++ is a worthy replacement for Windows’ in-built and much loved text editor, and comes highly recommended if you’re a programmer, web designer or simply someone who finds themselves in need of a powerful plain... Read More .


Extended Search & Replace

Both the single-file and multiple-file search and replace tools support three different search modes – along with the normal search mode, there’s an extended search mode and one that accepts regular expressions.

In extended mode, Notepad++ will accept some specific escape sequences that match special characters – for example, you can search and replace a line feed, carriage return, or tab character. Here are some of the most commonly used escape sequences:

\n – Line feed character. (End-of-line character on Linux The Best Linux Operating Distros The best Linux distros are hard to find. Unless you read our list of the best Linux operating systems for gaming, Raspberry Pi, and more. Read More , Mac OS X, and other UNIX-like operating systems.)

\r – Carriage return character. (End-of-line character on Windows.)

\t – Tab character.

For example, if you wanted to replace all the tab characters in a file, you’d specify \t in the Find box. This can be incorporated into a find and replace string with other characters. Remember, to use these escape sequences, you’ll need to enable Extended mode (they also work in Regular Expression mode).

notepad csv file


Regular Expressions

Notepad++ also supports regular expressions. Regular expressions are a powerful tool for advanced users that can match and modify nearly any type of text you can imagine. For example, the regular expression [0-9] will match all characters between 0 and 9. If you have a file with words like test1, test2, and test3, you can perform a search for test[0-9] and the regular expression will match test1, test2, and test3 – but not testb.

edit csv file notepad

A full tutorial on regular expressions wouldn’t fit here, as it would require an entire book. If you want help learning and testing regular expressions, check out RegExr RegExr: Web Based Regular Expression Testing Tool Read More or Rejex, two web-based regular expression tools we’ve covered in the directory. The Notepad++ wiki also contains a tutorial on using regular expressions in Notepad++.

For more awesome Windows software, check out our list of the best Windows software The Best PC Software for Your Windows Computer Want the best PC software for your Windows computer? Our massive list collects the best and safest programs for all needs. Read More – Notepad++ is on the list!

Do you have any experience using Notepad++’s advanced find and replace tools? Leave a comment and share your knowledge!

Related topics: Notepad, Text Editor.

Affiliate Disclosure: By buying the products we recommend, you help keep the site alive. Read more.

Whatsapp Pinterest

Leave a Reply

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

  1. Kristen
    April 23, 2015 at 11:38 pm

    Can Notepad ++ do a find a replace based on an array or table? I have 261 numbers that need to be found and replaced, I have the data in a table.

  2. Paul
    November 19, 2012 at 12:32 pm

    Problem solved.

    • Chris Hoffman
      November 29, 2012 at 7:26 pm

      How'd you fix it? I'm curious what the issue was!

  3. Paul
    November 19, 2012 at 11:10 am

    I have been searching far & wide for a component that can find a word or a collection of letters in an Excel csv file and thought I'd found the Holly Grail when I came across Notepad ++.

    I probably have, but am not using it correctly.

    I would like to find 'BZM', however it does find some of the occurrences, but not all of them for some reason.

    Is this because usage of Notepad ++ is limited on the free version please?

  4. Kaashif Haja
    August 19, 2012 at 3:08 am

    I love notepad++.
    It has many features, addons.

  5. Shehan Nirmal
    August 10, 2012 at 4:09 pm

    This is the best Notepad I've ever used. It made me work easily with a lot of source codes...

  6. Rigoberto Garcia
    August 2, 2012 at 10:22 pm

    I use TextPad for handling CSV files. Prove the functionality you describe for NotePad + + and decide which to use (TextPad is not free). Thanks for your article Chris

  7. Paul-G
    August 2, 2012 at 11:25 am

    I can also recommend ConTEXT which is also capable of syntax highlighting for a wide range of programming languages.

    • Chris Hoffman
      August 8, 2012 at 3:13 am

      Notepad++ has syntax higlighting too -- is ConTEXT's syntax highlighting better?

  8. Thilina Madhushankha
    August 2, 2012 at 11:08 am

    I'm using this in Windows. Great

  9. Luke Brannon
    August 2, 2012 at 7:35 am

    at one point before I got microsoft expression studio and visual studio I used notepad ++ for all my needs and found it a simple and great way for programming and coding websites! it's a great tool for someone with an old computer who justs wants a bit of lightweight programming software!

    • Chris Hoffman
      August 8, 2012 at 3:13 am

      It's a great tool for anyone who wants lightweight software, no matter how fast the computer!

  10. Vampie C.
    August 2, 2012 at 7:23 am

    Notepad++ is already my favorite for years.
    It easy, portable lightweight and has addons.

    I can't function without it anymore.

    • Chris Hoffman
      August 8, 2012 at 3:12 am

      Me neither, it's absolutely brilliant.

  11. ferdinan Sitohang
    August 2, 2012 at 6:43 am

    I use it previously, nice application, but now i use RJTextEditor, also a great one i think.

    • Chris Hoffman
      August 8, 2012 at 3:12 am

      Interesting, why do you prefer RJTextEditor?

      • ferdinan Sitohang
        August 8, 2012 at 4:40 am

        first is it is free, the interface is nice, it has auto complete syntax, and color syntax.

  12. Charlie Player
    August 2, 2012 at 5:54 am

    uncommon great software

  13. Larry Sessions
    August 2, 2012 at 12:18 am

    I've never found anything to beat Notetab. (not Notepad, not Notepad++, but NOTETAB. There's no beating it for what I need. (And yes, I paid for the full version.)

    • Chris Hoffman
      August 8, 2012 at 3:12 am

      Interesting, never even heard of it. How does it beat Notepad++?

  14. Doc
    August 1, 2012 at 11:55 pm

    The "Extended" mode of search & replace does the job of multi-line search & replace as well...instead of hitting RETURN, use \r\n (for Windows-formatted text files) as a carriage return. No plugin needed.

    • Chris Hoffman
      August 8, 2012 at 3:10 am

      Yup, good point. The plug-in is a bit easier to use though.

  15. karen kocsis
    August 1, 2012 at 11:41 pm

    I used to use notepad a lot on my pc's ... what is there for Mac that's comparable??