EX-5.1

Exhibit 5.1

WILSON SONSINI GOODRICH & ROSATI PROFESSIONAL CORPORATION

July 16, 2013

salesforce.com, inc.

The Landmark @ One Market, Suite 300

San Francisco, CA 94105

Re: Registration Statement on Form S-8

Ladies and Gentlemen:

We have examined the Registration Statement on Form S-8 (the “Registration Statement”) to be filed by salesforce.com, inc., a Delaware corporation, with the Securities and Exchange Commission on or about the date hereof, in connection with the registration under the Securities Act of 1933, as amended, of an aggregate of 3,339,171 shares of your common stock, par value $0.001 per share (the “Shares”), reserved for issuance under the ExactTarget, Inc. 2004 Stock Option Plan, as amended, and the ExactTarget, Inc. 2008 Equity Incentive Plan, as amended (the “Plans”).

We have reviewed such corporate records, certificates and other documents, and such questions of law, as we have considered necessary or appropriate for the purposes of this opinion. We have assumed that all signatures are genuine, that all documents submitted to us as originals are authentic, and that all copies of documents submitted to us conform to the originals. We have relied as to certain matters on information obtained from public officials, officers of the Company, and other sources believed by us to be reliable.

It is our opinion that the Shares, when issued and sold in the manner referred to in the Plans and pursuant to the agreements that accompany the Plans, will be legally and validly issued, fully paid and nonassessable.

We consent to the use of this opinion as an exhibit to the Registration Statement, and further consent to the use of our name wherever appearing in the Registration Statement and any amendments thereto.

Very truly yours,

WILSON SONSINI GOODRICH & ROSATI

Professional Corporation

 /s/ Wilson Sonsini Goodrich & Rosati, P.C.