v3.8.0.1
Document and Entity Information - USD ($)
$ in Millions
12 Months Ended
Dec. 31, 2017
Mar. 02, 2018
Jun. 30, 2017
Document And Entity Information [Abstract]      
Entity Registrant Name Flex Pharma, Inc.    
Entity Central Index Key 0001615219    
Current Fiscal Year End Date --12-31    
Entity Filer Category Smaller Reporting Company    
Document Type 10-K    
Document Period End Date Dec. 31, 2017    
Document Fiscal Year Focus 2017    
Document Fiscal Period Focus FY    
Amendment Flag false    
Entity Common Stock, Shares Outstanding   17,972,166  
Entity Well-known Seasoned Issuer No    
Entity Voluntary Filers No    
Entity Current Reporting Status Yes    
Entity Public Float     $ 39.7