XML 52 R42.htm IDEA: XBRL DOCUMENT
v3.23.2

Employee Benefit Plans - Narrative (Details) | 3 Months Ended | 9 Months Ended |
--- | --- | --- | ---
May 27, 2023 USD ($) RetirementPlan | May 28, 2022 USD ($) | May 27, 2023 USD ($) RetirementPlan | May 28, 2022 USD ($) | Aug. 27, 2022 USD ($)
Defined Benefit Plans and Other Postretirement Benefit Plans Table Text Block [Line Items] |  |  |  |  |
Contributions charged to expense under the plan | $ 4,400,000 | $ 4,700,000 | $ 14,300,000 | $ 14,200,000 |
Deferred compensation plan, employee or employer contribution charged to expense | $ 100,000 | 0 | $ 200,000 | 0 |
SERP |  |  |  |  |
Defined Benefit Plans and Other Postretirement Benefit Plans Table Text Block [Line Items] |  |  |  |  |
Number of frozen non-contributory defined benefit pension plans | RetirementPlan | 1 |  | 1 |  |
Amounts charged to expense related to the plans | $ 400,000 | $ 600,000 | $ 1,300,000 | $ 1,900,000 |
Nonqualified Deferred Compensation Plan Member |  |  |  |  |
Defined Benefit Plans and Other Postretirement Benefit Plans Table Text Block [Line Items] |  |  |  |  |
NQDC Plan assets | $ 1,900,000 |  | $ 1,900,000 |  | $ 1,300,000

X
- Definition Defined Benefit Plan, Number Of Frozen Plans + References No definition available. + Details
Name: | unf_DefinedBenefitPlanNumberOfFrozenPlans
Namespace Prefix: | unf_
Data Type: | xbrli:integerItemType
Balance Type: | na
Period Type: | instant

X
- Definition Amount of contributions made by employer into fund established for purposes of making future disbursement to individual in accordance with deferred compensation arrangement. + References No definition available. + Details
Name: | us-gaap_DeferredCompensationArrangementWithIndividualContributionsByEmployer
Namespace Prefix: | us-gaap_
Data Type: | xbrli:monetaryItemType
Balance Type: | credit
Period Type: | duration

X
- Definition Carrying amount as of the balance sheet date of assets held under deferred compensation agreements. + References Reference 1: http://www.xbrl.org/2009/role/commonPracticeRef -Publisher FASB -Name Accounting Standards Codification -Topic 210 -SubTopic 10 -Section S99 -Paragraph 1 -Subparagraph (SX 210.5-02(17)) -URI https://asc.fasb.org/extlink&oid=120391452&loc=d3e13212-122682 + Details
Name: | us-gaap_DeferredCompensationPlanAssets
Namespace Prefix: | us-gaap_
Data Type: | xbrli:monetaryItemType
Balance Type: | debit
Period Type: | instant

X
- Definition Line items represent financial concepts included in a table. These concepts are used to disclose reportable information associated with domain members defined in one or many axes to the table. + References No definition available. + Details
Name: | us-gaap_DefinedBenefitPlansAndOtherPostretirementBenefitPlansTableTextBlockLineItems
Namespace Prefix: | us-gaap_
Data Type: | xbrli:stringItemType
Balance Type: | na
Period Type: | duration

X
- Definition Amount of cost for defined contribution plan. + References Reference 1: http://www.xbrl.org/2003/role/disclosureRef -Publisher FASB -Name Accounting Standards Codification -Topic 715 -SubTopic 70 -Section 50 -Paragraph 1 -URI https://asc.fasb.org/extlink&oid=49170846&loc=d3e28014-114942 + Details
Name: | us-gaap_DefinedContributionPlanCostRecognized
Namespace Prefix: | us-gaap_
Data Type: | xbrli:monetaryItemType
Balance Type: | debit
Period Type: | duration

X
- Definition Amount of cost (reversal of cost) for pension benefits. Excludes other postretirement benefits. + References No definition available. + Details
Name: | us-gaap_PensionExpense
Namespace Prefix: | us-gaap_
Data Type: | xbrli:monetaryItemType
Balance Type: | debit
Period Type: | duration

X
- Details
Name: | us-gaap_RetirementPlanTypeAxis=us-gaap_SupplementalEmployeeRetirementPlanDefinedBenefitMember
Namespace Prefix: |
Data Type: | na
Balance Type: |
Period Type: |

X
- Details
Name: | us-gaap_RetirementPlanTypeAxis=unf_NonqualifiedDeferredCompensationPlanMember
Namespace Prefix: |
Data Type: | na
Balance Type: |
Period Type: |