EXHIBIT 5.1


                       [Letterhead of Goodwin Procter LLP]




                                February 13, 2002




UniFirst Corporation
68 Jonspin Road
Wilmington, MA  01887

Re:      REGISTRATION STATEMENT ON FORM S-8
         ----------------------------------

Ladies and Gentlemen:

         This opinion is furnished in our capacity as counsel to UniFirst
Corporation, a Massachusetts corporation (the "Company"), in connection with the
preparation and filing with the Securities and Exchange Commission under the
Securities Act of 1933, as amended (the "Act"), of a Registration Statement on
Form S-8 (the "Registration Statement") relating to 300,000 additional shares of
Common Stock, par value $0.10 per share (the "Registered Shares"), which the
Company may issue pursuant to the UniFirst Corporation 1996 Stock Incentive
Plan, as amended through the date hereof (the "Plan").

         As counsel for the Company, we have examined a copy of the Plan and the
Company's Restated Articles of Organization, as amended, and the By-laws, each
as presently in effect, and such records, certificates and other documents of
the Company as we have deemed necessary or appropriate for the purposes of this
opinion.

         We are attorneys admitted to practice in The Commonwealth of
Massachusetts. We express no opinion concerning the laws of any jurisdiction
other than the laws of the United States of America and The Commonwealth of
Massachusetts.

         Based upon the foregoing, we are of the opinion that upon the issuance
and delivery of the Registered Shares against payment therefore in accordance
with the terms of the Plan and any agreement thereunder, the Registered Shares
will be legally issued, fully paid and non-assessable shares of the Company's
Common Stock under the Business Corporation Law of the Commonwealth of
Massachusetts.

         The foregoing assumes that all requisite steps will be taken to comply
with the requirements of the Act, applicable requirements of state laws
regulating the offer and sale of securities and applicable requirements of the
New York Stock Exchange.

         We hereby consent to being named as counsel to the Company in the
Registration Statement and to the inclusion of this opinion as an exhibit to the
Registration Statement.


                                                  Very truly yours,




                                                  /s/ Goodwin Procter  LLP
                                                  ------------------------------
                                                  GOODWIN PROCTER LLP