<?xml version="1.0" encoding="UTF-8"?>

<!--XBRL Document Created with the Workiva Platform-->
<!--Copyright 2026 Workiva-->
<!--r:019ff6f7-6ee2-76d3-959b-21def94da768,g:ce4c0f65-e2d3-4127-9a1b-658c201ea6c9-->
<xs:schema xmlns:xs="http://www.w3.org/2001/XMLSchema" xmlns:link="http://www.xbrl.org/2003/linkbase" xmlns:unf="http://unifirst.com/20260829" xmlns:xbrli="http://www.xbrl.org/2003/instance" xmlns:dtr-types="http://www.xbrl.org/dtr/type/2024-01-31" xmlns:xbrldt="http://xbrl.org/2005/xbrldt" attributeFormDefault="unqualified" elementFormDefault="qualified" targetNamespace="http://unifirst.com/20260829">
  <xs:import namespace="http://fasb.org/srt/2026" schemaLocation="https://xbrl.fasb.org/srt/2026/elts/srt-2026.xsd"/>
  <xs:import namespace="http://fasb.org/us-gaap/2026" schemaLocation="https://xbrl.fasb.org/us-gaap/2026/elts/us-gaap-2026.xsd"/>
  <xs:import namespace="http://www.xbrl.org/2003/instance" schemaLocation="http://www.xbrl.org/2003/xbrl-instance-2003-12-31.xsd"/>
  <xs:import namespace="http://www.xbrl.org/2003/linkbase" schemaLocation="http://www.xbrl.org/2003/xbrl-linkbase-2003-12-31.xsd"/>
  <xs:import namespace="http://www.xbrl.org/dtr/type/2024-01-31" schemaLocation="https://www.xbrl.org/dtr/type/2024-01-31/types.xsd"/>
  <xs:import namespace="http://xbrl.org/2005/xbrldt" schemaLocation="http://www.xbrl.org/2005/xbrldt-2005.xsd"/>
  <xs:import namespace="http://xbrl.sec.gov/country/2026" schemaLocation="https://xbrl.sec.gov/country/2026/country-2026.xsd"/>
  <xs:import namespace="http://xbrl.sec.gov/cyd-af-sub/2026" schemaLocation="https://xbrl.sec.gov/cyd/2026/cyd-af-sub-2026.xsd"/>
  <xs:import namespace="http://xbrl.sec.gov/dei/2026" schemaLocation="https://xbrl.sec.gov/dei/2026/dei-2026.xsd"/>
  <xs:import namespace="http://xbrl.sec.gov/ecd/2026" schemaLocation="https://xbrl.sec.gov/ecd/2026/ecd-2026.xsd"/>
  <xs:annotation>
    <xs:appinfo>
      <link:linkbaseRef xmlns:xlink="http://www.w3.org/1999/xlink" xlink:arcrole="http://www.w3.org/1999/xlink/properties/linkbase" xlink:href="unf-20260829_pre.xml" xlink:role="http://www.xbrl.org/2003/role/presentationLinkbaseRef" xlink:type="simple"/>
      <link:linkbaseRef xmlns:xlink="http://www.w3.org/1999/xlink" xlink:arcrole="http://www.w3.org/1999/xlink/properties/linkbase" xlink:href="unf-20260829_def.xml" xlink:role="http://www.xbrl.org/2003/role/definitionLinkbaseRef" xlink:type="simple"/>
      <link:linkbaseRef xmlns:xlink="http://www.w3.org/1999/xlink" xlink:arcrole="http://www.w3.org/1999/xlink/properties/linkbase" xlink:href="unf-20260829_lab.xml" xlink:role="http://www.xbrl.org/2003/role/labelLinkbaseRef" xlink:type="simple"/>
      <link:linkbaseRef xmlns:xlink="http://www.w3.org/1999/xlink" xlink:arcrole="http://www.w3.org/1999/xlink/properties/linkbase" xlink:href="unf-20260829_cal.xml" xlink:role="http://www.xbrl.org/2003/role/calculationLinkbaseRef" xlink:type="simple"/>
      <link:roleType id="Cover" roleURI="http://unifirst.com/role/Cover">
        <link:definition>0000001 - Document - Cover</link:definition>
        <link:usedOn>link:presentationLink</link:usedOn>
        <link:usedOn>link:calculationLink</link:usedOn>
        <link:usedOn>link:definitionLink</link:usedOn>
      </link:roleType>
      <link:roleType id="AuditInformation" roleURI="http://unifirst.com/role/AuditInformation">
        <link:definition>0000002 - Document - Audit Information</link:definition>
        <link:usedOn>link:presentationLink</link:usedOn>
        <link:usedOn>link:calculationLink</link:usedOn>
        <link:usedOn>link:definitionLink</link:usedOn>
      </link:roleType>
      <link:roleType id="ConsolidatedStatementsofIncome" roleURI="http://unifirst.com/role/ConsolidatedStatementsofIncome">
        <link:definition>9952151 - Statement - Consolidated Statements of Income</link:definition>
        <link:usedOn>link:presentationLink</link:usedOn>
        <link:usedOn>link:calculationLink</link:usedOn>
        <link:usedOn>link:definitionLink</link:usedOn>
      </link:roleType>
      <link:roleType id="ConsolidatedStatementsofComprehensiveIncome" roleURI="http://unifirst.com/role/ConsolidatedStatementsofComprehensiveIncome">
        <link:definition>9952152 - Statement - Consolidated Statements of Comprehensive Income</link:definition>
        <link:usedOn>link:presentationLink</link:usedOn>
        <link:usedOn>link:calculationLink</link:usedOn>
        <link:usedOn>link:definitionLink</link:usedOn>
      </link:roleType>
      <link:roleType id="ConsolidatedBalanceSheets" roleURI="http://unifirst.com/role/ConsolidatedBalanceSheets">
        <link:definition>9952153 - Statement - Consolidated Balance Sheets</link:definition>
        <link:usedOn>link:presentationLink</link:usedOn>
        <link:usedOn>link:calculationLink</link:usedOn>
        <link:usedOn>link:definitionLink</link:usedOn>
      </link:roleType>
      <link:roleType id="ConsolidatedBalanceSheetsParenthetical" roleURI="http://unifirst.com/role/ConsolidatedBalanceSheetsParenthetical">
        <link:definition>9952154 - Statement - Consolidated Balance Sheets (Parenthetical)</link:definition>
        <link:usedOn>link:presentationLink</link:usedOn>
        <link:usedOn>link:calculationLink</link:usedOn>
        <link:usedOn>link:definitionLink</link:usedOn>
      </link:roleType>
      <link:roleType id="ConsolidatedStatementsofShareholdersEquity" roleURI="http://unifirst.com/role/ConsolidatedStatementsofShareholdersEquity">
        <link:definition>9952155 - Statement - Consolidated Statements of Shareholders' Equity</link:definition>
        <link:usedOn>link:presentationLink</link:usedOn>
        <link:usedOn>link:calculationLink</link:usedOn>
        <link:usedOn>link:definitionLink</link:usedOn>
      </link:roleType>
      <link:roleType id="ConsolidatedStatementsofCashFlows" roleURI="http://unifirst.com/role/ConsolidatedStatementsofCashFlows">
        <link:definition>9952156 - Statement - Consolidated Statements of Cash Flows</link:definition>
        <link:usedOn>link:presentationLink</link:usedOn>
        <link:usedOn>link:calculationLink</link:usedOn>
        <link:usedOn>link:definitionLink</link:usedOn>
      </link:roleType>
      <link:roleType id="ConsolidatedStatementsofCashFlowsParenthetical" roleURI="http://unifirst.com/role/ConsolidatedStatementsofCashFlowsParenthetical">
        <link:definition>9952157 - Statement - Consolidated Statements of Cash Flows (Parenthetical)</link:definition>
        <link:usedOn>link:presentationLink</link:usedOn>
        <link:usedOn>link:calculationLink</link:usedOn>
        <link:usedOn>link:definitionLink</link:usedOn>
      </link:roleType>
      <link:roleType id="SummaryofSignificantAccountingPolicies" roleURI="http://unifirst.com/role/SummaryofSignificantAccountingPolicies">
        <link:definition>9952158 - Disclosure - Summary of Significant Accounting Policies</link:definition>
        <link:usedOn>link:presentationLink</link:usedOn>
        <link:usedOn>link:calculationLink</link:usedOn>
        <link:usedOn>link:definitionLink</link:usedOn>
      </link:roleType>
      <link:roleType id="Acquisitions" roleURI="http://unifirst.com/role/Acquisitions">
        <link:definition>9952159 - Disclosure - Acquisitions</link:definition>
        <link:usedOn>link:presentationLink</link:usedOn>
        <link:usedOn>link:calculationLink</link:usedOn>
        <link:usedOn>link:definitionLink</link:usedOn>
      </link:roleType>
      <link:roleType id="FairValueMeasurements" roleURI="http://unifirst.com/role/FairValueMeasurements">
        <link:definition>9952160 - Disclosure - Fair Value Measurements</link:definition>
        <link:usedOn>link:presentationLink</link:usedOn>
        <link:usedOn>link:calculationLink</link:usedOn>
        <link:usedOn>link:definitionLink</link:usedOn>
      </link:roleType>
      <link:roleType id="IncomeTaxes" roleURI="http://unifirst.com/role/IncomeTaxes">
        <link:definition>9952161 - Disclosure - Income Taxes</link:definition>
        <link:usedOn>link:presentationLink</link:usedOn>
        <link:usedOn>link:calculationLink</link:usedOn>
        <link:usedOn>link:definitionLink</link:usedOn>
      </link:roleType>
      <link:roleType id="LongTermDebt" roleURI="http://unifirst.com/role/LongTermDebt">
        <link:definition>9952162 - Disclosure - Long-Term Debt</link:definition>
        <link:usedOn>link:presentationLink</link:usedOn>
        <link:usedOn>link:calculationLink</link:usedOn>
        <link:usedOn>link:definitionLink</link:usedOn>
      </link:roleType>
      <link:roleType id="EmployeeBenefitPlans" roleURI="http://unifirst.com/role/EmployeeBenefitPlans">
        <link:definition>9952163 - Disclosure - Employee Benefit Plans</link:definition>
        <link:usedOn>link:presentationLink</link:usedOn>
        <link:usedOn>link:calculationLink</link:usedOn>
        <link:usedOn>link:definitionLink</link:usedOn>
      </link:roleType>
      <link:roleType id="GoodwillandOtherIntangibleAssets" roleURI="http://unifirst.com/role/GoodwillandOtherIntangibleAssets">
        <link:definition>9952164 - Disclosure - Goodwill and Other Intangible Assets</link:definition>
        <link:usedOn>link:presentationLink</link:usedOn>
        <link:usedOn>link:calculationLink</link:usedOn>
        <link:usedOn>link:definitionLink</link:usedOn>
      </link:roleType>
      <link:roleType id="AccruedLiabilities" roleURI="http://unifirst.com/role/AccruedLiabilities">
        <link:definition>9952165 - Disclosure - Accrued Liabilities</link:definition>
        <link:usedOn>link:presentationLink</link:usedOn>
        <link:usedOn>link:calculationLink</link:usedOn>
        <link:usedOn>link:definitionLink</link:usedOn>
      </link:roleType>
      <link:roleType id="AssetRetirementObligations" roleURI="http://unifirst.com/role/AssetRetirementObligations">
        <link:definition>9952166 - Disclosure - Asset Retirement Obligations</link:definition>
        <link:usedOn>link:presentationLink</link:usedOn>
        <link:usedOn>link:calculationLink</link:usedOn>
        <link:usedOn>link:definitionLink</link:usedOn>
      </link:roleType>
      <link:roleType id="CommitmentsandContingencies" roleURI="http://unifirst.com/role/CommitmentsandContingencies">
        <link:definition>9952167 - Disclosure - Commitments and Contingencies</link:definition>
        <link:usedOn>link:presentationLink</link:usedOn>
        <link:usedOn>link:calculationLink</link:usedOn>
        <link:usedOn>link:definitionLink</link:usedOn>
      </link:roleType>
      <link:roleType id="ShareBasedCompensation" roleURI="http://unifirst.com/role/ShareBasedCompensation">
        <link:definition>9952168 - Disclosure - Share-Based Compensation</link:definition>
        <link:usedOn>link:presentationLink</link:usedOn>
        <link:usedOn>link:calculationLink</link:usedOn>
        <link:usedOn>link:definitionLink</link:usedOn>
      </link:roleType>
      <link:roleType id="ShareholdersEquity" roleURI="http://unifirst.com/role/ShareholdersEquity">
        <link:definition>9952169 - Disclosure - Shareholders' Equity</link:definition>
        <link:usedOn>link:presentationLink</link:usedOn>
        <link:usedOn>link:calculationLink</link:usedOn>
        <link:usedOn>link:definitionLink</link:usedOn>
      </link:roleType>
      <link:roleType id="AccumulatedOtherComprehensiveLoss" roleURI="http://unifirst.com/role/AccumulatedOtherComprehensiveLoss">
        <link:definition>9952170 - Disclosure - Accumulated Other Comprehensive Loss</link:definition>
        <link:usedOn>link:presentationLink</link:usedOn>
        <link:usedOn>link:calculationLink</link:usedOn>
        <link:usedOn>link:definitionLink</link:usedOn>
      </link:roleType>
      <link:roleType id="SegmentReporting" roleURI="http://unifirst.com/role/SegmentReporting">
        <link:definition>9952171 - Disclosure - Segment Reporting</link:definition>
        <link:usedOn>link:presentationLink</link:usedOn>
        <link:usedOn>link:calculationLink</link:usedOn>
        <link:usedOn>link:definitionLink</link:usedOn>
      </link:roleType>
      <link:roleType id="RelatedParty" roleURI="http://unifirst.com/role/RelatedParty">
        <link:definition>9952172 - Disclosure - Related Party</link:definition>
        <link:usedOn>link:presentationLink</link:usedOn>
        <link:usedOn>link:calculationLink</link:usedOn>
        <link:usedOn>link:definitionLink</link:usedOn>
      </link:roleType>
      <link:roleType id="SummaryofSignificantAccountingPoliciesPolicies" roleURI="http://unifirst.com/role/SummaryofSignificantAccountingPoliciesPolicies">
        <link:definition>9955511 - Disclosure - Summary of Significant Accounting Policies (Policies)</link:definition>
        <link:usedOn>link:presentationLink</link:usedOn>
        <link:usedOn>link:calculationLink</link:usedOn>
        <link:usedOn>link:definitionLink</link:usedOn>
      </link:roleType>
      <link:roleType id="SummaryofSignificantAccountingPoliciesTables" roleURI="http://unifirst.com/role/SummaryofSignificantAccountingPoliciesTables">
        <link:definition>9955512 - Disclosure - Summary of Significant Accounting Policies (Tables)</link:definition>
        <link:usedOn>link:presentationLink</link:usedOn>
        <link:usedOn>link:calculationLink</link:usedOn>
        <link:usedOn>link:definitionLink</link:usedOn>
      </link:roleType>
      <link:roleType id="AcquisitionsTables" roleURI="http://unifirst.com/role/AcquisitionsTables">
        <link:definition>9955513 - Disclosure - Acquisitions (Tables)</link:definition>
        <link:usedOn>link:presentationLink</link:usedOn>
        <link:usedOn>link:calculationLink</link:usedOn>
        <link:usedOn>link:definitionLink</link:usedOn>
      </link:roleType>
      <link:roleType id="FairValueMeasurementsTables" roleURI="http://unifirst.com/role/FairValueMeasurementsTables">
        <link:definition>9955514 - Disclosure - Fair Value Measurements (Tables)</link:definition>
        <link:usedOn>link:presentationLink</link:usedOn>
        <link:usedOn>link:calculationLink</link:usedOn>
        <link:usedOn>link:definitionLink</link:usedOn>
      </link:roleType>
      <link:roleType id="IncomeTaxesTables" roleURI="http://unifirst.com/role/IncomeTaxesTables">
        <link:definition>9955515 - Disclosure - Income Taxes (Tables)</link:definition>
        <link:usedOn>link:presentationLink</link:usedOn>
        <link:usedOn>link:calculationLink</link:usedOn>
        <link:usedOn>link:definitionLink</link:usedOn>
      </link:roleType>
      <link:roleType id="EmployeeBenefitPlansTables" roleURI="http://unifirst.com/role/EmployeeBenefitPlansTables">
        <link:definition>9955516 - Disclosure - Employee Benefit Plans (Tables)</link:definition>
        <link:usedOn>link:presentationLink</link:usedOn>
        <link:usedOn>link:calculationLink</link:usedOn>
        <link:usedOn>link:definitionLink</link:usedOn>
      </link:roleType>
      <link:roleType id="GoodwillandOtherIntangibleAssetsTables" roleURI="http://unifirst.com/role/GoodwillandOtherIntangibleAssetsTables">
        <link:definition>9955517 - Disclosure - Goodwill and Other Intangible Assets (Tables)</link:definition>
        <link:usedOn>link:presentationLink</link:usedOn>
        <link:usedOn>link:calculationLink</link:usedOn>
        <link:usedOn>link:definitionLink</link:usedOn>
      </link:roleType>
      <link:roleType id="AccruedLiabilitiesTables" roleURI="http://unifirst.com/role/AccruedLiabilitiesTables">
        <link:definition>9955518 - Disclosure - Accrued Liabilities (Tables)</link:definition>
        <link:usedOn>link:presentationLink</link:usedOn>
        <link:usedOn>link:calculationLink</link:usedOn>
        <link:usedOn>link:definitionLink</link:usedOn>
      </link:roleType>
      <link:roleType id="AssetRetirementObligationsTables" roleURI="http://unifirst.com/role/AssetRetirementObligationsTables">
        <link:definition>9955519 - Disclosure - Asset Retirement Obligations (Tables)</link:definition>
        <link:usedOn>link:presentationLink</link:usedOn>
        <link:usedOn>link:calculationLink</link:usedOn>
        <link:usedOn>link:definitionLink</link:usedOn>
      </link:roleType>
      <link:roleType id="CommitmentsandContingenciesTables" roleURI="http://unifirst.com/role/CommitmentsandContingenciesTables">
        <link:definition>9955520 - Disclosure - Commitments and Contingencies (Tables)</link:definition>
        <link:usedOn>link:presentationLink</link:usedOn>
        <link:usedOn>link:calculationLink</link:usedOn>
        <link:usedOn>link:definitionLink</link:usedOn>
      </link:roleType>
      <link:roleType id="ShareBasedCompensationTables" roleURI="http://unifirst.com/role/ShareBasedCompensationTables">
        <link:definition>9955521 - Disclosure - Share-Based Compensation (Tables)</link:definition>
        <link:usedOn>link:presentationLink</link:usedOn>
        <link:usedOn>link:calculationLink</link:usedOn>
        <link:usedOn>link:definitionLink</link:usedOn>
      </link:roleType>
      <link:roleType id="AccumulatedOtherComprehensiveLossTables" roleURI="http://unifirst.com/role/AccumulatedOtherComprehensiveLossTables">
        <link:definition>9955522 - Disclosure - Accumulated Other Comprehensive Loss (Tables)</link:definition>
        <link:usedOn>link:presentationLink</link:usedOn>
        <link:usedOn>link:calculationLink</link:usedOn>
        <link:usedOn>link:definitionLink</link:usedOn>
      </link:roleType>
      <link:roleType id="SegmentReportingTables" roleURI="http://unifirst.com/role/SegmentReportingTables">
        <link:definition>9955523 - Disclosure - Segment Reporting (Tables)</link:definition>
        <link:usedOn>link:presentationLink</link:usedOn>
        <link:usedOn>link:calculationLink</link:usedOn>
        <link:usedOn>link:definitionLink</link:usedOn>
      </link:roleType>
      <link:roleType id="SummaryofSignificantAccountingPoliciesNarrativeDetails" roleURI="http://unifirst.com/role/SummaryofSignificantAccountingPoliciesNarrativeDetails">
        <link:definition>9955524 - Disclosure - Summary of Significant Accounting Policies - Narrative (Details)</link:definition>
        <link:usedOn>link:presentationLink</link:usedOn>
        <link:usedOn>link:calculationLink</link:usedOn>
        <link:usedOn>link:definitionLink</link:usedOn>
      </link:roleType>
      <link:roleType id="SummaryofSignificantAccountingPoliciesScheduleofChangeinAllowanceforCreditLossesDetails" roleURI="http://unifirst.com/role/SummaryofSignificantAccountingPoliciesScheduleofChangeinAllowanceforCreditLossesDetails">
        <link:definition>9955525 - Disclosure - Summary of Significant Accounting Policies - Schedule of Change in Allowance for Credit Losses (Details)</link:definition>
        <link:usedOn>link:presentationLink</link:usedOn>
        <link:usedOn>link:calculationLink</link:usedOn>
        <link:usedOn>link:definitionLink</link:usedOn>
      </link:roleType>
      <link:roleType id="SummaryofSignificantAccountingPoliciesScheduleofTotalRevenueDisaggregatedbyServiceTypeDetails" roleURI="http://unifirst.com/role/SummaryofSignificantAccountingPoliciesScheduleofTotalRevenueDisaggregatedbyServiceTypeDetails">
        <link:definition>9955526 - Disclosure - Summary of Significant Accounting Policies - Schedule of Total Revenue Disaggregated by Service Type (Details)</link:definition>
        <link:usedOn>link:presentationLink</link:usedOn>
        <link:usedOn>link:calculationLink</link:usedOn>
        <link:usedOn>link:definitionLink</link:usedOn>
      </link:roleType>
      <link:roleType id="SummaryofSignificantAccountingPoliciesScheduleofDeferredCommissionsDetails" roleURI="http://unifirst.com/role/SummaryofSignificantAccountingPoliciesScheduleofDeferredCommissionsDetails">
        <link:definition>9955527 - Disclosure - Summary of Significant Accounting Policies - Schedule of Deferred Commissions (Details)</link:definition>
        <link:usedOn>link:presentationLink</link:usedOn>
        <link:usedOn>link:calculationLink</link:usedOn>
        <link:usedOn>link:definitionLink</link:usedOn>
      </link:roleType>
      <link:roleType id="SummaryofSignificantAccountingPoliciesScheduleofAmortizationExpenseRelatedtoDeferredCommissionsDetails" roleURI="http://unifirst.com/role/SummaryofSignificantAccountingPoliciesScheduleofAmortizationExpenseRelatedtoDeferredCommissionsDetails">
        <link:definition>9955528 - Disclosure - Summary of Significant Accounting Policies - Schedule of Amortization Expense Related to Deferred Commissions (Details)</link:definition>
        <link:usedOn>link:presentationLink</link:usedOn>
        <link:usedOn>link:calculationLink</link:usedOn>
        <link:usedOn>link:definitionLink</link:usedOn>
      </link:roleType>
      <link:roleType id="SummaryofSignificantAccountingPoliciesScheduleofComponentsofInventoryDetails" roleURI="http://unifirst.com/role/SummaryofSignificantAccountingPoliciesScheduleofComponentsofInventoryDetails">
        <link:definition>9955529 - Disclosure - Summary of Significant Accounting Policies - Schedule of Components of Inventory (Details)</link:definition>
        <link:usedOn>link:presentationLink</link:usedOn>
        <link:usedOn>link:calculationLink</link:usedOn>
        <link:usedOn>link:definitionLink</link:usedOn>
      </link:roleType>
      <link:roleType id="SummaryofSignificantAccountingPoliciesScheduleofComponentsofPropertyPlantandEquipmentDetails" roleURI="http://unifirst.com/role/SummaryofSignificantAccountingPoliciesScheduleofComponentsofPropertyPlantandEquipmentDetails">
        <link:definition>9955530 - Disclosure - Summary of Significant Accounting Policies - Schedule of Components of Property, Plant and Equipment (Details)</link:definition>
        <link:usedOn>link:presentationLink</link:usedOn>
        <link:usedOn>link:calculationLink</link:usedOn>
        <link:usedOn>link:definitionLink</link:usedOn>
      </link:roleType>
      <link:roleType id="SummaryofSignificantAccountingPoliciesScheduleofUsefulLivesofPropertyPlantandEquipmentDetails" roleURI="http://unifirst.com/role/SummaryofSignificantAccountingPoliciesScheduleofUsefulLivesofPropertyPlantandEquipmentDetails">
        <link:definition>9955531 - Disclosure - Summary of Significant Accounting Policies - Schedule of Useful Lives of Property, Plant and Equipment (Details)</link:definition>
        <link:usedOn>link:presentationLink</link:usedOn>
        <link:usedOn>link:calculationLink</link:usedOn>
        <link:usedOn>link:definitionLink</link:usedOn>
      </link:roleType>
      <link:roleType id="SummaryofSignificantAccountingPoliciesScheduleofComputationofBasicIncomePerShareDetails" roleURI="http://unifirst.com/role/SummaryofSignificantAccountingPoliciesScheduleofComputationofBasicIncomePerShareDetails">
        <link:definition>9955532 - Disclosure - Summary of Significant Accounting Policies - Schedule of Computation of Basic Income Per Share (Details)</link:definition>
        <link:usedOn>link:presentationLink</link:usedOn>
        <link:usedOn>link:calculationLink</link:usedOn>
        <link:usedOn>link:definitionLink</link:usedOn>
      </link:roleType>
      <link:roleType id="SummaryofSignificantAccountingPoliciesScheduleofComputationofDilutedIncomePerShareDetails" roleURI="http://unifirst.com/role/SummaryofSignificantAccountingPoliciesScheduleofComputationofDilutedIncomePerShareDetails">
        <link:definition>9955533 - Disclosure - Summary of Significant Accounting Policies - Schedule of Computation of Diluted Income Per Share (Details)</link:definition>
        <link:usedOn>link:presentationLink</link:usedOn>
        <link:usedOn>link:calculationLink</link:usedOn>
        <link:usedOn>link:definitionLink</link:usedOn>
      </link:roleType>
      <link:roleType id="AcquisitionsNarrativeDetails" roleURI="http://unifirst.com/role/AcquisitionsNarrativeDetails">
        <link:definition>9955534 - Disclosure - Acquisitions - Narrative (Details)</link:definition>
        <link:usedOn>link:presentationLink</link:usedOn>
        <link:usedOn>link:calculationLink</link:usedOn>
        <link:usedOn>link:definitionLink</link:usedOn>
      </link:roleType>
      <link:roleType id="AcquisitionsScheduleofAggregateInformationRelatingtoAcquisitionofBusinessesDetails" roleURI="http://unifirst.com/role/AcquisitionsScheduleofAggregateInformationRelatingtoAcquisitionofBusinessesDetails">
        <link:definition>9955535 - Disclosure - Acquisitions - Schedule of Aggregate Information Relating to Acquisition of Businesses (Details)</link:definition>
        <link:usedOn>link:presentationLink</link:usedOn>
        <link:usedOn>link:calculationLink</link:usedOn>
        <link:usedOn>link:definitionLink</link:usedOn>
      </link:roleType>
      <link:roleType id="FairValueMeasurementsScheduleofAssetsorLiabilitiesMeasuredatFairValueonaRecurringBasisDetails" roleURI="http://unifirst.com/role/FairValueMeasurementsScheduleofAssetsorLiabilitiesMeasuredatFairValueonaRecurringBasisDetails">
        <link:definition>9955536 - Disclosure - Fair Value Measurements - Schedule of Assets or Liabilities Measured at Fair Value on a Recurring Basis (Details)</link:definition>
        <link:usedOn>link:presentationLink</link:usedOn>
        <link:usedOn>link:calculationLink</link:usedOn>
        <link:usedOn>link:definitionLink</link:usedOn>
      </link:roleType>
      <link:roleType id="FairValueMeasurementsNarrativeDetails" roleURI="http://unifirst.com/role/FairValueMeasurementsNarrativeDetails">
        <link:definition>9955537 - Disclosure - Fair Value Measurements - Narrative (Details)</link:definition>
        <link:usedOn>link:presentationLink</link:usedOn>
        <link:usedOn>link:calculationLink</link:usedOn>
        <link:usedOn>link:definitionLink</link:usedOn>
      </link:roleType>
      <link:roleType id="IncomeTaxesScheduleofIncomeBeforeTaxesDetails" roleURI="http://unifirst.com/role/IncomeTaxesScheduleofIncomeBeforeTaxesDetails">
        <link:definition>9955538 - Disclosure - Income Taxes - Schedule of Income Before Taxes (Details)</link:definition>
        <link:usedOn>link:presentationLink</link:usedOn>
        <link:usedOn>link:calculationLink</link:usedOn>
        <link:usedOn>link:definitionLink</link:usedOn>
      </link:roleType>
      <link:roleType id="IncomeTaxesScheduleofProvisionforIncomeTaxesDetails" roleURI="http://unifirst.com/role/IncomeTaxesScheduleofProvisionforIncomeTaxesDetails">
        <link:definition>9955539 - Disclosure - Income Taxes - Schedule of Provision for Income Taxes (Details)</link:definition>
        <link:usedOn>link:presentationLink</link:usedOn>
        <link:usedOn>link:calculationLink</link:usedOn>
        <link:usedOn>link:definitionLink</link:usedOn>
      </link:roleType>
      <link:roleType id="IncomeTaxesScheduleofEffectiveFederalTaxRateReconciliationDetails" roleURI="http://unifirst.com/role/IncomeTaxesScheduleofEffectiveFederalTaxRateReconciliationDetails">
        <link:definition>9955540 - Disclosure - Income Taxes - Schedule of Effective Federal Tax Rate Reconciliation (Details)</link:definition>
        <link:usedOn>link:presentationLink</link:usedOn>
        <link:usedOn>link:calculationLink</link:usedOn>
        <link:usedOn>link:definitionLink</link:usedOn>
      </link:roleType>
      <link:roleType id="IncomeTaxesScheduleofReconciliationofProvisionforIncomeTaxesDetails" roleURI="http://unifirst.com/role/IncomeTaxesScheduleofReconciliationofProvisionforIncomeTaxesDetails">
        <link:definition>9955541 - Disclosure - Income Taxes - Schedule of Reconciliation of Provision for Income Taxes (Details)</link:definition>
        <link:usedOn>link:presentationLink</link:usedOn>
        <link:usedOn>link:calculationLink</link:usedOn>
        <link:usedOn>link:definitionLink</link:usedOn>
      </link:roleType>
      <link:roleType id="IncomeTaxesNarrativeDetails" roleURI="http://unifirst.com/role/IncomeTaxesNarrativeDetails">
        <link:definition>9955542 - Disclosure - Income Taxes - Narrative (Details)</link:definition>
        <link:usedOn>link:presentationLink</link:usedOn>
        <link:usedOn>link:calculationLink</link:usedOn>
        <link:usedOn>link:definitionLink</link:usedOn>
      </link:roleType>
      <link:roleType id="IncomeTaxesScheduleofComponentsofDeferredIncomeTaxesDetails" roleURI="http://unifirst.com/role/IncomeTaxesScheduleofComponentsofDeferredIncomeTaxesDetails">
        <link:definition>9955543 - Disclosure - Income Taxes - Schedule of Components of Deferred Income Taxes (Details)</link:definition>
        <link:usedOn>link:presentationLink</link:usedOn>
        <link:usedOn>link:calculationLink</link:usedOn>
        <link:usedOn>link:definitionLink</link:usedOn>
      </link:roleType>
      <link:roleType id="IncomeTaxesScheduleofReconciliationofUnrecognizedTaxBenefitsDetails" roleURI="http://unifirst.com/role/IncomeTaxesScheduleofReconciliationofUnrecognizedTaxBenefitsDetails">
        <link:definition>9955544 - Disclosure - Income Taxes - Schedule of Reconciliation of Unrecognized Tax Benefits (Details)</link:definition>
        <link:usedOn>link:presentationLink</link:usedOn>
        <link:usedOn>link:calculationLink</link:usedOn>
        <link:usedOn>link:definitionLink</link:usedOn>
      </link:roleType>
      <link:roleType id="LongTermDebtDetails" roleURI="http://unifirst.com/role/LongTermDebtDetails">
        <link:definition>9955545 - Disclosure - Long-Term Debt (Details)</link:definition>
        <link:usedOn>link:presentationLink</link:usedOn>
        <link:usedOn>link:calculationLink</link:usedOn>
        <link:usedOn>link:definitionLink</link:usedOn>
      </link:roleType>
      <link:roleType id="EmployeeBenefitPlansNarrativeDetails" roleURI="http://unifirst.com/role/EmployeeBenefitPlansNarrativeDetails">
        <link:definition>9955546 - Disclosure - Employee Benefit Plans - Narrative (Details)</link:definition>
        <link:usedOn>link:presentationLink</link:usedOn>
        <link:usedOn>link:calculationLink</link:usedOn>
        <link:usedOn>link:definitionLink</link:usedOn>
      </link:roleType>
      <link:roleType id="EmployeeBenefitPlansScheduleofComponentsofNetPeriodicBenefitCostDetails" roleURI="http://unifirst.com/role/EmployeeBenefitPlansScheduleofComponentsofNetPeriodicBenefitCostDetails">
        <link:definition>9955547 - Disclosure - Employee Benefit Plans - Schedule of Components of Net Periodic Benefit Cost (Details)</link:definition>
        <link:usedOn>link:presentationLink</link:usedOn>
        <link:usedOn>link:calculationLink</link:usedOn>
        <link:usedOn>link:definitionLink</link:usedOn>
      </link:roleType>
      <link:roleType id="EmployeeBenefitPlansScheduleofObligationsandFundedStatusDetails" roleURI="http://unifirst.com/role/EmployeeBenefitPlansScheduleofObligationsandFundedStatusDetails">
        <link:definition>9955548 - Disclosure - Employee Benefit Plans - Schedule of Obligations and Funded Status (Details)</link:definition>
        <link:usedOn>link:presentationLink</link:usedOn>
        <link:usedOn>link:calculationLink</link:usedOn>
        <link:usedOn>link:definitionLink</link:usedOn>
      </link:roleType>
      <link:roleType id="EmployeeBenefitPlansScheduleofAmountsRecordedinConsolidatedBalanceSheetDetails" roleURI="http://unifirst.com/role/EmployeeBenefitPlansScheduleofAmountsRecordedinConsolidatedBalanceSheetDetails">
        <link:definition>9955549 - Disclosure - Employee Benefit Plans - Schedule of Amounts Recorded in Consolidated Balance Sheet (Details)</link:definition>
        <link:usedOn>link:presentationLink</link:usedOn>
        <link:usedOn>link:calculationLink</link:usedOn>
        <link:usedOn>link:definitionLink</link:usedOn>
      </link:roleType>
      <link:roleType id="EmployeeBenefitPlansScheduleofAmountsRecognizedinAccumulatedOtherComprehensiveLossDetails" roleURI="http://unifirst.com/role/EmployeeBenefitPlansScheduleofAmountsRecognizedinAccumulatedOtherComprehensiveLossDetails">
        <link:definition>9955550 - Disclosure - Employee Benefit Plans - Schedule of Amounts Recognized in Accumulated Other Comprehensive Loss (Details)</link:definition>
        <link:usedOn>link:presentationLink</link:usedOn>
        <link:usedOn>link:calculationLink</link:usedOn>
        <link:usedOn>link:definitionLink</link:usedOn>
      </link:roleType>
      <link:roleType id="EmployeeBenefitPlansScheduleofWeightedAverageAssumptionsUsedinCalculatingProjectedBenefitObligationDetails" roleURI="http://unifirst.com/role/EmployeeBenefitPlansScheduleofWeightedAverageAssumptionsUsedinCalculatingProjectedBenefitObligationDetails">
        <link:definition>9955551 - Disclosure - Employee Benefit Plans - Schedule of Weighted Average Assumptions Used in Calculating Projected Benefit Obligation (Details)</link:definition>
        <link:usedOn>link:presentationLink</link:usedOn>
        <link:usedOn>link:calculationLink</link:usedOn>
        <link:usedOn>link:definitionLink</link:usedOn>
      </link:roleType>
      <link:roleType id="EmployeeBenefitPlansScheduleofWeightedAverageAssumptionsUsedinCalculatingNetPeriodicBenefitCostDetails" roleURI="http://unifirst.com/role/EmployeeBenefitPlansScheduleofWeightedAverageAssumptionsUsedinCalculatingNetPeriodicBenefitCostDetails">
        <link:definition>9955552 - Disclosure - Employee Benefit Plans - Schedule of Weighted Average Assumptions Used in Calculating Net Periodic Benefit Cost (Details)</link:definition>
        <link:usedOn>link:presentationLink</link:usedOn>
        <link:usedOn>link:calculationLink</link:usedOn>
        <link:usedOn>link:definitionLink</link:usedOn>
      </link:roleType>
      <link:roleType id="EmployeeBenefitPlansScheduleofExpectedBenefitPaymentsDetails" roleURI="http://unifirst.com/role/EmployeeBenefitPlansScheduleofExpectedBenefitPaymentsDetails">
        <link:definition>9955553 - Disclosure - Employee Benefit Plans - Schedule of Expected Benefit Payments (Details)</link:definition>
        <link:usedOn>link:presentationLink</link:usedOn>
        <link:usedOn>link:calculationLink</link:usedOn>
        <link:usedOn>link:definitionLink</link:usedOn>
      </link:roleType>
      <link:roleType id="GoodwillandOtherIntangibleAssetsNarrativeDetails" roleURI="http://unifirst.com/role/GoodwillandOtherIntangibleAssetsNarrativeDetails">
        <link:definition>9955554 - Disclosure - Goodwill and Other Intangible Assets - Narrative (Details)</link:definition>
        <link:usedOn>link:presentationLink</link:usedOn>
        <link:usedOn>link:calculationLink</link:usedOn>
        <link:usedOn>link:definitionLink</link:usedOn>
      </link:roleType>
      <link:roleType id="GoodwillandOtherIntangibleAssetsScheduleofChangesinCarryingAmountofGoodwillDetails" roleURI="http://unifirst.com/role/GoodwillandOtherIntangibleAssetsScheduleofChangesinCarryingAmountofGoodwillDetails">
        <link:definition>9955555 - Disclosure - Goodwill and Other Intangible Assets - Schedule of Changes in Carrying Amount of Goodwill (Details)</link:definition>
        <link:usedOn>link:presentationLink</link:usedOn>
        <link:usedOn>link:calculationLink</link:usedOn>
        <link:usedOn>link:definitionLink</link:usedOn>
      </link:roleType>
      <link:roleType id="GoodwillandOtherIntangibleAssetsScheduleofIntangibleAssetsNetDetails" roleURI="http://unifirst.com/role/GoodwillandOtherIntangibleAssetsScheduleofIntangibleAssetsNetDetails">
        <link:definition>9955556 - Disclosure - Goodwill and Other Intangible Assets - Schedule of Intangible Assets, Net (Details)</link:definition>
        <link:usedOn>link:presentationLink</link:usedOn>
        <link:usedOn>link:calculationLink</link:usedOn>
        <link:usedOn>link:definitionLink</link:usedOn>
      </link:roleType>
      <link:roleType id="GoodwillandOtherIntangibleAssetsScheduleofEstimatedFutureAmortizationExpenseDetails" roleURI="http://unifirst.com/role/GoodwillandOtherIntangibleAssetsScheduleofEstimatedFutureAmortizationExpenseDetails">
        <link:definition>9955557 - Disclosure - Goodwill and Other Intangible Assets - Schedule of Estimated Future Amortization Expense (Details)</link:definition>
        <link:usedOn>link:presentationLink</link:usedOn>
        <link:usedOn>link:calculationLink</link:usedOn>
        <link:usedOn>link:definitionLink</link:usedOn>
      </link:roleType>
      <link:roleType id="AccruedLiabilitiesDetails" roleURI="http://unifirst.com/role/AccruedLiabilitiesDetails">
        <link:definition>9955558 - Disclosure - Accrued Liabilities (Details)</link:definition>
        <link:usedOn>link:presentationLink</link:usedOn>
        <link:usedOn>link:calculationLink</link:usedOn>
        <link:usedOn>link:definitionLink</link:usedOn>
      </link:roleType>
      <link:roleType id="AssetRetirementObligationsNarrativeDetails" roleURI="http://unifirst.com/role/AssetRetirementObligationsNarrativeDetails">
        <link:definition>9955559 - Disclosure - Asset Retirement Obligations - Narrative (Details)</link:definition>
        <link:usedOn>link:presentationLink</link:usedOn>
        <link:usedOn>link:calculationLink</link:usedOn>
        <link:usedOn>link:definitionLink</link:usedOn>
      </link:roleType>
      <link:roleType id="AssetRetirementObligationsScheduleofRollforwardofAssetRetirementLiabilityDetails" roleURI="http://unifirst.com/role/AssetRetirementObligationsScheduleofRollforwardofAssetRetirementLiabilityDetails">
        <link:definition>9955560 - Disclosure - Asset Retirement Obligations - Schedule of Rollforward of Asset Retirement Liability (Details)</link:definition>
        <link:usedOn>link:presentationLink</link:usedOn>
        <link:usedOn>link:calculationLink</link:usedOn>
        <link:usedOn>link:definitionLink</link:usedOn>
      </link:roleType>
      <link:roleType id="CommitmentsandContingenciesScheduleofOperatingLeaseCostandInformationRelatedtoOperatingLeaseRightofuseAssetsNetandOperatingLeaseLiabilitiesDetails" roleURI="http://unifirst.com/role/CommitmentsandContingenciesScheduleofOperatingLeaseCostandInformationRelatedtoOperatingLeaseRightofuseAssetsNetandOperatingLeaseLiabilitiesDetails">
        <link:definition>9955561 - Disclosure - Commitments and Contingencies - Schedule of Operating Lease Cost and Information Related to Operating Lease Right-of-use Assets, Net and Operating Lease Liabilities (Details)</link:definition>
        <link:usedOn>link:presentationLink</link:usedOn>
        <link:usedOn>link:calculationLink</link:usedOn>
        <link:usedOn>link:definitionLink</link:usedOn>
      </link:roleType>
      <link:roleType id="CommitmentsandContingenciesNarrativeDetails" roleURI="http://unifirst.com/role/CommitmentsandContingenciesNarrativeDetails">
        <link:definition>9955562 - Disclosure - Commitments and Contingencies - Narrative (Details)</link:definition>
        <link:usedOn>link:presentationLink</link:usedOn>
        <link:usedOn>link:calculationLink</link:usedOn>
        <link:usedOn>link:definitionLink</link:usedOn>
      </link:roleType>
      <link:roleType id="CommitmentsandContingenciesScheduleofContractualFutureMinimumLeasePaymentsofOperatingLeaseLiabilitiesDetails" roleURI="http://unifirst.com/role/CommitmentsandContingenciesScheduleofContractualFutureMinimumLeasePaymentsofOperatingLeaseLiabilitiesDetails">
        <link:definition>9955563 - Disclosure - Commitments and Contingencies - Schedule of Contractual Future Minimum Lease Payments of Operating Lease Liabilities (Details)</link:definition>
        <link:usedOn>link:presentationLink</link:usedOn>
        <link:usedOn>link:calculationLink</link:usedOn>
        <link:usedOn>link:definitionLink</link:usedOn>
      </link:roleType>
      <link:roleType id="CommitmentsandContingenciesScheduleofContractualFutureMinimumLeasePaymentsofOperatingLeaseLiabilitiesDetails_1" roleURI="http://unifirst.com/role/CommitmentsandContingenciesScheduleofContractualFutureMinimumLeasePaymentsofOperatingLeaseLiabilitiesDetails_1">
        <link:definition>9955563 - Disclosure - Commitments and Contingencies - Schedule of Contractual Future Minimum Lease Payments of Operating Lease Liabilities (Details)</link:definition>
        <link:usedOn>link:presentationLink</link:usedOn>
        <link:usedOn>link:calculationLink</link:usedOn>
        <link:usedOn>link:definitionLink</link:usedOn>
      </link:roleType>
      <link:roleType id="CommitmentsandContingenciesScheduleofChangestoEnvironmentalLiabilitiesDetails" roleURI="http://unifirst.com/role/CommitmentsandContingenciesScheduleofChangestoEnvironmentalLiabilitiesDetails">
        <link:definition>9955564 - Disclosure - Commitments and Contingencies - Schedule of Changes to Environmental Liabilities (Details)</link:definition>
        <link:usedOn>link:presentationLink</link:usedOn>
        <link:usedOn>link:calculationLink</link:usedOn>
        <link:usedOn>link:definitionLink</link:usedOn>
      </link:roleType>
      <link:roleType id="CommitmentsandContingenciesScheduleofAnticipatedPaymentsandInsuranceProceedsofCurrentlyIdentifiedEnvironmentalRemediationLiabilitiesDetails" roleURI="http://unifirst.com/role/CommitmentsandContingenciesScheduleofAnticipatedPaymentsandInsuranceProceedsofCurrentlyIdentifiedEnvironmentalRemediationLiabilitiesDetails">
        <link:definition>9955565 - Disclosure - Commitments and Contingencies - Schedule of Anticipated Payments and Insurance Proceeds of Currently Identified Environmental Remediation Liabilities (Details)</link:definition>
        <link:usedOn>link:presentationLink</link:usedOn>
        <link:usedOn>link:calculationLink</link:usedOn>
        <link:usedOn>link:definitionLink</link:usedOn>
      </link:roleType>
      <link:roleType id="CommitmentsandContingenciesScheduleofAnticipatedPaymentsandInsuranceProceedsofCurrentlyIdentifiedEnvironmentalRemediationLiabilitiesDetails_1" roleURI="http://unifirst.com/role/CommitmentsandContingenciesScheduleofAnticipatedPaymentsandInsuranceProceedsofCurrentlyIdentifiedEnvironmentalRemediationLiabilitiesDetails_1">
        <link:definition>9955565 - Disclosure - Commitments and Contingencies - Schedule of Anticipated Payments and Insurance Proceeds of Currently Identified Environmental Remediation Liabilities (Details)</link:definition>
        <link:usedOn>link:presentationLink</link:usedOn>
        <link:usedOn>link:calculationLink</link:usedOn>
        <link:usedOn>link:definitionLink</link:usedOn>
      </link:roleType>
      <link:roleType id="ShareBasedCompensationNarrativeDetails" roleURI="http://unifirst.com/role/ShareBasedCompensationNarrativeDetails">
        <link:definition>9955566 - Disclosure - Share-Based Compensation - Narrative (Details)</link:definition>
        <link:usedOn>link:presentationLink</link:usedOn>
        <link:usedOn>link:calculationLink</link:usedOn>
        <link:usedOn>link:definitionLink</link:usedOn>
      </link:roleType>
      <link:roleType id="ShareBasedCompensationScheduleofWeightedAverageAssumptionsDetails" roleURI="http://unifirst.com/role/ShareBasedCompensationScheduleofWeightedAverageAssumptionsDetails">
        <link:definition>9955567 - Disclosure - Share-Based Compensation - Schedule of Weighted Average Assumptions (Details)</link:definition>
        <link:usedOn>link:presentationLink</link:usedOn>
        <link:usedOn>link:calculationLink</link:usedOn>
        <link:usedOn>link:definitionLink</link:usedOn>
      </link:roleType>
      <link:roleType id="ShareBasedCompensationScheduleofShareBasedAwardActivityforStockOptionsandStockAppreciationRightsDetails" roleURI="http://unifirst.com/role/ShareBasedCompensationScheduleofShareBasedAwardActivityforStockOptionsandStockAppreciationRightsDetails">
        <link:definition>9955568 - Disclosure - Share-Based Compensation - Schedule of Share-Based Award Activity for Stock Options and Stock Appreciation Rights (Details)</link:definition>
        <link:usedOn>link:presentationLink</link:usedOn>
        <link:usedOn>link:calculationLink</link:usedOn>
        <link:usedOn>link:definitionLink</link:usedOn>
      </link:roleType>
      <link:roleType id="ShareBasedCompensationScheduleofShareBasedAwardActivityforRestrictedStockUnitsDetails" roleURI="http://unifirst.com/role/ShareBasedCompensationScheduleofShareBasedAwardActivityforRestrictedStockUnitsDetails">
        <link:definition>9955569 - Disclosure - Share-Based Compensation - Schedule of Share-Based Award Activity for Restricted Stock Units (Details)</link:definition>
        <link:usedOn>link:presentationLink</link:usedOn>
        <link:usedOn>link:calculationLink</link:usedOn>
        <link:usedOn>link:definitionLink</link:usedOn>
      </link:roleType>
      <link:roleType id="ShareholdersEquityDetails" roleURI="http://unifirst.com/role/ShareholdersEquityDetails">
        <link:definition>9955570 - Disclosure - Shareholders' Equity (Details)</link:definition>
        <link:usedOn>link:presentationLink</link:usedOn>
        <link:usedOn>link:calculationLink</link:usedOn>
        <link:usedOn>link:definitionLink</link:usedOn>
      </link:roleType>
      <link:roleType id="AccumulatedOtherComprehensiveLossScheduleofComponentsofAccumulatedOtherComprehensiveLossDetails" roleURI="http://unifirst.com/role/AccumulatedOtherComprehensiveLossScheduleofComponentsofAccumulatedOtherComprehensiveLossDetails">
        <link:definition>9955571 - Disclosure - Accumulated Other Comprehensive Loss - Schedule of Components of Accumulated Other Comprehensive Loss (Details)</link:definition>
        <link:usedOn>link:presentationLink</link:usedOn>
        <link:usedOn>link:calculationLink</link:usedOn>
        <link:usedOn>link:definitionLink</link:usedOn>
      </link:roleType>
      <link:roleType id="AccumulatedOtherComprehensiveLossScheduleofAmountsReclassifiedfromAccumulatedOtherComprehensiveLossDetails" roleURI="http://unifirst.com/role/AccumulatedOtherComprehensiveLossScheduleofAmountsReclassifiedfromAccumulatedOtherComprehensiveLossDetails">
        <link:definition>9955572 - Disclosure - Accumulated Other Comprehensive Loss - Schedule of Amounts Reclassified from Accumulated Other Comprehensive Loss (Details)</link:definition>
        <link:usedOn>link:presentationLink</link:usedOn>
        <link:usedOn>link:calculationLink</link:usedOn>
        <link:usedOn>link:definitionLink</link:usedOn>
      </link:roleType>
      <link:roleType id="SegmentReportingNarrativeDetails" roleURI="http://unifirst.com/role/SegmentReportingNarrativeDetails">
        <link:definition>9955573 - Disclosure - Segment Reporting - Narrative (Details)</link:definition>
        <link:usedOn>link:presentationLink</link:usedOn>
        <link:usedOn>link:calculationLink</link:usedOn>
        <link:usedOn>link:definitionLink</link:usedOn>
      </link:roleType>
      <link:roleType id="SegmentReportingScheduleofSegmentReportingInformationDetails" roleURI="http://unifirst.com/role/SegmentReportingScheduleofSegmentReportingInformationDetails">
        <link:definition>9955574 - Disclosure - Segment Reporting - Schedule of Segment Reporting Information (Details)</link:definition>
        <link:usedOn>link:presentationLink</link:usedOn>
        <link:usedOn>link:calculationLink</link:usedOn>
        <link:usedOn>link:definitionLink</link:usedOn>
      </link:roleType>
      <link:roleType id="SegmentReportingScheduleofReconciliationofTotalSegmentOperatingIncometoConsolidatedNetIncomeDetails" roleURI="http://unifirst.com/role/SegmentReportingScheduleofReconciliationofTotalSegmentOperatingIncometoConsolidatedNetIncomeDetails">
        <link:definition>9955575 - Disclosure - Segment Reporting - Schedule of Reconciliation of Total Segment Operating Income to Consolidated Net Income (Details)</link:definition>
        <link:usedOn>link:presentationLink</link:usedOn>
        <link:usedOn>link:calculationLink</link:usedOn>
        <link:usedOn>link:definitionLink</link:usedOn>
      </link:roleType>
      <link:roleType id="SegmentReportingScheduleofLongLivedAssetsbyGeographicAreaDetails" roleURI="http://unifirst.com/role/SegmentReportingScheduleofLongLivedAssetsbyGeographicAreaDetails">
        <link:definition>9955576 - Disclosure - Segment Reporting - Schedule of Long-Lived Assets by Geographic Area (Details)</link:definition>
        <link:usedOn>link:presentationLink</link:usedOn>
        <link:usedOn>link:calculationLink</link:usedOn>
        <link:usedOn>link:definitionLink</link:usedOn>
      </link:roleType>
      <link:roleType id="SegmentReportingScheduleofRevenuesandIncomeBeforeIncomeTaxesbyGeographicAreaDetails" roleURI="http://unifirst.com/role/SegmentReportingScheduleofRevenuesandIncomeBeforeIncomeTaxesbyGeographicAreaDetails">
        <link:definition>9955577 - Disclosure - Segment Reporting - Schedule of Revenues and Income Before Income Taxes by Geographic Area (Details)</link:definition>
        <link:usedOn>link:presentationLink</link:usedOn>
        <link:usedOn>link:calculationLink</link:usedOn>
        <link:usedOn>link:definitionLink</link:usedOn>
      </link:roleType>
      <link:roleType id="RelatedPartyDetails" roleURI="http://unifirst.com/role/RelatedPartyDetails">
        <link:definition>9955578 - Disclosure - Related Party (Details)</link:definition>
        <link:usedOn>link:presentationLink</link:usedOn>
        <link:usedOn>link:calculationLink</link:usedOn>
        <link:usedOn>link:definitionLink</link:usedOn>
      </link:roleType>
    </xs:appinfo>
  </xs:annotation>
  <xs:element id="unf_AuditorInformationAbstract" abstract="true" name="AuditorInformationAbstract" nillable="true" xbrli:periodType="duration" substitutionGroup="xbrli:item" type="xbrli:stringItemType"/>
  <xs:element id="unf_RentalMerchandiseInService" abstract="false" name="RentalMerchandiseInService" nillable="true" xbrli:periodType="instant" xbrli:balance="debit" substitutionGroup="xbrli:item" type="xbrli:monetaryItemType"/>
  <xs:element id="unf_PrepaidTaxesCurrent" abstract="false" name="PrepaidTaxesCurrent" nillable="true" xbrli:periodType="instant" xbrli:balance="debit" substitutionGroup="xbrli:item" type="xbrli:monetaryItemType"/>
  <xs:element id="unf_AccruedAndDeferredIncomeTaxesLongTerm" abstract="false" name="AccruedAndDeferredIncomeTaxesLongTerm" nillable="true" xbrli:periodType="instant" xbrli:balance="credit" substitutionGroup="xbrli:item" type="xbrli:monetaryItemType"/>
  <xs:element id="unf_StockIssuedDuringPeriodSharesShareBasedCompensationExercised" abstract="false" name="StockIssuedDuringPeriodSharesShareBasedCompensationExercised" nillable="true" xbrli:periodType="duration" substitutionGroup="xbrli:item" type="xbrli:sharesItemType"/>
  <xs:element id="unf_StockIssuedDuringPeriodValueShareBasedCompensationExercised" abstract="false" name="StockIssuedDuringPeriodValueShareBasedCompensationExercised" nillable="true" xbrli:periodType="duration" xbrli:balance="credit" substitutionGroup="xbrli:item" type="xbrli:monetaryItemType"/>
  <xs:element id="unf_AccretionOnEnvironmentalContingencies" abstract="false" name="AccretionOnEnvironmentalContingencies" nillable="true" xbrli:periodType="duration" xbrli:balance="debit" substitutionGroup="xbrli:item" type="xbrli:monetaryItemType"/>
  <xs:element id="unf_IncreaseDecreaseInRentalMerchandiseInService" abstract="false" name="IncreaseDecreaseInRentalMerchandiseInService" nillable="true" xbrli:periodType="duration" xbrli:balance="credit" substitutionGroup="xbrli:item" type="xbrli:monetaryItemType"/>
  <xs:element id="unf_AccruedLiabilitiesTextBlock" abstract="false" name="AccruedLiabilitiesTextBlock" nillable="true" xbrli:periodType="duration" substitutionGroup="xbrli:item" type="dtr-types:textBlockItemType"/>
  <xs:element id="unf_BasisOfPresentationPolicyTextBlock" abstract="false" name="BasisOfPresentationPolicyTextBlock" nillable="true" xbrli:periodType="duration" substitutionGroup="xbrli:item" type="dtr-types:textBlockItemType"/>
  <xs:element id="unf_CashCashEquivalentAndShortTermInvestmentPolicyPolicyTextBlock" abstract="false" name="CashCashEquivalentAndShortTermInvestmentPolicyPolicyTextBlock" nillable="true" xbrli:periodType="duration" substitutionGroup="xbrli:item" type="dtr-types:textBlockItemType"/>
  <xs:element id="unf_CostsToObtainContractPolicyTextBlock" abstract="false" name="CostsToObtainContractPolicyTextBlock" nillable="true" xbrli:periodType="duration" substitutionGroup="xbrli:item" type="dtr-types:textBlockItemType"/>
  <xs:element id="unf_CloudComputingArrangementsPolicyTextBlock" abstract="false" name="CloudComputingArrangementsPolicyTextBlock" nillable="true" xbrli:periodType="duration" substitutionGroup="xbrli:item" type="dtr-types:textBlockItemType"/>
  <xs:element id="unf_InsurancePolicyTextBlock" abstract="false" name="InsurancePolicyTextBlock" nillable="true" xbrli:periodType="duration" substitutionGroup="xbrli:item" type="dtr-types:textBlockItemType"/>
  <xs:element id="unf_NonqualifiedDeferredCompensationPlanPolicyPolicyTextBlock" abstract="false" name="NonqualifiedDeferredCompensationPlanPolicyPolicyTextBlock" nillable="true" xbrli:periodType="duration" substitutionGroup="xbrli:item" type="dtr-types:textBlockItemType"/>
  <xs:element id="unf_UsefulLifeOfPropertyPlantAndEquipmentTableTextBlock" abstract="false" name="UsefulLifeOfPropertyPlantAndEquipmentTableTextBlock" nillable="true" xbrli:periodType="duration" substitutionGroup="xbrli:item" type="dtr-types:textBlockItemType"/>
  <xs:element id="unf_ScheduleOfAssumptionsUsedInCalculatingNetPeriodicServiceCostTableTextBlock" abstract="false" name="ScheduleOfAssumptionsUsedInCalculatingNetPeriodicServiceCostTableTextBlock" nillable="true" xbrli:periodType="duration" substitutionGroup="xbrli:item" type="dtr-types:textBlockItemType"/>
  <xs:element id="unf_ScheduleOfOperatingLeaseCostAndOperatingCashFlowImpactsTableTextBlock" abstract="false" name="ScheduleOfOperatingLeaseCostAndOperatingCashFlowImpactsTableTextBlock" nillable="true" xbrli:periodType="duration" substitutionGroup="xbrli:item" type="dtr-types:textBlockItemType"/>
  <xs:element id="unf_ScheduleOfEnvironmentalLiabilitiesTableTextBlock" abstract="false" name="ScheduleOfEnvironmentalLiabilitiesTableTextBlock" nillable="true" xbrli:periodType="duration" substitutionGroup="xbrli:item" type="dtr-types:textBlockItemType"/>
  <xs:element id="unf_ScheduleOfEnvironmentalRemediationLiabilitiesTableTextBlock" abstract="false" name="ScheduleOfEnvironmentalRemediationLiabilitiesTableTextBlock" nillable="true" xbrli:periodType="duration" substitutionGroup="xbrli:item" type="dtr-types:textBlockItemType"/>
  <xs:element id="unf_SummaryOfSignificantAccountingPoliciesTable" abstract="true" name="SummaryOfSignificantAccountingPoliciesTable" nillable="true" xbrli:periodType="duration" substitutionGroup="xbrldt:hypercubeItem" type="xbrli:stringItemType"/>
  <xs:element id="unf_CintasCorporationMember" abstract="true" name="CintasCorporationMember" nillable="true" xbrli:periodType="duration" substitutionGroup="xbrli:item" type="dtr-types:domainItemType"/>
  <xs:element id="unf_CertainShareBasedAwardsGrantedDuringFiscal20262025And2024ToNonemployeeDirectorsMember" abstract="true" name="CertainShareBasedAwardsGrantedDuringFiscal20262025And2024ToNonemployeeDirectorsMember" nillable="true" xbrli:periodType="duration" substitutionGroup="xbrli:item" type="dtr-types:domainItemType"/>
  <xs:element id="unf_NonEmployeeDirectorsMember" abstract="true" name="NonEmployeeDirectorsMember" nillable="true" xbrli:periodType="duration" substitutionGroup="xbrli:item" type="dtr-types:domainItemType"/>
  <xs:element id="unf_ConversionOfClassBCommonStockIntoCommonStockMember" abstract="true" name="ConversionOfClassBCommonStockIntoCommonStockMember" nillable="true" xbrli:periodType="duration" substitutionGroup="xbrli:item" type="dtr-types:domainItemType"/>
  <xs:element id="unf_SummaryOfSignificantAccountingPoliciesLineItems" abstract="true" name="SummaryOfSignificantAccountingPoliciesLineItems" nillable="true" xbrli:periodType="duration" substitutionGroup="xbrli:item" type="xbrli:stringItemType"/>
  <xs:element id="unf_BusinessCombinationRightToReceiveCashUponConversionOfEachShareOfStock" abstract="false" name="BusinessCombinationRightToReceiveCashUponConversionOfEachShareOfStock" nillable="true" xbrli:periodType="duration" substitutionGroup="xbrli:item" type="dtr-types:perShareItemType"/>
  <xs:element id="unf_BusinessCombinationConversionRatio" abstract="false" name="BusinessCombinationConversionRatio" nillable="true" xbrli:periodType="duration" substitutionGroup="xbrli:item" type="xbrli:pureItemType"/>
  <xs:element id="unf_BusinessCombinationPotentialTerminationFeePayment" abstract="false" name="BusinessCombinationPotentialTerminationFeePayment" nillable="true" xbrli:periodType="instant" xbrli:balance="credit" substitutionGroup="xbrli:item" type="xbrli:monetaryItemType"/>
  <xs:element id="unf_BusinessCombinationPotentialTerminationFeePaymentByAcquirer" abstract="false" name="BusinessCombinationPotentialTerminationFeePaymentByAcquirer" nillable="true" xbrli:periodType="instant" xbrli:balance="debit" substitutionGroup="xbrli:item" type="xbrli:monetaryItemType"/>
  <xs:element id="unf_RevenueFromContractsWithCustomersPercentageOfRevenuesFromRouteServicingFees" abstract="false" name="RevenueFromContractsWithCustomersPercentageOfRevenuesFromRouteServicingFees" nillable="true" xbrli:periodType="duration" substitutionGroup="xbrli:item" type="dtr-types:percentItemType"/>
  <xs:element id="unf_RevenueFromContractsWithCustomersPercentageOfRevenuesExcludingRouteServicingFees" abstract="false" name="RevenueFromContractsWithCustomersPercentageOfRevenuesExcludingRouteServicingFees" nillable="true" xbrli:periodType="duration" substitutionGroup="xbrli:item" type="dtr-types:percentItemType"/>
  <xs:element id="unf_RentalMerchandiseUsefulLifeMinimum" abstract="false" name="RentalMerchandiseUsefulLifeMinimum" nillable="true" xbrli:periodType="duration" substitutionGroup="xbrli:item" type="xbrli:durationItemType"/>
  <xs:element id="unf_RentalMerchandiseUsefulLifeMaximum" abstract="false" name="RentalMerchandiseUsefulLifeMaximum" nillable="true" xbrli:periodType="duration" substitutionGroup="xbrli:item" type="xbrli:durationItemType"/>
  <xs:element id="unf_SiteContingencyDiscountRate" abstract="false" name="SiteContingencyDiscountRate" nillable="true" xbrli:periodType="duration" substitutionGroup="xbrli:item" type="dtr-types:percentItemType"/>
  <xs:element id="unf_SiteContingencyDiscountedPeriodLowerRange" abstract="false" name="SiteContingencyDiscountedPeriodLowerRange" nillable="true" xbrli:periodType="duration" substitutionGroup="xbrli:item" type="xbrli:durationItemType"/>
  <xs:element id="unf_SiteContingencyDiscountedPeriodUpperRange" abstract="false" name="SiteContingencyDiscountedPeriodUpperRange" nillable="true" xbrli:periodType="duration" substitutionGroup="xbrli:item" type="xbrli:durationItemType"/>
  <xs:element id="unf_EnvironmentalContingenciesInflationRate" abstract="false" name="EnvironmentalContingenciesInflationRate" nillable="true" xbrli:periodType="duration" substitutionGroup="xbrli:item" type="dtr-types:percentItemType"/>
  <xs:element id="unf_AssetRetirementObligationRemainingLives" abstract="false" name="AssetRetirementObligationRemainingLives" nillable="true" xbrli:periodType="duration" substitutionGroup="xbrli:item" type="xbrli:durationItemType"/>
  <xs:element id="unf_EstimatedImpactOfInflationPerYear" abstract="false" name="EstimatedImpactOfInflationPerYear" nillable="true" xbrli:periodType="instant" substitutionGroup="xbrli:item" type="dtr-types:percentItemType"/>
  <xs:element id="unf_CreditAdjustedRiskFreeRate" abstract="false" name="CreditAdjustedRiskFreeRate" nillable="true" xbrli:periodType="duration" substitutionGroup="xbrli:item" type="dtr-types:percentItemType"/>
  <xs:element id="unf_CommonStockConversionRatio" abstract="false" name="CommonStockConversionRatio" nillable="true" xbrli:periodType="duration" substitutionGroup="xbrli:item" type="xbrli:pureItemType"/>
  <xs:element id="unf_AccountsReceivableAllowanceForCreditLossWriteoffAndOther" abstract="false" name="AccountsReceivableAllowanceForCreditLossWriteoffAndOther" nillable="true" xbrli:periodType="duration" xbrli:balance="debit" substitutionGroup="xbrli:item" type="xbrli:monetaryItemType"/>
  <xs:element id="unf_UniformsAndFacilityServiceSolutionsMember" abstract="true" name="UniformsAndFacilityServiceSolutionsMember" nillable="true" xbrli:periodType="duration" substitutionGroup="xbrli:item" type="dtr-types:domainItemType"/>
  <xs:element id="unf_FirstAidAndSafetySolutionsMember" abstract="true" name="FirstAidAndSafetySolutionsMember" nillable="true" xbrli:periodType="duration" substitutionGroup="xbrli:item" type="dtr-types:domainItemType"/>
  <xs:element id="unf_OtherMember" abstract="true" name="OtherMember" nillable="true" xbrli:periodType="duration" substitutionGroup="xbrli:item" type="dtr-types:domainItemType"/>
  <xs:element id="unf_BuildingComponentsMember" abstract="true" name="BuildingComponentsMember" nillable="true" xbrli:periodType="duration" substitutionGroup="xbrli:item" type="dtr-types:domainItemType"/>
  <xs:element id="unf_CintasMember" abstract="true" name="CintasMember" nillable="true" xbrli:periodType="duration" substitutionGroup="xbrli:item" type="dtr-types:domainItemType"/>
  <xs:element id="unf_UniformAndFacilityServiceSolutionsMember" abstract="true" name="UniformAndFacilityServiceSolutionsMember" nillable="true" xbrli:periodType="duration" substitutionGroup="xbrli:item" type="dtr-types:domainItemType"/>
  <xs:element id="unf_CurrentAcquisitionOfBusinessesMember" abstract="true" name="CurrentAcquisitionOfBusinessesMember" nillable="true" xbrli:periodType="duration" substitutionGroup="xbrli:item" type="dtr-types:domainItemType"/>
  <xs:element id="unf_BusinessCombinationRecognizedIdentifiableAssetsAcquiredAndLiabilitiesAssumedCustomerContracts" abstract="false" name="BusinessCombinationRecognizedIdentifiableAssetsAcquiredAndLiabilitiesAssumedCustomerContracts" nillable="true" xbrli:periodType="instant" xbrli:balance="debit" substitutionGroup="xbrli:item" type="xbrli:monetaryItemType"/>
  <xs:element id="unf_BusinessCombinationConsiderationContingentHoldbacks" abstract="false" name="BusinessCombinationConsiderationContingentHoldbacks" nillable="true" xbrli:periodType="instant" xbrli:balance="credit" substitutionGroup="xbrli:item" type="xbrli:monetaryItemType"/>
  <xs:element id="unf_BusinessCombinationRecognizedAssetAcquiredToLiabilityAssumedExcessLessAndGoodwillExcludingHoldbacks" abstract="false" name="BusinessCombinationRecognizedAssetAcquiredToLiabilityAssumedExcessLessAndGoodwillExcludingHoldbacks" nillable="true" xbrli:periodType="instant" xbrli:balance="debit" substitutionGroup="xbrli:item" type="xbrli:monetaryItemType"/>
  <xs:element id="unf_DefinedBenefitPlanFairValueOfNonQualifiedDeferredCompensationPlanAssets" abstract="false" name="DefinedBenefitPlanFairValueOfNonQualifiedDeferredCompensationPlanAssets" nillable="true" xbrli:periodType="instant" xbrli:balance="debit" substitutionGroup="xbrli:item" type="xbrli:monetaryItemType"/>
  <xs:element id="unf_DefinedBenefitPlanFairValueOfNonQualifiedDeferredCompensationPlanLiability" abstract="false" name="DefinedBenefitPlanFairValueOfNonQualifiedDeferredCompensationPlanLiability" nillable="true" xbrli:periodType="instant" xbrli:balance="credit" substitutionGroup="xbrli:item" type="xbrli:monetaryItemType"/>
  <xs:element id="unf_DefinedBenefitPlanMinimumAnnualInterestRate" abstract="false" name="DefinedBenefitPlanMinimumAnnualInterestRate" nillable="true" xbrli:periodType="duration" substitutionGroup="xbrli:item" type="dtr-types:percentItemType"/>
  <xs:element id="unf_EffectiveIncomeTaxRateReconciliationAdjustmentsToTaxReserve" abstract="false" name="EffectiveIncomeTaxRateReconciliationAdjustmentsToTaxReserve" nillable="true" xbrli:periodType="duration" substitutionGroup="xbrli:item" type="dtr-types:percentItemType"/>
  <xs:element id="unf_DeferredTaxAssetsTaxDeferredExpenseEnvironmentalReserves" abstract="false" name="DeferredTaxAssetsTaxDeferredExpenseEnvironmentalReserves" nillable="true" xbrli:periodType="instant" xbrli:balance="debit" substitutionGroup="xbrli:item" type="xbrli:monetaryItemType"/>
  <xs:element id="unf_DeferredTaxAssetsTaxDeferredExpenseOperatingLeaseLiabilities" abstract="false" name="DeferredTaxAssetsTaxDeferredExpenseOperatingLeaseLiabilities" nillable="true" xbrli:periodType="instant" xbrli:balance="debit" substitutionGroup="xbrli:item" type="xbrli:monetaryItemType"/>
  <xs:element id="unf_DeferredTaxAssetsTransactionCosts" abstract="false" name="DeferredTaxAssetsTransactionCosts" nillable="true" xbrli:periodType="instant" xbrli:balance="debit" substitutionGroup="xbrli:item" type="xbrli:monetaryItemType"/>
  <xs:element id="unf_DeferredTaxLiabilitiesTaxDeferredExpenseUniformAndOtherRentalItemsInService" abstract="false" name="DeferredTaxLiabilitiesTaxDeferredExpenseUniformAndOtherRentalItemsInService" nillable="true" xbrli:periodType="instant" xbrli:balance="credit" substitutionGroup="xbrli:item" type="xbrli:monetaryItemType"/>
  <xs:element id="unf_DeferredTaxLiabilitiesCapitalizedContractCosts" abstract="false" name="DeferredTaxLiabilitiesCapitalizedContractCosts" nillable="true" xbrli:periodType="instant" xbrli:balance="credit" substitutionGroup="xbrli:item" type="xbrli:monetaryItemType"/>
  <xs:element id="unf_DeferredTaxLiabilitiesOperatingLeaseRightOfUseAssets" abstract="false" name="DeferredTaxLiabilitiesOperatingLeaseRightOfUseAssets" nillable="true" xbrli:periodType="instant" xbrli:balance="credit" substitutionGroup="xbrli:item" type="xbrli:monetaryItemType"/>
  <xs:element id="unf_CreditAgreementMember" abstract="true" name="CreditAgreementMember" nillable="true" xbrli:periodType="duration" substitutionGroup="xbrli:item" type="dtr-types:domainItemType"/>
  <xs:element id="unf_TriggeringEventAxis" abstract="true" name="TriggeringEventAxis" nillable="true" xbrli:periodType="duration" substitutionGroup="xbrldt:dimensionItem" type="xbrli:stringItemType"/>
  <xs:element id="unf_TriggeringEventDomain" abstract="true" name="TriggeringEventDomain" nillable="true" xbrli:periodType="duration" substitutionGroup="xbrli:item" type="dtr-types:domainItemType"/>
  <xs:element id="unf_PossibleIncreaseMember" abstract="true" name="PossibleIncreaseMember" nillable="true" xbrli:periodType="duration" substitutionGroup="xbrli:item" type="dtr-types:domainItemType"/>
  <xs:element id="unf_LineOfCreditFacilityIncreaseTheAggregateCommitment" abstract="false" name="LineOfCreditFacilityIncreaseTheAggregateCommitment" nillable="true" xbrli:periodType="duration" xbrli:balance="credit" substitutionGroup="xbrli:item" type="xbrli:monetaryItemType"/>
  <xs:element id="unf_NonqualifiedDeferredCompensationPlanMember" abstract="true" name="NonqualifiedDeferredCompensationPlanMember" nillable="true" xbrli:periodType="duration" substitutionGroup="xbrli:item" type="dtr-types:domainItemType"/>
  <xs:element id="unf_DeferredCompensationPlanOtherIncomeExpense" abstract="false" name="DeferredCompensationPlanOtherIncomeExpense" nillable="true" xbrli:periodType="duration" xbrli:balance="credit" substitutionGroup="xbrli:item" type="xbrli:monetaryItemType"/>
  <xs:element id="unf_DeferredTaxAssetsLiabilitiesDefinedBenefitPlan" abstract="false" name="DeferredTaxAssetsLiabilitiesDefinedBenefitPlan" nillable="true" xbrli:periodType="instant" xbrli:balance="debit" substitutionGroup="xbrli:item" type="xbrli:monetaryItemType"/>
  <xs:element id="unf_OtherSegmentsMember" abstract="true" name="OtherSegmentsMember" nillable="true" xbrli:periodType="duration" substitutionGroup="xbrli:item" type="dtr-types:domainItemType"/>
  <xs:element id="unf_EmployeeRelatedLiabilitiesNoncurrent" abstract="false" name="EmployeeRelatedLiabilitiesNoncurrent" nillable="true" xbrli:periodType="instant" xbrli:balance="credit" substitutionGroup="xbrli:item" type="xbrli:monetaryItemType"/>
  <xs:element id="unf_AssetRetirementObligationsTable" abstract="true" name="AssetRetirementObligationsTable" nillable="true" xbrli:periodType="duration" substitutionGroup="xbrldt:hypercubeItem" type="xbrli:stringItemType"/>
  <xs:element id="unf_AssetRetirementObligationsLineItems" abstract="true" name="AssetRetirementObligationsLineItems" nillable="true" xbrli:periodType="duration" substitutionGroup="xbrli:item" type="xbrli:stringItemType"/>
  <xs:element id="unf_RiskFreeRatesOfInterestUsedToDiscountRemediationCosts" abstract="false" name="RiskFreeRatesOfInterestUsedToDiscountRemediationCosts" nillable="true" xbrli:periodType="instant" substitutionGroup="xbrli:item" type="dtr-types:percentItemType"/>
  <xs:element id="unf_SiteContingencyEnvironmentalRemediationObligationsNumberofSites" abstract="false" name="SiteContingencyEnvironmentalRemediationObligationsNumberofSites" nillable="true" xbrli:periodType="duration" substitutionGroup="xbrli:item" type="xbrli:integerItemType"/>
  <xs:element id="unf_NumberOfInsuranceCompanies" abstract="false" name="NumberOfInsuranceCompanies" nillable="true" xbrli:periodType="duration" substitutionGroup="xbrli:item" type="xbrli:integerItemType"/>
  <xs:element id="unf_TaxAssessmentIssuedAmount" abstract="false" name="TaxAssessmentIssuedAmount" nillable="true" xbrli:periodType="duration" xbrli:balance="debit" substitutionGroup="xbrli:item" type="xbrli:monetaryItemType"/>
  <xs:element id="unf_TaxAssessmentIssuedAmountIncludingSurchargesFinesAndPenalties" abstract="false" name="TaxAssessmentIssuedAmountIncludingSurchargesFinesAndPenalties" nillable="true" xbrli:periodType="duration" xbrli:balance="debit" substitutionGroup="xbrli:item" type="xbrli:monetaryItemType"/>
  <xs:element id="unf_TaxAssessmentIssuedAmountNet" abstract="false" name="TaxAssessmentIssuedAmountNet" nillable="true" xbrli:periodType="duration" xbrli:balance="debit" substitutionGroup="xbrli:item" type="xbrli:monetaryItemType"/>
  <xs:element id="unf_PurchaseObligationDueInOneToThirdYear" abstract="false" name="PurchaseObligationDueInOneToThirdYear" nillable="true" xbrli:periodType="instant" xbrli:balance="credit" substitutionGroup="xbrli:item" type="xbrli:monetaryItemType"/>
  <xs:element id="unf_EnvironmentalLossContingencyStatementOfFinancialPositionExtensibleEnumerationNotDisclosedFlag" abstract="false" name="EnvironmentalLossContingencyStatementOfFinancialPositionExtensibleEnumerationNotDisclosedFlag" nillable="true" xbrli:periodType="duration" substitutionGroup="xbrli:item" type="xbrli:stringItemType"/>
  <xs:element id="unf_RecordedInsuranceEnvironmentalPremiumsRecoveriesAmount" abstract="false" name="RecordedInsuranceEnvironmentalPremiumsRecoveriesAmount" nillable="true" xbrli:periodType="duration" xbrli:balance="credit" substitutionGroup="xbrli:item" type="xbrli:monetaryItemType"/>
  <xs:element id="unf_EnvironmentalLiabilitiesChangesInDiscountRates" abstract="false" name="EnvironmentalLiabilitiesChangesInDiscountRates" nillable="true" xbrli:periodType="duration" xbrli:balance="credit" substitutionGroup="xbrli:item" type="xbrli:monetaryItemType"/>
  <xs:element id="unf_EstimatedInsuranceProceedsforEnvironmentalLossCoontingenciesFiscalYearMaturityAbstract" abstract="true" name="EstimatedInsuranceProceedsforEnvironmentalLossCoontingenciesFiscalYearMaturityAbstract" nillable="true" xbrli:periodType="duration" substitutionGroup="xbrli:item" type="xbrli:stringItemType"/>
  <xs:element id="unf_EstimatedInsuranceProceedsForEnvironmentalLossContingenciesUndiscountedToBePaidRemainderOfFiscalYear" abstract="false" name="EstimatedInsuranceProceedsForEnvironmentalLossContingenciesUndiscountedToBePaidRemainderOfFiscalYear" nillable="true" xbrli:periodType="instant" xbrli:balance="debit" substitutionGroup="xbrli:item" type="xbrli:monetaryItemType"/>
  <xs:element id="unf_EstimatedInsuranceProceedsForEnvironmentalLossContingenciesUndiscountedToBePaidYearOne" abstract="false" name="EstimatedInsuranceProceedsForEnvironmentalLossContingenciesUndiscountedToBePaidYearOne" nillable="true" xbrli:periodType="instant" xbrli:balance="debit" substitutionGroup="xbrli:item" type="xbrli:monetaryItemType"/>
  <xs:element id="unf_EstimatedInsuranceProceedsForEnvironmentalLossContingenciesUndiscountedToBePaidYearTwo" abstract="false" name="EstimatedInsuranceProceedsForEnvironmentalLossContingenciesUndiscountedToBePaidYearTwo" nillable="true" xbrli:periodType="instant" xbrli:balance="debit" substitutionGroup="xbrli:item" type="xbrli:monetaryItemType"/>
  <xs:element id="unf_EstimatedInsuranceProceedsForEnvironmentalLossContingenciesUndiscountedToBePaidYearThree" abstract="false" name="EstimatedInsuranceProceedsForEnvironmentalLossContingenciesUndiscountedToBePaidYearThree" nillable="true" xbrli:periodType="instant" xbrli:balance="debit" substitutionGroup="xbrli:item" type="xbrli:monetaryItemType"/>
  <xs:element id="unf_EstimatedInsuranceProceedsForEnvironmentalLossContingenciesUndiscountedToBePaidYearFour" abstract="false" name="EstimatedInsuranceProceedsForEnvironmentalLossContingenciesUndiscountedToBePaidYearFour" nillable="true" xbrli:periodType="instant" xbrli:balance="debit" substitutionGroup="xbrli:item" type="xbrli:monetaryItemType"/>
  <xs:element id="unf_EstimatedInsuranceProceedsForEnvironmentalLossContingenciesUndiscountedToBePaidAfterYearFour" abstract="false" name="EstimatedInsuranceProceedsForEnvironmentalLossContingenciesUndiscountedToBePaidAfterYearFour" nillable="true" xbrli:periodType="instant" xbrli:balance="debit" substitutionGroup="xbrli:item" type="xbrli:monetaryItemType"/>
  <xs:element id="unf_EstimatedInsuranceProceedsForEnvironmentalLossContingenciesGross" abstract="false" name="EstimatedInsuranceProceedsForEnvironmentalLossContingenciesGross" nillable="true" xbrli:periodType="instant" xbrli:balance="debit" substitutionGroup="xbrli:item" type="xbrli:monetaryItemType"/>
  <xs:element id="unf_AccrualforEnvironmentalLossContingenciesNetofEstimatedInsuranceProceedsFiscalYearMaturityAbstract" abstract="true" name="AccrualforEnvironmentalLossContingenciesNetofEstimatedInsuranceProceedsFiscalYearMaturityAbstract" nillable="true" xbrli:periodType="duration" substitutionGroup="xbrli:item" type="xbrli:stringItemType"/>
  <xs:element id="unf_AccrualForEnvironmentalLossContingenciesUndiscountedToBePaidRemainderOfFiscalYearNetOfEstimatedInsuranceProceeds" abstract="false" name="AccrualForEnvironmentalLossContingenciesUndiscountedToBePaidRemainderOfFiscalYearNetOfEstimatedInsuranceProceeds" nillable="true" xbrli:periodType="instant" xbrli:balance="credit" substitutionGroup="xbrli:item" type="xbrli:monetaryItemType"/>
  <xs:element id="unf_AccrualForEnvironmentalLossContingenciesUndiscountedToBePaidYearOneNetOfEstimatedInsuranceProceeds" abstract="false" name="AccrualForEnvironmentalLossContingenciesUndiscountedToBePaidYearOneNetOfEstimatedInsuranceProceeds" nillable="true" xbrli:periodType="instant" xbrli:balance="credit" substitutionGroup="xbrli:item" type="xbrli:monetaryItemType"/>
  <xs:element id="unf_AccrualForEnvironmentalLossContingenciesUndiscountedToBePaidYearTwoNetOfEstimatedInsuranceProceeds" abstract="false" name="AccrualForEnvironmentalLossContingenciesUndiscountedToBePaidYearTwoNetOfEstimatedInsuranceProceeds" nillable="true" xbrli:periodType="instant" xbrli:balance="credit" substitutionGroup="xbrli:item" type="xbrli:monetaryItemType"/>
  <xs:element id="unf_AccrualForEnvironmentalLossContingenciesUndiscountedToBePaidYearThreeNetOfEstimatedInsuranceProceeds" abstract="false" name="AccrualForEnvironmentalLossContingenciesUndiscountedToBePaidYearThreeNetOfEstimatedInsuranceProceeds" nillable="true" xbrli:periodType="instant" xbrli:balance="credit" substitutionGroup="xbrli:item" type="xbrli:monetaryItemType"/>
  <xs:element id="unf_AccrualForEnvironmentalLossContingenciesUndiscountedToBePaidYearFourNetOfEstimatedInsuranceProceeds" abstract="false" name="AccrualForEnvironmentalLossContingenciesUndiscountedToBePaidYearFourNetOfEstimatedInsuranceProceeds" nillable="true" xbrli:periodType="instant" xbrli:balance="credit" substitutionGroup="xbrli:item" type="xbrli:monetaryItemType"/>
  <xs:element id="unf_AccrualForEnvironmentalLossContingenciesUndiscountedToBePaidAfterYearFourNetOfEstimatedInsuranceProceeds" abstract="false" name="AccrualForEnvironmentalLossContingenciesUndiscountedToBePaidAfterYearFourNetOfEstimatedInsuranceProceeds" nillable="true" xbrli:periodType="instant" xbrli:balance="credit" substitutionGroup="xbrli:item" type="xbrli:monetaryItemType"/>
  <xs:element id="unf_AccrualForEnvironmentalLossContingenciesNetOfEstimatedInsuranceProceeds" abstract="false" name="AccrualForEnvironmentalLossContingenciesNetOfEstimatedInsuranceProceeds" nillable="true" xbrli:periodType="instant" xbrli:balance="credit" substitutionGroup="xbrli:item" type="xbrli:monetaryItemType"/>
  <xs:element id="unf_AccrualForEnvironmentalLossContingenciesEffectOfInflation" abstract="false" name="AccrualForEnvironmentalLossContingenciesEffectOfInflation" nillable="true" xbrli:periodType="instant" xbrli:balance="credit" substitutionGroup="xbrli:item" type="xbrli:monetaryItemType"/>
  <xs:element id="unf_PlanMember" abstract="true" name="PlanMember" nillable="true" xbrli:periodType="duration" substitutionGroup="xbrli:item" type="dtr-types:domainItemType"/>
  <xs:element id="unf_UnrestrictedStockMember" abstract="true" name="UnrestrictedStockMember" nillable="true" xbrli:periodType="duration" substitutionGroup="xbrli:item" type="dtr-types:domainItemType"/>
  <xs:element id="unf_ShareBasedAwardsMember" abstract="true" name="ShareBasedAwardsMember" nillable="true" xbrli:periodType="duration" substitutionGroup="xbrli:item" type="dtr-types:domainItemType"/>
  <xs:element id="unf_TimeBasedRestrictedStockUnitsMember" abstract="true" name="TimeBasedRestrictedStockUnitsMember" nillable="true" xbrli:periodType="duration" substitutionGroup="xbrli:item" type="dtr-types:domainItemType"/>
  <xs:element id="unf_CliffVestingMember" abstract="true" name="CliffVestingMember" nillable="true" xbrli:periodType="duration" substitutionGroup="xbrli:item" type="dtr-types:domainItemType"/>
  <xs:element id="unf_CommonStockVotingRightsNumberOfVotes" abstract="false" name="CommonStockVotingRightsNumberOfVotes" nillable="true" xbrli:periodType="duration" substitutionGroup="xbrli:item" type="xbrli:integerItemType"/>
  <xs:element id="unf_CommonStockDividendRatePercentage" abstract="false" name="CommonStockDividendRatePercentage" nillable="true" xbrli:periodType="duration" substitutionGroup="xbrli:item" type="dtr-types:percentItemType"/>
  <xs:element id="unf_StockRepurchasedPricePerShare" abstract="false" name="StockRepurchasedPricePerShare" nillable="true" xbrli:periodType="duration" substitutionGroup="xbrli:item" type="dtr-types:perShareItemType"/>
  <xs:element id="unf_SeniorOfficerMember" abstract="true" name="SeniorOfficerMember" nillable="true" xbrli:periodType="duration" substitutionGroup="xbrli:item" type="dtr-types:domainItemType"/>
</xs:schema>
