v3.19.2
Document and Entity Information - shares
6 Months Ended
Jun. 30, 2019
Jul. 31, 2019
Document and Entity Information [Abstract]    
Document Type 10-Q  
Entity Interactive Data Current Yes  
Amendment Flag false  
Document Period End Date Jun. 30, 2019  
Document Fiscal Year Focus 2019  
Document Fiscal Period Focus Q2  
Entity Registrant Name Mastech Digital, Inc.  
Entity Central Index Key 0001437226  
Current Fiscal Year End Date --12-31  
Entity Current Reporting Status Yes  
Entity Filer Category Non-accelerated Filer  
Title of 12(b) Security Common Stock  
Trading Symbol MHH  
Security Exchange Name NYSE  
Entity Address, State or Province PA  
Entity Small Business true  
Entity Emerging Growth Company false  
Entity Shell Company false  
Entity Common Stock, Shares Outstanding   11,033,165