v3.22.4
Document And Entity Information - USD ($)
$ in Millions
12 Months Ended
Dec. 31, 2022
Mar. 14, 2023
Jun. 30, 2022
Document Information [Line Items]      
Entity Registrant Name Middlefield Banc Corp.    
Document, Type 10-K    
Document, Annual Report true    
Document, Period End Date Dec. 31, 2022    
Current Fiscal Year End Date --12-31    
Document Fiscal Period Focus FY    
Document Fiscal Year Focus 2022    
Document, Transition Report false    
Entity, File Number 001-36613    
Entity, Incorporation, State or Country Code OH    
Entity, Tax Identification Number 34-1585111    
Entity, Address, Address Line One 15985 East High Street    
Entity, Address, City or Town Middlefield    
Entity, Address, State or Province OH    
Entity, Address, Postal Zip Code 44062-0035    
City Area Code 440    
Local Phone Number 632-1666    
Trading Symbol MBCN    
Title of 12(b) Security Common Stock, Without Par Value    
Security Exchange Name NASDAQ    
Entity, Well-known Seasoned Issuer No    
Entity, Voluntary Filers No    
Entity, Current Reporting Status Yes    
Entity, Interactive Data, Current Yes    
Entity, Filer Category Non-accelerated Filer    
Entity, Small Business true    
Entity, Emerging Growth Company false    
ICFR Auditor Attestation Flag false    
Entity, Shell Company false    
Entity, Public Float     $ 139.9
Entity, Common Stock Shares, Outstanding   8,088,793  
Auditor Name S. R. Snodgrass, P.C.    
Auditor Location Cranberry Township, Pennsylvania    
Auditor Firm ID 74    
Amendment Flag false    
Entity Central Index Key 0000836147