EXHIBIT 23.1 Consent of Ernst & Young LLP, Independent Auditors We consent to the incorporation by reference in the Registration Statements (Form S-3 Nos. 333-85686, 333-92074, 333-100231 and 333-101838),(Form S-8 Nos. 33-99214, 333-32039, 333-83193 and 333-85320) pertaining to the 1995 Stock Option Plan, Employee Stock Purchase Plan, International Employee Stock Purchase Plan, 1995 Non-Employee Directors Stock Option Plan (each as amended and restated January 2, 2002) and (Form S-8 No. 333-63076) pertaining to the Special Stock Option Plan (as amended and restated February 23, 2000) of SanDisk Corporation of our report dated January 20, 2003 (except for the second paragraph of Note 3, as to which the date is February 21, 2003 and except for the first paragraph of Note 3, as to which the date is February 27, 2003) with respect to the consolidated financial statements of SanDisk Corporation included in the Annual Report (Form 10-K) for the year ended December 31, 2002. /s/ Ernst & Young LLP San Jose, California March 25, 2003