XML 15 R1.htm IDEA: XBRL DOCUMENT v3.8.0.1
Document And Entity Information - USD ($)
12 Months Ended
Aug. 26, 2017
Oct. 13, 2017
Feb. 24, 2017
Document Information [Line Items]      
Entity Registrant Name Unifirst Corp    
Entity Central Index Key 0000717954    
Trading Symbol unf    
Current Fiscal Year End Date --08-26    
Entity Filer Category Large Accelerated Filer    
Entity Current Reporting Status Yes    
Entity Voluntary Filers No    
Entity Well-known Seasoned Issuer Yes    
Entity Public Float     $ 1,999,318,504
Document Type 10-K    
Document Period End Date Aug. 26, 2017    
Document Fiscal Year Focus 2017    
Document Fiscal Period Focus FY    
Amendment Flag false    
Common Stock      
Document Information [Line Items]      
Entity Common Stock, Shares Outstanding   15,460,082  
Class B Common Stock      
Document Information [Line Items]      
Entity Common Stock, Shares Outstanding   4,815,519