    <SEC-DOCUMENT>0000950170-23-066955-index.html : 20231130
    <SEC-HEADER>0000950170-23-066955.hdr.sgml : 20231130
    <ACCEPTANCE-DATETIME>20231130124117
    ACCESSION NUMBER:		0000950170-23-066955
    CONFORMED SUBMISSION TYPE:	DEF 14A
    PUBLIC DOCUMENT COUNT:		21
    CONFORMED PERIOD OF REPORT:	20240109
    FILED AS OF DATE:		20231130
    DATE AS OF CHANGE:		20231130

    FILER:

    	COMPANY DATA:
    		COMPANY CONFORMED NAME:			UNIFIRST CORP
    		CENTRAL INDEX KEY:			0000717954
    		STANDARD INDUSTRIAL CLASSIFICATION:	SERVICES-PERSONAL SERVICES [7200]
    		IRS NUMBER:				042103460
    		STATE OF INCORPORATION:			MA
    		FISCAL YEAR END:			0829

    	FILING VALUES:
    		FORM TYPE:		DEF 14A
    		SEC ACT:		1934 Act
    		SEC FILE NUMBER:	001-08504
    		FILM NUMBER:		231454850

    	BUSINESS ADDRESS:
    		STREET 1:		68 JONSPIN RD
    		CITY:			WILMINGTON
    		STATE:			MA
    		ZIP:			01887
    		BUSINESS PHONE:		(978) 658-8888

    	MAIL ADDRESS:
    		STREET 1:		68 JONSPIN ROAD
    		CITY:			WILMINGTON
    		STATE:			MA
    		ZIP:			01887

    	FORMER COMPANY:
    		FORMER CONFORMED NAME:	INTERSTATE UNIFORM SERVICES CORP/MA
    		DATE OF NAME CHANGE:	19840410
    </SEC-HEADER>
    <DOCUMENT>
    <TYPE>DEF 14A
    <SEQUENCE>1
    <FILENAME>unf-20231130.htm
    <DESCRIPTION>DEF 14A
    <TEXT>
    Document 1 - file: unf-20231130.htm

    </DOCUMENT>
    <DOCUMENT>
    <TYPE>GRAPHIC
    <SEQUENCE>2
    <FILENAME>img18733788_0.jpg
    <DESCRIPTION>GRAPHIC
    <TEXT>
    Document 2 - file: img18733788_0.jpg

    </DOCUMENT>
    <DOCUMENT>
    <TYPE>GRAPHIC
    <SEQUENCE>3
    <FILENAME>img18733788_1.jpg
    <DESCRIPTION>GRAPHIC
    <TEXT>
    Document 3 - file: img18733788_1.jpg

    </DOCUMENT>
    <DOCUMENT>
    <TYPE>GRAPHIC
    <SEQUENCE>4
    <FILENAME>img18733788_2.jpg
    <DESCRIPTION>GRAPHIC
    <TEXT>
    Document 4 - file: img18733788_2.jpg

    </DOCUMENT>
    <DOCUMENT>
    <TYPE>GRAPHIC
    <SEQUENCE>5
    <FILENAME>img18733788_3.jpg
    <DESCRIPTION>GRAPHIC
    <TEXT>
    Document 5 - file: img18733788_3.jpg

    </DOCUMENT>
    <DOCUMENT>
    <TYPE>GRAPHIC
    <SEQUENCE>6
    <FILENAME>img18733788_4.jpg
    <DESCRIPTION>GRAPHIC
    <TEXT>
    Document 6 - file: img18733788_4.jpg

    </DOCUMENT>
    <DOCUMENT>
    <TYPE>GRAPHIC
    <SEQUENCE>7
    <FILENAME>img18733788_5.jpg
    <DESCRIPTION>GRAPHIC
    <TEXT>
    Document 7 - file: img18733788_5.jpg

    </DOCUMENT>
    <DOCUMENT>
    <TYPE>GRAPHIC
    <SEQUENCE>8
    <FILENAME>img18733788_6.jpg
    <DESCRIPTION>GRAPHIC
    <TEXT>
    Document 8 - file: img18733788_6.jpg

    </DOCUMENT>
    <DOCUMENT>
    <TYPE>GRAPHIC
    <SEQUENCE>9
    <FILENAME>img18733788_7.jpg
    <DESCRIPTION>GRAPHIC
    <TEXT>
    Document 9 - file: img18733788_7.jpg

    </DOCUMENT>
    <DOCUMENT>
    <TYPE>EX-101.PRE
    <SEQUENCE>10
    <FILENAME>unf-20231130_pre.xml
    <DESCRIPTION>XBRL TAXONOMY EXTENSION PRESENTATION LINKBASE DOCUMENT
    <TEXT>
    Document 10 - file: unf-20231130_pre.xml

    </DOCUMENT>
    <DOCUMENT>
    <TYPE>EX-101.SCH
    <SEQUENCE>11
    <FILENAME>unf-20231130.xsd
    <DESCRIPTION>XBRL TAXONOMY EXTENSION SCHEMA DOCUMENT
    <TEXT>
    Document 11 - file: unf-20231130.xsd

    </DOCUMENT>
    <DOCUMENT>
    <TYPE>EX-101.LAB
    <SEQUENCE>12
    <FILENAME>unf-20231130_lab.xml
    <DESCRIPTION>XBRL TAXONOMY EXTENSION LABEL LINKBASE DOCUMENT
    <TEXT>
    Document 12 - file: unf-20231130_lab.xml

    </DOCUMENT>
    <DOCUMENT>
    <TYPE>EX-101.DEF
    <SEQUENCE>13
    <FILENAME>unf-20231130_def.xml
    <DESCRIPTION>XBRL TAXONOMY EXTENSION DEFINITION LINKBASE DOCUMENT
    <TEXT>
    Document 13 - file: unf-20231130_def.xml

    </DOCUMENT>
    <DOCUMENT>
    <TYPE>XML
    <SEQUENCE>14
    <FILENAME>R1.htm
    <DESCRIPTION>IDEA: XBRL DOCUMENT
    <TEXT>
    Document 14 - file: R1.htm

    </DOCUMENT>
    <DOCUMENT>
    <TYPE>XML
    <SEQUENCE>15
    <FILENAME>R2.htm
    <DESCRIPTION>IDEA: XBRL DOCUMENT
    <TEXT>
    Document 15 - file: R2.htm

    </DOCUMENT>
    <DOCUMENT>
    <TYPE>XML
    <SEQUENCE>16
    <FILENAME>unf-20231130_htm.xml
    <DESCRIPTION>IDEA: XBRL DOCUMENT
    <TEXT>
    Document 16 - file: unf-20231130_htm.html

    Document 16 - RAW XML: unf-20231130_htm.xml

    </DOCUMENT>
    <DOCUMENT>
    <TYPE>XML
    <SEQUENCE>17
    <FILENAME>Show.js
    <DESCRIPTION>IDEA: XBRL DOCUMENT
    <TEXT>
    Document 17 - file: Show.js

    </DOCUMENT>
    <DOCUMENT>
    <TYPE>XML
    <SEQUENCE>18
    <FILENAME>report.css
    <DESCRIPTION>IDEA: XBRL DOCUMENT
    <TEXT>
    Document 18 - file: report.css

    </DOCUMENT>
    <DOCUMENT>
    <TYPE>XML
    <SEQUENCE>19
    <FILENAME>FilingSummary.xml
    <DESCRIPTION>IDEA: XBRL DOCUMENT
    <TEXT>
    Document 19 - file: FilingSummary.html

    Document 19 - RAW XML: FilingSummary.xml

    </DOCUMENT>
    <DOCUMENT>
    <TYPE>JSON
    <SEQUENCE>21
    <FILENAME>MetaLinks.json
    <DESCRIPTION>IDEA: XBRL DOCUMENT
    <TEXT>
    Document 21 - file: MetaLinks.json

    </DOCUMENT>
    <DOCUMENT>
    <TYPE>ZIP
    <SEQUENCE>22
    <FILENAME>0000950170-23-066955-xbrl.zip
    <DESCRIPTION>IDEA: XBRL DOCUMENT
    <TEXT>
    Document 22 - file: 0000950170-23-066955-xbrl.zip

    </DOCUMENT>
    </SEC-DOCUMENT>