Consent of Independent Registered Public Accounting Firm
We consent to the incorporation by reference in the Registration Statement (Form S-8) pertaining to the Unifirst Corporation 2023 Equity Incentive Plan of UniFirst Corporation of our reports dated October 25, 2023, with respect to the consolidated financial statements and schedule of UniFirst Corporation and subsidiaries and the effectiveness of internal control over financial reporting of UniFirst Corporation and subsidiaries included in its Annual Report (Form 10-K) for the year ended August 26, 2023, filed with the Securities and Exchange Commission.
/s/ Ernst & Young LLP
Boston, Massachusetts
July 3, 2024