XML 12 R1.htm IDEA: XBRL DOCUMENT v3.8.0.1
Document And Entity Information - shares
9 Months Ended
May 26, 2018
Jun. 29, 2018
Document Information [Line Items]    
Entity Registrant Name Unifirst Corporation  
Entity Central Index Key 0000717954  
Trading Symbol unf  
Current Fiscal Year End Date --08-25  
Entity Filer Category Large Accelerated Filer  
Document Type 10-Q  
Document Period End Date May 26, 2018  
Document Fiscal Year Focus 2018  
Document Fiscal Period Focus Q3  
Amendment Flag false  
Common Stock    
Document Information [Line Items]    
Entity Common Stock, Shares Outstanding   15,427,583
Class B Common Stock    
Document Information [Line Items]    
Entity Common Stock, Shares Outstanding   3,711,009