QuickLinks -- Click here to rapidly navigate through this document
EXHIBIT 5.1
WILSON SONSINI GOODRICH & ROSATI
Professional Corporation
650 Page Mill Road
Palo Alto, California 94304-1050
Telephone: (650) 493-9300 Facsimile: (650) 493-6811
February 2, 2004
Copart, Inc.
4665 Business Center Drive
Fairfield, CA 94534
- Re:
- Registration Statement on Form S-8
Ladies and Gentlemen:
We have examined the Registration Statement on Form S-8 to be filed by you with the Securities and Exchange Commission on or about February 5, 2004 (the "Registration Statement") in connection with the registration under the Securities Act of 1933, as amended, of 1,000,000 shares of your Common Stock (the "Shares") issuable under the Copart, Inc. 1994 Employee Stock Purchase Plan (the "Plan"). As your counsel in connection with this transaction, we have examined the proceedings taken and are familiar with the proceedings proposed to be taken by you in connection with the issuance and sale of the Shares pursuant to the Plan.
It is our opinion that, when issued and sold in the manner described in the Plan and pursuant to the agreements which accompany each grant under the Plan, the Shares will be legally and validly issued, fully-paid and non-assessable.
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, |
| | |
| | /s/ WILSON SONSINI GOODRICH & ROSATI |
| | |
| | WILSON SONSINI GOODRICH & ROSATI Professional Corporation |
| | |
QuickLinks