<?xml version='1.0' encoding='utf-8'?>
<FilingSummary>
  <Version>3.24.1.u1</Version>
  <ProcessingTime/>
  <ReportFormat>html</ReportFormat>
  <ContextCount>69</ContextCount>
  <ElementCount>27</ElementCount>
  <EntityCount>1</EntityCount>
  <FootnotesReported>false</FootnotesReported>
  <SegmentCount>11</SegmentCount>
  <ScenarioCount>0</ScenarioCount>
  <TuplesReported>false</TuplesReported>
  <UnitCount>2</UnitCount>
  <MyReports>
    <Report instance="bmrc-20240514xdef14a.htm">
      <IsDefault>false</IsDefault>
      <HasEmbeddedReports>false</HasEmbeddedReports>
      <HtmlFileName>R1.htm</HtmlFileName>
      <LongName>00090 - Document - Document and Entity Information</LongName>
      <ReportType>Sheet</ReportType>
      <Role>http://bankofmarin.com/role/DocumentDocumentAndEntityInformation</Role>
      <ShortName>Document and Entity Information</ShortName>
      <MenuCategory>Cover</MenuCategory>
      <Position>1</Position>
    </Report>
    <Report instance="bmrc-20240514xdef14a.htm">
      <IsDefault>false</IsDefault>
      <HasEmbeddedReports>false</HasEmbeddedReports>
      <HtmlFileName>R2.htm</HtmlFileName>
      <LongName>995410 - Disclosure - Pay vs Performance Disclosure</LongName>
      <ReportType>Sheet</ReportType>
      <Role>http://xbrl.sec.gov/ecd/role/PvpDisclosure</Role>
      <ShortName>Pay vs Performance Disclosure</ShortName>
      <MenuCategory>Notes</MenuCategory>
      <Position>2</Position>
    </Report>
    <Report>
      <IsDefault>false</IsDefault>
      <HasEmbeddedReports>false</HasEmbeddedReports>
      <LongName>All Reports</LongName>
      <ReportType>Book</ReportType>
      <ShortName>All Reports</ShortName>
    </Report>
  </MyReports>
  <InputFiles>
    <File>bmrc-20240514.xsd</File>
    <File>bmrc-20240514_def.xml</File>
    <File>bmrc-20240514_lab.xml</File>
    <File>bmrc-20240514_pre.xml</File>
    <File doctype="DEF 14A" isProxy="true" isUsgaap="true" original="bmrc-20240514xdef14a.htm">bmrc-20240514xdef14a.htm</File>
  </InputFiles>
  <SupplementalFiles>
    <File>bmrc-20240514xdef14a_a001.jpg</File>
    <File>bmrc-20240514xdef14a_a002.jpg</File>
    <File>bmrc-20240514xdef14a_a003.jpg</File>
    <File>bmrc-20240514xdef14a_a004.jpg</File>
    <File>bmrc-20240514xdef14a_a005.jpg</File>
    <File>bmrc-20240514xdef14a_a006.jpg</File>
    <File>bmrc-20240514xdef14a_a007.jpg</File>
    <File>bmrc-20240514xdef14a_a008.jpg</File>
    <File>bmrc-20240514xdef14a_a009.jpg</File>
    <File>bmrc-20240514xdef14a_a010.jpg</File>
    <File>bmrc-20240514xdef14a_a011.jpg</File>
    <File>bmrc-20240514xdef14a_a012.jpg</File>
    <File>bmrc-20240514xdef14a_a013.jpg</File>
    <File>bmrc-20240514xdef14a_a014.jpg</File>
    <File>bmrc-20240514xdef14a_a015.jpg</File>
    <File>bmrc-20240514xdef14a_a016.jpg</File>
    <File>bmrc-20240514xdef14a_a017.jpg</File>
    <File>bmrc-20240514xdef14a_a018.jpg</File>
    <File>bmrc-20240514xdef14a_a019.jpg</File>
    <File>bmrc-20240514xdef14a_a020.jpg</File>
    <File>bmrc-20240514xdef14a_a021.jpg</File>
    <File>bmrc-20240514xdef14a_a022.jpg</File>
    <File>bmrc-20240514xdef14a_a023.jpg</File>
    <File>bmrc-20240514xdef14a_a024.jpg</File>
    <File>bmrc-20240514xdef14a_a025.jpg</File>
    <File>bmrc-20240514xdef14a_a026.jpg</File>
    <File>bmrc-20240514xdef14a_a027.jpg</File>
    <File>bmrc-20240514xdef14a_a028.jpg</File>
    <File>bmrc-20240514xdef14a_a029.jpg</File>
    <File>bmrc-20240514xdef14a_a030.jpg</File>
    <File>bmrc-20240514xdef14a_a031.jpg</File>
    <File>bmrc-20240514xdef14a_a032.jpg</File>
    <File>bmrc-20240514xdef14a_a033.jpg</File>
    <File>bmrc-20240514xdef14a_a034.jpg</File>
    <File>bmrc-20240514xdef14a_a035.jpg</File>
    <File>bmrc-20240514xdef14a_a036.jpg</File>
    <File>bmrc-20240514xdef14a_a037.jpg</File>
    <File>bmrc-20240514xdef14a_bg001.jpg</File>
    <File>bmrc-20240514xdef14a_bg002.jpg</File>
    <File>bmrc-20240514xdef14a_cg001.jpg</File>
    <File>bmrc-20240514xdef14a_cg002.jpg</File>
  </SupplementalFiles>
  <BaseTaxonomies>
    <BaseTaxonomy items="4">http://fasb.org/us-gaap/2023</BaseTaxonomy>
    <BaseTaxonomy items="4">http://xbrl.sec.gov/dei/2023</BaseTaxonomy>
    <BaseTaxonomy items="123">http://xbrl.sec.gov/ecd/2023</BaseTaxonomy>
  </BaseTaxonomies>
  <HasPresentationLinkbase>true</HasPresentationLinkbase>
  <HasCalculationLinkbase>false</HasCalculationLinkbase>
</FilingSummary>
