Possible Duplicates:
Text Editor for very big file - Windows
What editor/viewer to use to inspect large text based files?

I have a CSV file which has about 4 million rows and is about 500 MB in size. Can you recommend any editor that can open the file without making the system crawl? I tried EmEditor but it is complaining that there are too many characters in a single line.

  • potential duplicates: superuser.com/questions/34749/… and superuser.com/questions/4044/… ... also see the large tag May 6 '10 at 21:29
  • related Stack Overflow question: stackoverflow.com/questions/159521/…
    – dag729
    May 6 '10 at 21:58
  • 2
    @dag: it's not exactly a duplicate if it's not on Super User. we can't close questions as duplicates of cross-site posts. May 6 '10 at 22:08
  • 3
    Both the links to the possible duplicate questions seem to be dead.
    – chrisfs
    Jul 21 '15 at 15:46
  • 1
    Have a look at TextQ (disclaimer - I'm its developer). It can import a big CSV, parse date and numbers, rename or hide columns, and index columns; You can query via a UI Builder or via SQL queries You can export any query to a CSV file, which can be imported in MS Excel or others. You can get it from the Mac App Store or Microsoft Store (soon). Sep 17 at 6:46

Vim should work pretty well if you change a couple settings to turn off swap space and undo functionality: http://vim.wikia.com/wiki/VimTip611


You could give CSVed a try. It claims to load parts of the file on demand, so it might work for you.


I've used JujuEdit (free) to work with 2GB CSVs in the past. Handles 'em pretty well. What are you doing with the contents? Another option might be to make an MS Access linked table pointed to the file if you need to do some querying/sorting/filtering.


Define "edit". How do you want to edit the file? Are you just viewing it, or do you want to make changes? Are they changes that you'd be making programmatically? If so, you may want to look at using awk, sed or Perl to do it.

As to "it is complaining that there are too many characters in a single line," it's probably that it's got line endings it's not able to handle. It would help if you'd tell us what platform you're on.

  • +1 for recommending good UNIX tools, and for the line ending issue troubleshooting suggestion. May 7 '10 at 0:45

I tested all the editors suggested there and the only one that managed to open it (in a reasonable time) was UltraEdit.


It turned out that the file did not have any line break in it (it used some other character for it) so that's why it was difficult to open it. I wrote a program which replaced all these chars with line break and EmEditor opened it in seconds.


I believe that UltraEdit probably could. I've used it on superhuge Gig+ files and it didn't crash out, but really, locating whatever data you are looking for is likely to be a pain. Can you do whatever you need to do programmetrically? Since you said CSV, assume it is text data, so maybe Perl might be a good choice due to its string handling and decent RegEx.

  • Thanks, UltraEdit was the only one that managed to open the file.
    – Giorgi
    May 8 '10 at 13:05
  • @Giorgi: "the only one" out of which? People might be curious to hear the other editors you tried that didn't work. May 8 '10 at 16:59
  • I tried all suggested in this thread.
    – Giorgi
    May 8 '10 at 18:47
  • @Giorgi: There must be something extra-unusual about your file. On my wimpy netbook gVim (with no swap file and disabled undo) opens a 750MB test file in about 10 seconds, and jumps from the beginning to the end of 10 million line file are instantaneous. May 8 '10 at 21:52
  • @Herbert: See my answer below.
    – Giorgi
    May 9 '10 at 9:11

Have you tried Excel? It handled CSV files.

I'm not sure of Excel 2007's file limitation but Excel 2010 64 bit now supports spreadsheets up to 4GB in size.

  • 3
    Excel is terrible at round-tripping CSV files. Getting Excel to save a CSV file back out without mangling it somehow in the process (by Excel making incorrect assumptions about the data formats) is not trivial. For instance, I routinely find fields like employee IDs or SSNs are getting leading zeros removed on saving out from Excel because it assumed they're numeric columns. May 7 '10 at 0:42
  • Yes, a fair point. You can mitigate the problem by specifying the column type (eg Text for a column containing IDs/SSNs with leading zeros) but it must be done manually when opening the file, which is a pain. But if other CSV editors choke on the file size then the round-tripping through Excel may still be worth the additional vigilance required. May 7 '10 at 1:08
  • I was hoping the 64-bit version of Excel would be the solution, but sadly it has the same row limit as the 32-bit version: 1,048,576. The only difference between the two is that 64 can handle files bigger than 2GB
    – atraudes
    Aug 14 '12 at 14:45

Not the answer you're looking for? Browse other questions tagged or ask your own question.