XML 13 R1.htm IDEA: XBRL DOCUMENT v3.19.1
Document and Entity Information - shares
6 Months Ended
Feb. 23, 2019
Mar. 29, 2019
Document Information [Line Items]    
Document Type 10-Q  
Amendment Flag false  
Document Period End Date Feb. 23, 2019  
Document Fiscal Year Focus 2019  
Document Fiscal Period Focus Q2  
Entity Registrant Name UNIFIRST CORP  
Entity Central Index Key 0000717954  
Current Fiscal Year End Date --08-31  
Entity Filer Category Large Accelerated Filer  
Trading Symbol UNF  
Entity Emerging Growth Company false  
Entity Small Business false  
Common Stock    
Document Information [Line Items]    
Entity Common Stock, Shares Outstanding   15,352,793
Class B Common Stock    
Document Information [Line Items]    
Entity Common Stock, Shares Outstanding   3,710,009