<?xml version='1.0' encoding='utf-8'?>
<FilingSummary>
  <Version>3.24.0.1</Version>
  <ProcessingTime/>
  <ReportFormat>html</ReportFormat>
  <ContextCount>681</ContextCount>
  <ElementCount>706</ElementCount>
  <EntityCount>1</EntityCount>
  <FootnotesReported>true</FootnotesReported>
  <SegmentCount>155</SegmentCount>
  <ScenarioCount>0</ScenarioCount>
  <TuplesReported>false</TuplesReported>
  <UnitCount>12</UnitCount>
  <MyReports>
    <Report instance="bmrc-20231231.htm">
      <IsDefault>false</IsDefault>
      <HasEmbeddedReports>false</HasEmbeddedReports>
      <HtmlFileName>R1.htm</HtmlFileName>
      <LongName>0000001 - Document - Cover</LongName>
      <ReportType>Sheet</ReportType>
      <Role>http://www.bankofmarin.com/role/Cover</Role>
      <ShortName>Cover</ShortName>
      <MenuCategory>Cover</MenuCategory>
      <Position>1</Position>
    </Report>
    <Report instance="bmrc-20231231.htm">
      <IsDefault>false</IsDefault>
      <HasEmbeddedReports>false</HasEmbeddedReports>
      <HtmlFileName>R2.htm</HtmlFileName>
      <LongName>0000002 - Document - Audit Information</LongName>
      <ReportType>Sheet</ReportType>
      <Role>http://www.bankofmarin.com/role/AuditInformation</Role>
      <ShortName>Audit Information</ShortName>
      <MenuCategory>Cover</MenuCategory>
      <Position>2</Position>
    </Report>
    <Report instance="bmrc-20231231.htm">
      <IsDefault>false</IsDefault>
      <HasEmbeddedReports>false</HasEmbeddedReports>
      <HtmlFileName>R3.htm</HtmlFileName>
      <LongName>0000003 - Statement - CONSOLIDATED STATEMENTS OF CONDITION</LongName>
      <ReportType>Sheet</ReportType>
      <Role>http://www.bankofmarin.com/role/CONSOLIDATEDSTATEMENTSOFCONDITION</Role>
      <ShortName>CONSOLIDATED STATEMENTS OF CONDITION</ShortName>
      <MenuCategory>Statements</MenuCategory>
      <Position>3</Position>
    </Report>
    <Report instance="bmrc-20231231.htm">
      <IsDefault>false</IsDefault>
      <HasEmbeddedReports>false</HasEmbeddedReports>
      <HtmlFileName>R4.htm</HtmlFileName>
      <LongName>0000004 - Statement - CONSOLIDATED STATEMENTS OF CONDITION (Parenthetical)</LongName>
      <ReportType>Sheet</ReportType>
      <Role>http://www.bankofmarin.com/role/CONSOLIDATEDSTATEMENTSOFCONDITIONParenthetical</Role>
      <ShortName>CONSOLIDATED STATEMENTS OF CONDITION (Parenthetical)</ShortName>
      <MenuCategory>Statements</MenuCategory>
      <Position>4</Position>
    </Report>
    <Report instance="bmrc-20231231.htm">
      <IsDefault>false</IsDefault>
      <HasEmbeddedReports>false</HasEmbeddedReports>
      <HtmlFileName>R5.htm</HtmlFileName>
      <LongName>0000005 - Statement - CONSOLIDATED STATEMENTS OF COMPREHENSIVE INCOME (LOSS)</LongName>
      <ReportType>Sheet</ReportType>
      <Role>http://www.bankofmarin.com/role/CONSOLIDATEDSTATEMENTSOFCOMPREHENSIVEINCOMELOSS</Role>
      <ShortName>CONSOLIDATED STATEMENTS OF COMPREHENSIVE INCOME (LOSS)</ShortName>
      <MenuCategory>Statements</MenuCategory>
      <Position>5</Position>
    </Report>
    <Report instance="bmrc-20231231.htm">
      <IsDefault>false</IsDefault>
      <HasEmbeddedReports>false</HasEmbeddedReports>
      <HtmlFileName>R6.htm</HtmlFileName>
      <LongName>0000006 - Statement - CONSOLIDATED STATEMENT OF CHANGES IN STOCKHOLDERS' EQUITY</LongName>
      <ReportType>Sheet</ReportType>
      <Role>http://www.bankofmarin.com/role/CONSOLIDATEDSTATEMENTOFCHANGESINSTOCKHOLDERSEQUITY</Role>
      <ShortName>CONSOLIDATED STATEMENT OF CHANGES IN STOCKHOLDERS' EQUITY</ShortName>
      <MenuCategory>Statements</MenuCategory>
      <Position>6</Position>
    </Report>
    <Report instance="bmrc-20231231.htm">
      <IsDefault>false</IsDefault>
      <HasEmbeddedReports>false</HasEmbeddedReports>
      <HtmlFileName>R7.htm</HtmlFileName>
      <LongName>0000007 - Statement - CONSOLIDATED STATEMENT OF CHANGES IN STOCKHOLDERS' EQUITY (Parenthetical)</LongName>
      <ReportType>Sheet</ReportType>
      <Role>http://www.bankofmarin.com/role/CONSOLIDATEDSTATEMENTOFCHANGESINSTOCKHOLDERSEQUITYParenthetical</Role>
      <ShortName>CONSOLIDATED STATEMENT OF CHANGES IN STOCKHOLDERS' EQUITY (Parenthetical)</ShortName>
      <MenuCategory>Statements</MenuCategory>
      <Position>7</Position>
    </Report>
    <Report instance="bmrc-20231231.htm">
      <IsDefault>false</IsDefault>
      <HasEmbeddedReports>false</HasEmbeddedReports>
      <HtmlFileName>R8.htm</HtmlFileName>
      <LongName>0000008 - Statement - CONSOLIDATED STATEMENTS OF CASH FLOWS</LongName>
      <ReportType>Sheet</ReportType>
      <Role>http://www.bankofmarin.com/role/CONSOLIDATEDSTATEMENTSOFCASHFLOWS</Role>
      <ShortName>CONSOLIDATED STATEMENTS OF CASH FLOWS</ShortName>
      <MenuCategory>Statements</MenuCategory>
      <Position>8</Position>
    </Report>
    <Report instance="bmrc-20231231.htm">
      <IsDefault>false</IsDefault>
      <HasEmbeddedReports>false</HasEmbeddedReports>
      <HtmlFileName>R9.htm</HtmlFileName>
      <LongName>0000009 - Disclosure - Summary of Significant Accounting Policies</LongName>
      <ReportType>Sheet</ReportType>
      <Role>http://www.bankofmarin.com/role/SummaryofSignificantAccountingPolicies</Role>
      <ShortName>Summary of Significant Accounting Policies</ShortName>
      <MenuCategory>Notes</MenuCategory>
      <Position>9</Position>
    </Report>
    <Report instance="bmrc-20231231.htm">
      <IsDefault>false</IsDefault>
      <HasEmbeddedReports>false</HasEmbeddedReports>
      <HtmlFileName>R10.htm</HtmlFileName>
      <LongName>0000010 - Disclosure - Investment Securities</LongName>
      <ReportType>Sheet</ReportType>
      <Role>http://www.bankofmarin.com/role/InvestmentSecurities</Role>
      <ShortName>Investment Securities</ShortName>
      <MenuCategory>Notes</MenuCategory>
      <Position>10</Position>
    </Report>
    <Report instance="bmrc-20231231.htm">
      <IsDefault>false</IsDefault>
      <HasEmbeddedReports>false</HasEmbeddedReports>
      <HtmlFileName>R11.htm</HtmlFileName>
      <LongName>0000011 - Disclosure - Loans and Allowance for Credit Losses on Loans</LongName>
      <ReportType>Sheet</ReportType>
      <Role>http://www.bankofmarin.com/role/LoansandAllowanceforCreditLossesonLoans</Role>
      <ShortName>Loans and Allowance for Credit Losses on Loans</ShortName>
      <MenuCategory>Notes</MenuCategory>
      <Position>11</Position>
    </Report>
    <Report instance="bmrc-20231231.htm">
      <IsDefault>false</IsDefault>
      <HasEmbeddedReports>false</HasEmbeddedReports>
      <HtmlFileName>R12.htm</HtmlFileName>
      <LongName>0000012 - Disclosure - Bank Premises and Equipment</LongName>
      <ReportType>Sheet</ReportType>
      <Role>http://www.bankofmarin.com/role/BankPremisesandEquipment</Role>
      <ShortName>Bank Premises and Equipment</ShortName>
      <MenuCategory>Notes</MenuCategory>
      <Position>12</Position>
    </Report>
    <Report instance="bmrc-20231231.htm">
      <IsDefault>false</IsDefault>
      <HasEmbeddedReports>false</HasEmbeddedReports>
      <HtmlFileName>R13.htm</HtmlFileName>
      <LongName>0000013 - Disclosure - Bank Owned Life Insurance</LongName>
      <ReportType>Sheet</ReportType>
      <Role>http://www.bankofmarin.com/role/BankOwnedLifeInsurance</Role>
      <ShortName>Bank Owned Life Insurance</ShortName>
      <MenuCategory>Notes</MenuCategory>
      <Position>13</Position>
    </Report>
    <Report instance="bmrc-20231231.htm">
      <IsDefault>false</IsDefault>
      <HasEmbeddedReports>false</HasEmbeddedReports>
      <HtmlFileName>R14.htm</HtmlFileName>
      <LongName>0000014 - Disclosure - Deposits</LongName>
      <ReportType>Sheet</ReportType>
      <Role>http://www.bankofmarin.com/role/Deposits</Role>
      <ShortName>Deposits</ShortName>
      <MenuCategory>Notes</MenuCategory>
      <Position>14</Position>
    </Report>
    <Report instance="bmrc-20231231.htm">
      <IsDefault>false</IsDefault>
      <HasEmbeddedReports>false</HasEmbeddedReports>
      <HtmlFileName>R15.htm</HtmlFileName>
      <LongName>0000015 - Disclosure - Borrowings and Other Obligations</LongName>
      <ReportType>Sheet</ReportType>
      <Role>http://www.bankofmarin.com/role/BorrowingsandOtherObligations</Role>
      <ShortName>Borrowings and Other Obligations</ShortName>
      <MenuCategory>Notes</MenuCategory>
      <Position>15</Position>
    </Report>
    <Report instance="bmrc-20231231.htm">
      <IsDefault>false</IsDefault>
      <HasEmbeddedReports>false</HasEmbeddedReports>
      <HtmlFileName>R16.htm</HtmlFileName>
      <LongName>0000016 - Disclosure - Stockholders' Equity and Stock Plans</LongName>
      <ReportType>Sheet</ReportType>
      <Role>http://www.bankofmarin.com/role/StockholdersEquityandStockPlans</Role>
      <ShortName>Stockholders' Equity and Stock Plans</ShortName>
      <MenuCategory>Notes</MenuCategory>
      <Position>16</Position>
    </Report>
    <Report instance="bmrc-20231231.htm">
      <IsDefault>false</IsDefault>
      <HasEmbeddedReports>false</HasEmbeddedReports>
      <HtmlFileName>R17.htm</HtmlFileName>
      <LongName>0000017 - Disclosure - Fair Value of Assets and Liabilities</LongName>
      <ReportType>Sheet</ReportType>
      <Role>http://www.bankofmarin.com/role/FairValueofAssetsandLiabilities</Role>
      <ShortName>Fair Value of Assets and Liabilities</ShortName>
      <MenuCategory>Notes</MenuCategory>
      <Position>17</Position>
    </Report>
    <Report instance="bmrc-20231231.htm">
      <IsDefault>false</IsDefault>
      <HasEmbeddedReports>false</HasEmbeddedReports>
      <HtmlFileName>R18.htm</HtmlFileName>
      <LongName>0000018 - Disclosure - Benefit Plans</LongName>
      <ReportType>Sheet</ReportType>
      <Role>http://www.bankofmarin.com/role/BenefitPlans</Role>
      <ShortName>Benefit Plans</ShortName>
      <MenuCategory>Notes</MenuCategory>
      <Position>18</Position>
    </Report>
    <Report instance="bmrc-20231231.htm">
      <IsDefault>false</IsDefault>
      <HasEmbeddedReports>false</HasEmbeddedReports>
      <HtmlFileName>R19.htm</HtmlFileName>
      <LongName>0000019 - Disclosure - Income Taxes</LongName>
      <ReportType>Sheet</ReportType>
      <Role>http://www.bankofmarin.com/role/IncomeTaxes</Role>
      <ShortName>Income Taxes</ShortName>
      <MenuCategory>Notes</MenuCategory>
      <Position>19</Position>
    </Report>
    <Report instance="bmrc-20231231.htm">
      <IsDefault>false</IsDefault>
      <HasEmbeddedReports>false</HasEmbeddedReports>
      <HtmlFileName>R20.htm</HtmlFileName>
      <LongName>0000020 - Disclosure - Commitments and Contingencies</LongName>
      <ReportType>Sheet</ReportType>
      <Role>http://www.bankofmarin.com/role/CommitmentsandContingencies</Role>
      <ShortName>Commitments and Contingencies</ShortName>
      <MenuCategory>Notes</MenuCategory>
      <Position>20</Position>
    </Report>
    <Report instance="bmrc-20231231.htm">
      <IsDefault>false</IsDefault>
      <HasEmbeddedReports>false</HasEmbeddedReports>
      <HtmlFileName>R21.htm</HtmlFileName>
      <LongName>0000021 - Disclosure - Concentrations of Credit Risk</LongName>
      <ReportType>Sheet</ReportType>
      <Role>http://www.bankofmarin.com/role/ConcentrationsofCreditRisk</Role>
      <ShortName>Concentrations of Credit Risk</ShortName>
      <MenuCategory>Notes</MenuCategory>
      <Position>21</Position>
    </Report>
    <Report instance="bmrc-20231231.htm">
      <IsDefault>false</IsDefault>
      <HasEmbeddedReports>false</HasEmbeddedReports>
      <HtmlFileName>R22.htm</HtmlFileName>
      <LongName>0000022 - Disclosure - Derivative Financial Instruments and Hedging Activities</LongName>
      <ReportType>Sheet</ReportType>
      <Role>http://www.bankofmarin.com/role/DerivativeFinancialInstrumentsandHedgingActivities</Role>
      <ShortName>Derivative Financial Instruments and Hedging Activities</ShortName>
      <MenuCategory>Notes</MenuCategory>
      <Position>22</Position>
    </Report>
    <Report instance="bmrc-20231231.htm">
      <IsDefault>false</IsDefault>
      <HasEmbeddedReports>false</HasEmbeddedReports>
      <HtmlFileName>R23.htm</HtmlFileName>
      <LongName>0000023 - Disclosure - Regulatory Matters</LongName>
      <ReportType>Sheet</ReportType>
      <Role>http://www.bankofmarin.com/role/RegulatoryMatters</Role>
      <ShortName>Regulatory Matters</ShortName>
      <MenuCategory>Notes</MenuCategory>
      <Position>23</Position>
    </Report>
    <Report instance="bmrc-20231231.htm">
      <IsDefault>false</IsDefault>
      <HasEmbeddedReports>false</HasEmbeddedReports>
      <HtmlFileName>R24.htm</HtmlFileName>
      <LongName>0000024 - Disclosure - Financial Instruments with Off-Balance Sheet Risk</LongName>
      <ReportType>Sheet</ReportType>
      <Role>http://www.bankofmarin.com/role/FinancialInstrumentswithOffBalanceSheetRisk</Role>
      <ShortName>Financial Instruments with Off-Balance Sheet Risk</ShortName>
      <MenuCategory>Notes</MenuCategory>
      <Position>24</Position>
    </Report>
    <Report instance="bmrc-20231231.htm">
      <IsDefault>false</IsDefault>
      <HasEmbeddedReports>false</HasEmbeddedReports>
      <HtmlFileName>R25.htm</HtmlFileName>
      <LongName>0000025 - Disclosure - Condensed Bank of Marin Bancorp Parent Only Financial Statements</LongName>
      <ReportType>Sheet</ReportType>
      <Role>http://www.bankofmarin.com/role/CondensedBankofMarinBancorpParentOnlyFinancialStatements</Role>
      <ShortName>Condensed Bank of Marin Bancorp Parent Only Financial Statements</ShortName>
      <MenuCategory>Notes</MenuCategory>
      <Position>25</Position>
    </Report>
    <Report instance="bmrc-20231231.htm">
      <IsDefault>false</IsDefault>
      <HasEmbeddedReports>false</HasEmbeddedReports>
      <HtmlFileName>R26.htm</HtmlFileName>
      <LongName>0000026 - Disclosure - Merger</LongName>
      <ReportType>Sheet</ReportType>
      <Role>http://www.bankofmarin.com/role/Merger</Role>
      <ShortName>Merger</ShortName>
      <MenuCategory>Notes</MenuCategory>
      <Position>26</Position>
    </Report>
    <Report instance="bmrc-20231231.htm">
      <IsDefault>false</IsDefault>
      <HasEmbeddedReports>false</HasEmbeddedReports>
      <HtmlFileName>R27.htm</HtmlFileName>
      <LongName>9954471 - Disclosure - Summary of Significant Accounting Policies (Policies)</LongName>
      <ReportType>Sheet</ReportType>
      <Role>http://www.bankofmarin.com/role/SummaryofSignificantAccountingPoliciesPolicies</Role>
      <ShortName>Summary of Significant Accounting Policies (Policies)</ShortName>
      <MenuCategory>Policies</MenuCategory>
      <ParentRole>http://www.bankofmarin.com/role/SummaryofSignificantAccountingPolicies</ParentRole>
      <Position>27</Position>
    </Report>
    <Report instance="bmrc-20231231.htm">
      <IsDefault>false</IsDefault>
      <HasEmbeddedReports>false</HasEmbeddedReports>
      <HtmlFileName>R28.htm</HtmlFileName>
      <LongName>9954472 - Disclosure - Summary of Significant Accounting Policies (Tables)</LongName>
      <ReportType>Sheet</ReportType>
      <Role>http://www.bankofmarin.com/role/SummaryofSignificantAccountingPoliciesTables</Role>
      <ShortName>Summary of Significant Accounting Policies (Tables)</ShortName>
      <MenuCategory>Tables</MenuCategory>
      <ParentRole>http://www.bankofmarin.com/role/SummaryofSignificantAccountingPolicies</ParentRole>
      <Position>28</Position>
    </Report>
    <Report instance="bmrc-20231231.htm">
      <IsDefault>false</IsDefault>
      <HasEmbeddedReports>false</HasEmbeddedReports>
      <HtmlFileName>R29.htm</HtmlFileName>
      <LongName>9954473 - Disclosure - Investment Securities (Tables)</LongName>
      <ReportType>Sheet</ReportType>
      <Role>http://www.bankofmarin.com/role/InvestmentSecuritiesTables</Role>
      <ShortName>Investment Securities (Tables)</ShortName>
      <MenuCategory>Tables</MenuCategory>
      <ParentRole>http://www.bankofmarin.com/role/InvestmentSecurities</ParentRole>
      <Position>29</Position>
    </Report>
    <Report instance="bmrc-20231231.htm">
      <IsDefault>false</IsDefault>
      <HasEmbeddedReports>false</HasEmbeddedReports>
      <HtmlFileName>R30.htm</HtmlFileName>
      <LongName>9954474 - Disclosure - Loans and Allowance for Credit Losses on Loans (Tables)</LongName>
      <ReportType>Sheet</ReportType>
      <Role>http://www.bankofmarin.com/role/LoansandAllowanceforCreditLossesonLoansTables</Role>
      <ShortName>Loans and Allowance for Credit Losses on Loans (Tables)</ShortName>
      <MenuCategory>Tables</MenuCategory>
      <ParentRole>http://www.bankofmarin.com/role/LoansandAllowanceforCreditLossesonLoans</ParentRole>
      <Position>30</Position>
    </Report>
    <Report instance="bmrc-20231231.htm">
      <IsDefault>false</IsDefault>
      <HasEmbeddedReports>false</HasEmbeddedReports>
      <HtmlFileName>R31.htm</HtmlFileName>
      <LongName>9954475 - Disclosure - Bank Premises and Equipment (Tables)</LongName>
      <ReportType>Sheet</ReportType>
      <Role>http://www.bankofmarin.com/role/BankPremisesandEquipmentTables</Role>
      <ShortName>Bank Premises and Equipment (Tables)</ShortName>
      <MenuCategory>Tables</MenuCategory>
      <ParentRole>http://www.bankofmarin.com/role/BankPremisesandEquipment</ParentRole>
      <Position>31</Position>
    </Report>
    <Report instance="bmrc-20231231.htm">
      <IsDefault>false</IsDefault>
      <HasEmbeddedReports>false</HasEmbeddedReports>
      <HtmlFileName>R32.htm</HtmlFileName>
      <LongName>9954476 - Disclosure - Deposits (Tables)</LongName>
      <ReportType>Sheet</ReportType>
      <Role>http://www.bankofmarin.com/role/DepositsTables</Role>
      <ShortName>Deposits (Tables)</ShortName>
      <MenuCategory>Tables</MenuCategory>
      <ParentRole>http://www.bankofmarin.com/role/Deposits</ParentRole>
      <Position>32</Position>
    </Report>
    <Report instance="bmrc-20231231.htm">
      <IsDefault>false</IsDefault>
      <HasEmbeddedReports>false</HasEmbeddedReports>
      <HtmlFileName>R33.htm</HtmlFileName>
      <LongName>9954477 - Disclosure - Borrowings and Other Obligations (Tables)</LongName>
      <ReportType>Sheet</ReportType>
      <Role>http://www.bankofmarin.com/role/BorrowingsandOtherObligationsTables</Role>
      <ShortName>Borrowings and Other Obligations (Tables)</ShortName>
      <MenuCategory>Tables</MenuCategory>
      <ParentRole>http://www.bankofmarin.com/role/BorrowingsandOtherObligations</ParentRole>
      <Position>33</Position>
    </Report>
    <Report instance="bmrc-20231231.htm">
      <IsDefault>false</IsDefault>
      <HasEmbeddedReports>false</HasEmbeddedReports>
      <HtmlFileName>R34.htm</HtmlFileName>
      <LongName>9954478 - Disclosure - Stockholders' Equity and Stock Plans (Tables)</LongName>
      <ReportType>Sheet</ReportType>
      <Role>http://www.bankofmarin.com/role/StockholdersEquityandStockPlansTables</Role>
      <ShortName>Stockholders' Equity and Stock Plans (Tables)</ShortName>
      <MenuCategory>Tables</MenuCategory>
      <ParentRole>http://www.bankofmarin.com/role/StockholdersEquityandStockPlans</ParentRole>
      <Position>34</Position>
    </Report>
    <Report instance="bmrc-20231231.htm">
      <IsDefault>false</IsDefault>
      <HasEmbeddedReports>false</HasEmbeddedReports>
      <HtmlFileName>R35.htm</HtmlFileName>
      <LongName>9954479 - Disclosure - Fair Value of Assets and Liabilities (Tables)</LongName>
      <ReportType>Sheet</ReportType>
      <Role>http://www.bankofmarin.com/role/FairValueofAssetsandLiabilitiesTables</Role>
      <ShortName>Fair Value of Assets and Liabilities (Tables)</ShortName>
      <MenuCategory>Tables</MenuCategory>
      <ParentRole>http://www.bankofmarin.com/role/FairValueofAssetsandLiabilities</ParentRole>
      <Position>35</Position>
    </Report>
    <Report instance="bmrc-20231231.htm">
      <IsDefault>false</IsDefault>
      <HasEmbeddedReports>false</HasEmbeddedReports>
      <HtmlFileName>R36.htm</HtmlFileName>
      <LongName>9954480 - Disclosure - Income Taxes (Tables)</LongName>
      <ReportType>Sheet</ReportType>
      <Role>http://www.bankofmarin.com/role/IncomeTaxesTables</Role>
      <ShortName>Income Taxes (Tables)</ShortName>
      <MenuCategory>Tables</MenuCategory>
      <ParentRole>http://www.bankofmarin.com/role/IncomeTaxes</ParentRole>
      <Position>36</Position>
    </Report>
    <Report instance="bmrc-20231231.htm">
      <IsDefault>false</IsDefault>
      <HasEmbeddedReports>false</HasEmbeddedReports>
      <HtmlFileName>R37.htm</HtmlFileName>
      <LongName>9954481 - Disclosure - Commitments and Contingencies (Tables)</LongName>
      <ReportType>Sheet</ReportType>
      <Role>http://www.bankofmarin.com/role/CommitmentsandContingenciesTables</Role>
      <ShortName>Commitments and Contingencies (Tables)</ShortName>
      <MenuCategory>Tables</MenuCategory>
      <ParentRole>http://www.bankofmarin.com/role/CommitmentsandContingencies</ParentRole>
      <Position>37</Position>
    </Report>
    <Report instance="bmrc-20231231.htm">
      <IsDefault>false</IsDefault>
      <HasEmbeddedReports>false</HasEmbeddedReports>
      <HtmlFileName>R38.htm</HtmlFileName>
      <LongName>9954482 - Disclosure - Derivative Financial Instruments and Hedging Activities (Tables)</LongName>
      <ReportType>Sheet</ReportType>
      <Role>http://www.bankofmarin.com/role/DerivativeFinancialInstrumentsandHedgingActivitiesTables</Role>
      <ShortName>Derivative Financial Instruments and Hedging Activities (Tables)</ShortName>
      <MenuCategory>Tables</MenuCategory>
      <ParentRole>http://www.bankofmarin.com/role/DerivativeFinancialInstrumentsandHedgingActivities</ParentRole>
      <Position>38</Position>
    </Report>
    <Report instance="bmrc-20231231.htm">
      <IsDefault>false</IsDefault>
      <HasEmbeddedReports>false</HasEmbeddedReports>
      <HtmlFileName>R39.htm</HtmlFileName>
      <LongName>9954483 - Disclosure - Regulatory Matters (Tables)</LongName>
      <ReportType>Sheet</ReportType>
      <Role>http://www.bankofmarin.com/role/RegulatoryMattersTables</Role>
      <ShortName>Regulatory Matters (Tables)</ShortName>
      <MenuCategory>Tables</MenuCategory>
      <ParentRole>http://www.bankofmarin.com/role/RegulatoryMatters</ParentRole>
      <Position>39</Position>
    </Report>
    <Report instance="bmrc-20231231.htm">
      <IsDefault>false</IsDefault>
      <HasEmbeddedReports>false</HasEmbeddedReports>
      <HtmlFileName>R40.htm</HtmlFileName>
      <LongName>9954484 - Disclosure - Financial Instruments with Off-Balance Sheet Risk (Tables)</LongName>
      <ReportType>Sheet</ReportType>
      <Role>http://www.bankofmarin.com/role/FinancialInstrumentswithOffBalanceSheetRiskTables</Role>
      <ShortName>Financial Instruments with Off-Balance Sheet Risk (Tables)</ShortName>
      <MenuCategory>Tables</MenuCategory>
      <ParentRole>http://www.bankofmarin.com/role/FinancialInstrumentswithOffBalanceSheetRisk</ParentRole>
      <Position>40</Position>
    </Report>
    <Report instance="bmrc-20231231.htm">
      <IsDefault>false</IsDefault>
      <HasEmbeddedReports>false</HasEmbeddedReports>
      <HtmlFileName>R41.htm</HtmlFileName>
      <LongName>9954485 - Disclosure - Condensed Bank of Marin Bancorp Parent Only Financial Statements (Tables)</LongName>
      <ReportType>Sheet</ReportType>
      <Role>http://www.bankofmarin.com/role/CondensedBankofMarinBancorpParentOnlyFinancialStatementsTables</Role>
      <ShortName>Condensed Bank of Marin Bancorp Parent Only Financial Statements (Tables)</ShortName>
      <MenuCategory>Tables</MenuCategory>
      <ParentRole>http://www.bankofmarin.com/role/CondensedBankofMarinBancorpParentOnlyFinancialStatements</ParentRole>
      <Position>41</Position>
    </Report>
    <Report instance="bmrc-20231231.htm">
      <IsDefault>false</IsDefault>
      <HasEmbeddedReports>false</HasEmbeddedReports>
      <HtmlFileName>R42.htm</HtmlFileName>
      <LongName>9954486 - Disclosure - Merger (Tables)</LongName>
      <ReportType>Sheet</ReportType>
      <Role>http://www.bankofmarin.com/role/MergerTables</Role>
      <ShortName>Merger (Tables)</ShortName>
      <MenuCategory>Tables</MenuCategory>
      <ParentRole>http://www.bankofmarin.com/role/Merger</ParentRole>
      <Position>42</Position>
    </Report>
    <Report instance="bmrc-20231231.htm">
      <IsDefault>false</IsDefault>
      <HasEmbeddedReports>false</HasEmbeddedReports>
      <HtmlFileName>R43.htm</HtmlFileName>
      <LongName>9954487 - Disclosure - Summary of Significant Accounting Policies - Nature of Operations and Basis of Presentation (Details)</LongName>
      <ReportType>Sheet</ReportType>
      <Role>http://www.bankofmarin.com/role/SummaryofSignificantAccountingPoliciesNatureofOperationsandBasisofPresentationDetails</Role>
      <ShortName>Summary of Significant Accounting Policies - Nature of Operations and Basis of Presentation (Details)</ShortName>
      <MenuCategory>Details</MenuCategory>
      <Position>43</Position>
    </Report>
    <Report instance="bmrc-20231231.htm">
      <IsDefault>false</IsDefault>
      <HasEmbeddedReports>false</HasEmbeddedReports>
      <HtmlFileName>R44.htm</HtmlFileName>
      <LongName>9954488 - Disclosure - Summary of Significant Accounting Policies - Financing Receivable Narrative (Details)</LongName>
      <ReportType>Sheet</ReportType>
      <Role>http://www.bankofmarin.com/role/SummaryofSignificantAccountingPoliciesFinancingReceivableNarrativeDetails</Role>
      <ShortName>Summary of Significant Accounting Policies - Financing Receivable Narrative (Details)</ShortName>
      <MenuCategory>Details</MenuCategory>
      <Position>44</Position>
    </Report>
    <Report instance="bmrc-20231231.htm">
      <IsDefault>false</IsDefault>
      <HasEmbeddedReports>false</HasEmbeddedReports>
      <HtmlFileName>R45.htm</HtmlFileName>
      <LongName>9954489 - Disclosure - Summary of Significant Accounting Policies - Transfer of Financial Assets (Details)</LongName>
      <ReportType>Sheet</ReportType>
      <Role>http://www.bankofmarin.com/role/SummaryofSignificantAccountingPoliciesTransferofFinancialAssetsDetails</Role>
      <ShortName>Summary of Significant Accounting Policies - Transfer of Financial Assets (Details)</ShortName>
      <MenuCategory>Details</MenuCategory>
      <Position>45</Position>
    </Report>
    <Report instance="bmrc-20231231.htm">
      <IsDefault>false</IsDefault>
      <HasEmbeddedReports>false</HasEmbeddedReports>
      <HtmlFileName>R46.htm</HtmlFileName>
      <LongName>9954490 - Disclosure - Summary of Significant Accounting Policies - Premises and Equipment (Details)</LongName>
      <ReportType>Sheet</ReportType>
      <Role>http://www.bankofmarin.com/role/SummaryofSignificantAccountingPoliciesPremisesandEquipmentDetails</Role>
      <ShortName>Summary of Significant Accounting Policies - Premises and Equipment (Details)</ShortName>
      <MenuCategory>Details</MenuCategory>
      <Position>46</Position>
    </Report>
    <Report instance="bmrc-20231231.htm">
      <IsDefault>false</IsDefault>
      <HasEmbeddedReports>false</HasEmbeddedReports>
      <HtmlFileName>R47.htm</HtmlFileName>
      <LongName>9954491 - Disclosure - Summary of Significant Accounting Policies - Goodwill and Other Intangible Assets (Details)</LongName>
      <ReportType>Sheet</ReportType>
      <Role>http://www.bankofmarin.com/role/SummaryofSignificantAccountingPoliciesGoodwillandOtherIntangibleAssetsDetails</Role>
      <ShortName>Summary of Significant Accounting Policies - Goodwill and Other Intangible Assets (Details)</ShortName>
      <MenuCategory>Details</MenuCategory>
      <Position>47</Position>
    </Report>
    <Report instance="bmrc-20231231.htm">
      <IsDefault>false</IsDefault>
      <HasEmbeddedReports>false</HasEmbeddedReports>
      <HtmlFileName>R48.htm</HtmlFileName>
      <LongName>9954492 - Disclosure - Summary of Significant Accounting Policies - Future Amortization Expense of Core Deposits (Details)</LongName>
      <ReportType>Sheet</ReportType>
      <Role>http://www.bankofmarin.com/role/SummaryofSignificantAccountingPoliciesFutureAmortizationExpenseofCoreDepositsDetails</Role>
      <ShortName>Summary of Significant Accounting Policies - Future Amortization Expense of Core Deposits (Details)</ShortName>
      <MenuCategory>Details</MenuCategory>
      <Position>48</Position>
    </Report>
    <Report instance="bmrc-20231231.htm">
      <IsDefault>false</IsDefault>
      <HasEmbeddedReports>false</HasEmbeddedReports>
      <HtmlFileName>R49.htm</HtmlFileName>
      <LongName>9954493 - Disclosure - Summary of Significant Accounting Policies - Other Real Estate Owned (Details)</LongName>
      <ReportType>Sheet</ReportType>
      <Role>http://www.bankofmarin.com/role/SummaryofSignificantAccountingPoliciesOtherRealEstateOwnedDetails</Role>
      <ShortName>Summary of Significant Accounting Policies - Other Real Estate Owned (Details)</ShortName>
      <MenuCategory>Details</MenuCategory>
      <Position>49</Position>
    </Report>
    <Report instance="bmrc-20231231.htm">
      <IsDefault>false</IsDefault>
      <HasEmbeddedReports>false</HasEmbeddedReports>
      <HtmlFileName>R50.htm</HtmlFileName>
      <LongName>9954494 - Disclosure - Summary of Significant Accounting Policies - Investments in Low Income Housing Tax Credit Funds (Details)</LongName>
      <ReportType>Sheet</ReportType>
      <Role>http://www.bankofmarin.com/role/SummaryofSignificantAccountingPoliciesInvestmentsinLowIncomeHousingTaxCreditFundsDetails</Role>
      <ShortName>Summary of Significant Accounting Policies - Investments in Low Income Housing Tax Credit Funds (Details)</ShortName>
      <MenuCategory>Details</MenuCategory>
      <Position>50</Position>
    </Report>
    <Report instance="bmrc-20231231.htm">
      <IsDefault>false</IsDefault>
      <HasEmbeddedReports>false</HasEmbeddedReports>
      <HtmlFileName>R51.htm</HtmlFileName>
      <LongName>9954495 - Disclosure - Summary of Significant Accounting Policies - Earnings Per Share (Details)</LongName>
      <ReportType>Sheet</ReportType>
      <Role>http://www.bankofmarin.com/role/SummaryofSignificantAccountingPoliciesEarningsPerShareDetails</Role>
      <ShortName>Summary of Significant Accounting Policies - Earnings Per Share (Details)</ShortName>
      <MenuCategory>Details</MenuCategory>
      <Position>51</Position>
    </Report>
    <Report instance="bmrc-20231231.htm">
      <IsDefault>false</IsDefault>
      <HasEmbeddedReports>false</HasEmbeddedReports>
      <HtmlFileName>R52.htm</HtmlFileName>
      <LongName>9954496 - Disclosure - Summary of Significant Accounting Policies - Advertising Costs (Details)</LongName>
      <ReportType>Sheet</ReportType>
      <Role>http://www.bankofmarin.com/role/SummaryofSignificantAccountingPoliciesAdvertisingCostsDetails</Role>
      <ShortName>Summary of Significant Accounting Policies - Advertising Costs (Details)</ShortName>
      <MenuCategory>Details</MenuCategory>
      <Position>52</Position>
    </Report>
    <Report instance="bmrc-20231231.htm">
      <IsDefault>false</IsDefault>
      <HasEmbeddedReports>false</HasEmbeddedReports>
      <HtmlFileName>R53.htm</HtmlFileName>
      <LongName>9954497 - Disclosure - Summary of Significant Accounting Policies - Other Recently Adopted Accounting Standards (Details)</LongName>
      <ReportType>Sheet</ReportType>
      <Role>http://www.bankofmarin.com/role/SummaryofSignificantAccountingPoliciesOtherRecentlyAdoptedAccountingStandardsDetails</Role>
      <ShortName>Summary of Significant Accounting Policies - Other Recently Adopted Accounting Standards (Details)</ShortName>
      <MenuCategory>Details</MenuCategory>
      <Position>53</Position>
    </Report>
    <Report instance="bmrc-20231231.htm">
      <IsDefault>false</IsDefault>
      <HasEmbeddedReports>false</HasEmbeddedReports>
      <HtmlFileName>R54.htm</HtmlFileName>
      <LongName>9954498 - Disclosure - Investment Securities - Held-to-Maturity Amortized Cost and Fair Value (Details)</LongName>
      <ReportType>Sheet</ReportType>
      <Role>http://www.bankofmarin.com/role/InvestmentSecuritiesHeldtoMaturityAmortizedCostandFairValueDetails</Role>
      <ShortName>Investment Securities - Held-to-Maturity Amortized Cost and Fair Value (Details)</ShortName>
      <MenuCategory>Details</MenuCategory>
      <Position>54</Position>
    </Report>
    <Report instance="bmrc-20231231.htm">
      <IsDefault>false</IsDefault>
      <HasEmbeddedReports>false</HasEmbeddedReports>
      <HtmlFileName>R55.htm</HtmlFileName>
      <LongName>9954499 - Disclosure - Investment Securities - Narrative (Details)</LongName>
      <ReportType>Sheet</ReportType>
      <Role>http://www.bankofmarin.com/role/InvestmentSecuritiesNarrativeDetails</Role>
      <ShortName>Investment Securities - Narrative (Details)</ShortName>
      <MenuCategory>Details</MenuCategory>
      <Position>55</Position>
    </Report>
    <Report instance="bmrc-20231231.htm">
      <IsDefault>false</IsDefault>
      <HasEmbeddedReports>false</HasEmbeddedReports>
      <HtmlFileName>R56.htm</HtmlFileName>
      <LongName>9954500 - Disclosure - Investment Securities - Schedule of Bond Ratings For Held-to-Maturity Securities (Details)</LongName>
      <ReportType>Sheet</ReportType>
      <Role>http://www.bankofmarin.com/role/InvestmentSecuritiesScheduleofBondRatingsForHeldtoMaturitySecuritiesDetails</Role>
      <ShortName>Investment Securities - Schedule of Bond Ratings For Held-to-Maturity Securities (Details)</ShortName>
      <MenuCategory>Details</MenuCategory>
      <Position>56</Position>
    </Report>
    <Report instance="bmrc-20231231.htm">
      <IsDefault>false</IsDefault>
      <HasEmbeddedReports>false</HasEmbeddedReports>
      <HtmlFileName>R57.htm</HtmlFileName>
      <LongName>9954501 - Disclosure - Investment Securities - Schedule of Available-for-Sale Securities Amortized Cost and Fair Value (Details)</LongName>
      <ReportType>Sheet</ReportType>
      <Role>http://www.bankofmarin.com/role/InvestmentSecuritiesScheduleofAvailableforSaleSecuritiesAmortizedCostandFairValueDetails</Role>
      <ShortName>Investment Securities - Schedule of Available-for-Sale Securities Amortized Cost and Fair Value (Details)</ShortName>
      <MenuCategory>Details</MenuCategory>
      <Position>57</Position>
    </Report>
    <Report instance="bmrc-20231231.htm">
      <IsDefault>false</IsDefault>
      <HasEmbeddedReports>false</HasEmbeddedReports>
      <HtmlFileName>R58.htm</HtmlFileName>
      <LongName>9954502 - Disclosure - Investment Securities - Schedule of Maturities (Details)</LongName>
      <ReportType>Sheet</ReportType>
      <Role>http://www.bankofmarin.com/role/InvestmentSecuritiesScheduleofMaturitiesDetails</Role>
      <ShortName>Investment Securities - Schedule of Maturities (Details)</ShortName>
      <MenuCategory>Details</MenuCategory>
      <Position>58</Position>
    </Report>
    <Report instance="bmrc-20231231.htm">
      <IsDefault>false</IsDefault>
      <HasEmbeddedReports>false</HasEmbeddedReports>
      <HtmlFileName>R59.htm</HtmlFileName>
      <LongName>9954503 - Disclosure - Investment Securities - Schedule of Sale of Investment Securities and Gross Gains and Losses (Details)</LongName>
      <ReportType>Sheet</ReportType>
      <Role>http://www.bankofmarin.com/role/InvestmentSecuritiesScheduleofSaleofInvestmentSecuritiesandGrossGainsandLossesDetails</Role>
      <ShortName>Investment Securities - Schedule of Sale of Investment Securities and Gross Gains and Losses (Details)</ShortName>
      <MenuCategory>Details</MenuCategory>
      <Position>59</Position>
    </Report>
    <Report instance="bmrc-20231231.htm">
      <IsDefault>false</IsDefault>
      <HasEmbeddedReports>false</HasEmbeddedReports>
      <HtmlFileName>R60.htm</HtmlFileName>
      <LongName>9954504 - Disclosure - Investment Securities - Schedule of Pledged and Transferred Securities (Details)</LongName>
      <ReportType>Sheet</ReportType>
      <Role>http://www.bankofmarin.com/role/InvestmentSecuritiesScheduleofPledgedandTransferredSecuritiesDetails</Role>
      <ShortName>Investment Securities - Schedule of Pledged and Transferred Securities (Details)</ShortName>
      <MenuCategory>Details</MenuCategory>
      <Position>60</Position>
    </Report>
    <Report instance="bmrc-20231231.htm">
      <IsDefault>false</IsDefault>
      <HasEmbeddedReports>false</HasEmbeddedReports>
      <HtmlFileName>R61.htm</HtmlFileName>
      <LongName>9954505 - Disclosure - Investment Securities - Schedule of Unrealized Loss Positions (Details)</LongName>
      <ReportType>Sheet</ReportType>
      <Role>http://www.bankofmarin.com/role/InvestmentSecuritiesScheduleofUnrealizedLossPositionsDetails</Role>
      <ShortName>Investment Securities - Schedule of Unrealized Loss Positions (Details)</ShortName>
      <MenuCategory>Details</MenuCategory>
      <Position>61</Position>
    </Report>
    <Report instance="bmrc-20231231.htm">
      <IsDefault>false</IsDefault>
      <HasEmbeddedReports>false</HasEmbeddedReports>
      <HtmlFileName>R62.htm</HtmlFileName>
      <LongName>9954506 - Disclosure - Investment Securities - Non-Marketable Securities Included in Other Assets Narrative (Details)</LongName>
      <ReportType>Sheet</ReportType>
      <Role>http://www.bankofmarin.com/role/InvestmentSecuritiesNonMarketableSecuritiesIncludedinOtherAssetsNarrativeDetails</Role>
      <ShortName>Investment Securities - Non-Marketable Securities Included in Other Assets Narrative (Details)</ShortName>
      <MenuCategory>Details</MenuCategory>
      <Position>62</Position>
    </Report>
    <Report instance="bmrc-20231231.htm">
      <IsDefault>false</IsDefault>
      <HasEmbeddedReports>false</HasEmbeddedReports>
      <HtmlFileName>R63.htm</HtmlFileName>
      <LongName>9954507 - Disclosure - Loans and Allowance for Credit Losses on Loans - Schedule of Loans by Class (Details)</LongName>
      <ReportType>Sheet</ReportType>
      <Role>http://www.bankofmarin.com/role/LoansandAllowanceforCreditLossesonLoansScheduleofLoansbyClassDetails</Role>
      <ShortName>Loans and Allowance for Credit Losses on Loans - Schedule of Loans by Class (Details)</ShortName>
      <MenuCategory>Details</MenuCategory>
      <Position>63</Position>
    </Report>
    <Report instance="bmrc-20231231.htm">
      <IsDefault>false</IsDefault>
      <HasEmbeddedReports>false</HasEmbeddedReports>
      <HtmlFileName>R64.htm</HtmlFileName>
      <LongName>9954508 - Disclosure - Loans and Allowance for Credit Losses on Loans - Concentrations of Credit Narrative (Details)</LongName>
      <ReportType>Sheet</ReportType>
      <Role>http://www.bankofmarin.com/role/LoansandAllowanceforCreditLossesonLoansConcentrationsofCreditNarrativeDetails</Role>
      <ShortName>Loans and Allowance for Credit Losses on Loans - Concentrations of Credit Narrative (Details)</ShortName>
      <MenuCategory>Details</MenuCategory>
      <Position>64</Position>
    </Report>
    <Report instance="bmrc-20231231.htm">
      <IsDefault>false</IsDefault>
      <HasEmbeddedReports>false</HasEmbeddedReports>
      <HtmlFileName>R65.htm</HtmlFileName>
      <LongName>9954509 - Disclosure - Loans and Allowance for Credit Losses on Loans - Schedule of Loans by Risk Grade and Origination Year (Details)</LongName>
      <ReportType>Sheet</ReportType>
      <Role>http://www.bankofmarin.com/role/LoansandAllowanceforCreditLossesonLoansScheduleofLoansbyRiskGradeandOriginationYearDetails</Role>
      <ShortName>Loans and Allowance for Credit Losses on Loans - Schedule of Loans by Risk Grade and Origination Year (Details)</ShortName>
      <MenuCategory>Details</MenuCategory>
      <Position>65</Position>
    </Report>
    <Report instance="bmrc-20231231.htm">
      <IsDefault>false</IsDefault>
      <HasEmbeddedReports>false</HasEmbeddedReports>
      <HtmlFileName>R66.htm</HtmlFileName>
      <LongName>9954510 - Disclosure - Loans and Allowance for Credit Losses on Loans - Loans Outstanding and Aging Analysis (Details)</LongName>
      <ReportType>Sheet</ReportType>
      <Role>http://www.bankofmarin.com/role/LoansandAllowanceforCreditLossesonLoansLoansOutstandingandAgingAnalysisDetails</Role>
      <ShortName>Loans and Allowance for Credit Losses on Loans - Loans Outstanding and Aging Analysis (Details)</ShortName>
      <MenuCategory>Details</MenuCategory>
      <Position>66</Position>
    </Report>
    <Report instance="bmrc-20231231.htm">
      <IsDefault>false</IsDefault>
      <HasEmbeddedReports>false</HasEmbeddedReports>
      <HtmlFileName>R67.htm</HtmlFileName>
      <LongName>9954511 - Disclosure - Loans and Allowance for Credit Losses on Loans - Schedule of Collateral-Dependent Non-Accrual Loans (Details)</LongName>
      <ReportType>Sheet</ReportType>
      <Role>http://www.bankofmarin.com/role/LoansandAllowanceforCreditLossesonLoansScheduleofCollateralDependentNonAccrualLoansDetails</Role>
      <ShortName>Loans and Allowance for Credit Losses on Loans - Schedule of Collateral-Dependent Non-Accrual Loans (Details)</ShortName>
      <MenuCategory>Details</MenuCategory>
      <Position>67</Position>
    </Report>
    <Report instance="bmrc-20231231.htm">
      <IsDefault>false</IsDefault>
      <HasEmbeddedReports>false</HasEmbeddedReports>
      <HtmlFileName>R68.htm</HtmlFileName>
      <LongName>9954512 - Disclosure - Loans and Allowance for Credit Losses on Loans - Schedule of Amortized Cost of Loan (Details)</LongName>
      <ReportType>Sheet</ReportType>
      <Role>http://www.bankofmarin.com/role/LoansandAllowanceforCreditLossesonLoansScheduleofAmortizedCostofLoanDetails</Role>
      <ShortName>Loans and Allowance for Credit Losses on Loans - Schedule of Amortized Cost of Loan (Details)</ShortName>
      <MenuCategory>Details</MenuCategory>
      <Position>68</Position>
    </Report>
    <Report instance="bmrc-20231231.htm">
      <IsDefault>false</IsDefault>
      <HasEmbeddedReports>false</HasEmbeddedReports>
      <HtmlFileName>R69.htm</HtmlFileName>
      <LongName>9954513 - Disclosure - Loans and Allowance for Credit Losses on Loans - Schedule of Financial Effect of Loan Modifications (Details)</LongName>
      <ReportType>Sheet</ReportType>
      <Role>http://www.bankofmarin.com/role/LoansandAllowanceforCreditLossesonLoansScheduleofFinancialEffectofLoanModificationsDetails</Role>
      <ShortName>Loans and Allowance for Credit Losses on Loans - Schedule of Financial Effect of Loan Modifications (Details)</ShortName>
      <MenuCategory>Details</MenuCategory>
      <Position>69</Position>
    </Report>
    <Report instance="bmrc-20231231.htm">
      <IsDefault>false</IsDefault>
      <HasEmbeddedReports>false</HasEmbeddedReports>
      <HtmlFileName>R70.htm</HtmlFileName>
      <LongName>9954514 - Disclosure - Loans and Allowance for Credit Losses on Loans - Schedule of Amortized Cost and Payment Status of Loans (Details)</LongName>
      <ReportType>Sheet</ReportType>
      <Role>http://www.bankofmarin.com/role/LoansandAllowanceforCreditLossesonLoansScheduleofAmortizedCostandPaymentStatusofLoansDetails</Role>
      <ShortName>Loans and Allowance for Credit Losses on Loans - Schedule of Amortized Cost and Payment Status of Loans (Details)</ShortName>
      <MenuCategory>Details</MenuCategory>
      <Position>70</Position>
    </Report>
    <Report instance="bmrc-20231231.htm">
      <IsDefault>false</IsDefault>
      <HasEmbeddedReports>false</HasEmbeddedReports>
      <HtmlFileName>R71.htm</HtmlFileName>
      <LongName>9954515 - Disclosure - Loans and Allowance for Credit Losses on Loans - Schedule of Allocation of the Allowance for Credit Losses on Loans (Details)</LongName>
      <ReportType>Sheet</ReportType>
      <Role>http://www.bankofmarin.com/role/LoansandAllowanceforCreditLossesonLoansScheduleofAllocationoftheAllowanceforCreditLossesonLoansDetails</Role>
      <ShortName>Loans and Allowance for Credit Losses on Loans - Schedule of Allocation of the Allowance for Credit Losses on Loans (Details)</ShortName>
      <MenuCategory>Details</MenuCategory>
      <Position>71</Position>
    </Report>
    <Report instance="bmrc-20231231.htm">
      <IsDefault>false</IsDefault>
      <HasEmbeddedReports>false</HasEmbeddedReports>
      <HtmlFileName>R72.htm</HtmlFileName>
      <LongName>9954516 - Disclosure - Loans and Allowance for Credit Losses on Loans - Schedule of Allowance for Credit Losses on Loans (Details)</LongName>
      <ReportType>Sheet</ReportType>
      <Role>http://www.bankofmarin.com/role/LoansandAllowanceforCreditLossesonLoansScheduleofAllowanceforCreditLossesonLoansDetails</Role>
      <ShortName>Loans and Allowance for Credit Losses on Loans - Schedule of Allowance for Credit Losses on Loans (Details)</ShortName>
      <MenuCategory>Details</MenuCategory>
      <Position>72</Position>
    </Report>
    <Report instance="bmrc-20231231.htm">
      <IsDefault>false</IsDefault>
      <HasEmbeddedReports>false</HasEmbeddedReports>
      <HtmlFileName>R73.htm</HtmlFileName>
      <LongName>9954517 - Disclosure - Loans and Allowance for Credit Losses on Loans - Pledged Loans Narrative (Details)</LongName>
      <ReportType>Sheet</ReportType>
      <Role>http://www.bankofmarin.com/role/LoansandAllowanceforCreditLossesonLoansPledgedLoansNarrativeDetails</Role>
      <ShortName>Loans and Allowance for Credit Losses on Loans - Pledged Loans Narrative (Details)</ShortName>
      <MenuCategory>Details</MenuCategory>
      <Position>73</Position>
    </Report>
    <Report instance="bmrc-20231231.htm">
      <IsDefault>false</IsDefault>
      <HasEmbeddedReports>false</HasEmbeddedReports>
      <HtmlFileName>R74.htm</HtmlFileName>
      <LongName>9954518 - Disclosure - Loans and Allowance for Credit Losses on Loans - Related Party Loans (Details)</LongName>
      <ReportType>Sheet</ReportType>
      <Role>http://www.bankofmarin.com/role/LoansandAllowanceforCreditLossesonLoansRelatedPartyLoansDetails</Role>
      <ShortName>Loans and Allowance for Credit Losses on Loans - Related Party Loans (Details)</ShortName>
      <MenuCategory>Details</MenuCategory>
      <Position>74</Position>
    </Report>
    <Report instance="bmrc-20231231.htm">
      <IsDefault>false</IsDefault>
      <HasEmbeddedReports>false</HasEmbeddedReports>
      <HtmlFileName>R75.htm</HtmlFileName>
      <LongName>9954519 - Disclosure - Loans and Allowance for Credit Losses on Loans - Related Party Loans Narrative (Details)</LongName>
      <ReportType>Sheet</ReportType>
      <Role>http://www.bankofmarin.com/role/LoansandAllowanceforCreditLossesonLoansRelatedPartyLoansNarrativeDetails</Role>
      <ShortName>Loans and Allowance for Credit Losses on Loans - Related Party Loans Narrative (Details)</ShortName>
      <MenuCategory>Details</MenuCategory>
      <Position>75</Position>
    </Report>
    <Report instance="bmrc-20231231.htm">
      <IsDefault>false</IsDefault>
      <HasEmbeddedReports>false</HasEmbeddedReports>
      <HtmlFileName>R76.htm</HtmlFileName>
      <LongName>9954520 - Disclosure - Bank Premises and Equipment - Schedule of Bank Premises and Equipment (Details)</LongName>
      <ReportType>Sheet</ReportType>
      <Role>http://www.bankofmarin.com/role/BankPremisesandEquipmentScheduleofBankPremisesandEquipmentDetails</Role>
      <ShortName>Bank Premises and Equipment - Schedule of Bank Premises and Equipment (Details)</ShortName>
      <MenuCategory>Details</MenuCategory>
      <Position>76</Position>
    </Report>
    <Report instance="bmrc-20231231.htm">
      <IsDefault>false</IsDefault>
      <HasEmbeddedReports>false</HasEmbeddedReports>
      <HtmlFileName>R77.htm</HtmlFileName>
      <LongName>9954521 - Disclosure - Bank Premises and Equipment - Narrative (Details)</LongName>
      <ReportType>Sheet</ReportType>
      <Role>http://www.bankofmarin.com/role/BankPremisesandEquipmentNarrativeDetails</Role>
      <ShortName>Bank Premises and Equipment - Narrative (Details)</ShortName>
      <MenuCategory>Details</MenuCategory>
      <Position>77</Position>
    </Report>
    <Report instance="bmrc-20231231.htm">
      <IsDefault>false</IsDefault>
      <HasEmbeddedReports>false</HasEmbeddedReports>
      <HtmlFileName>R78.htm</HtmlFileName>
      <LongName>9954522 - Disclosure - Bank Owned Life Insurance (Details)</LongName>
      <ReportType>Sheet</ReportType>
      <Role>http://www.bankofmarin.com/role/BankOwnedLifeInsuranceDetails</Role>
      <ShortName>Bank Owned Life Insurance (Details)</ShortName>
      <MenuCategory>Details</MenuCategory>
      <ParentRole>http://www.bankofmarin.com/role/BankOwnedLifeInsurance</ParentRole>
      <Position>78</Position>
    </Report>
    <Report instance="bmrc-20231231.htm">
      <IsDefault>false</IsDefault>
      <HasEmbeddedReports>false</HasEmbeddedReports>
      <HtmlFileName>R79.htm</HtmlFileName>
      <LongName>9954523 - Disclosure - Deposits - Schedule of Stratification of Time Deposits (Details)</LongName>
      <ReportType>Sheet</ReportType>
      <Role>http://www.bankofmarin.com/role/DepositsScheduleofStratificationofTimeDepositsDetails</Role>
      <ShortName>Deposits - Schedule of Stratification of Time Deposits (Details)</ShortName>
      <MenuCategory>Details</MenuCategory>
      <Position>79</Position>
    </Report>
    <Report instance="bmrc-20231231.htm">
      <IsDefault>false</IsDefault>
      <HasEmbeddedReports>false</HasEmbeddedReports>
      <HtmlFileName>R80.htm</HtmlFileName>
      <LongName>9954524 - Disclosure - Deposits - Narrative (Details)</LongName>
      <ReportType>Sheet</ReportType>
      <Role>http://www.bankofmarin.com/role/DepositsNarrativeDetails</Role>
      <ShortName>Deposits - Narrative (Details)</ShortName>
      <MenuCategory>Details</MenuCategory>
      <Position>80</Position>
    </Report>
    <Report instance="bmrc-20231231.htm">
      <IsDefault>false</IsDefault>
      <HasEmbeddedReports>false</HasEmbeddedReports>
      <HtmlFileName>R81.htm</HtmlFileName>
      <LongName>9954525 - Disclosure - Deposits - Schedule of Time Deposit Maturities (Details)</LongName>
      <ReportType>Sheet</ReportType>
      <Role>http://www.bankofmarin.com/role/DepositsScheduleofTimeDepositMaturitiesDetails</Role>
      <ShortName>Deposits - Schedule of Time Deposit Maturities (Details)</ShortName>
      <MenuCategory>Details</MenuCategory>
      <Position>81</Position>
    </Report>
    <Report instance="bmrc-20231231.htm">
      <IsDefault>false</IsDefault>
      <HasEmbeddedReports>false</HasEmbeddedReports>
      <HtmlFileName>R82.htm</HtmlFileName>
      <LongName>9954526 - Disclosure - Deposits - Schedule of Composition of Network Deposits (Details)</LongName>
      <ReportType>Sheet</ReportType>
      <Role>http://www.bankofmarin.com/role/DepositsScheduleofCompositionofNetworkDepositsDetails</Role>
      <ShortName>Deposits - Schedule of Composition of Network Deposits (Details)</ShortName>
      <MenuCategory>Details</MenuCategory>
      <Position>82</Position>
    </Report>
    <Report instance="bmrc-20231231.htm">
      <IsDefault>false</IsDefault>
      <HasEmbeddedReports>false</HasEmbeddedReports>
      <HtmlFileName>R83.htm</HtmlFileName>
      <LongName>9954527 - Disclosure - Borrowings and Other Obligations - Lines of Credit and Borrowing Agreements (Details)</LongName>
      <ReportType>Sheet</ReportType>
      <Role>http://www.bankofmarin.com/role/BorrowingsandOtherObligationsLinesofCreditandBorrowingAgreementsDetails</Role>
      <ShortName>Borrowings and Other Obligations - Lines of Credit and Borrowing Agreements (Details)</ShortName>
      <MenuCategory>Details</MenuCategory>
      <Position>83</Position>
    </Report>
    <Report instance="bmrc-20231231.htm">
      <IsDefault>false</IsDefault>
      <HasEmbeddedReports>false</HasEmbeddedReports>
      <HtmlFileName>R84.htm</HtmlFileName>
      <LongName>9954528 - Disclosure - Borrowings and Other Obligations - Subordinated Debenture and Other Obligations (Details)</LongName>
      <ReportType>Sheet</ReportType>
      <Role>http://www.bankofmarin.com/role/BorrowingsandOtherObligationsSubordinatedDebentureandOtherObligationsDetails</Role>
      <ShortName>Borrowings and Other Obligations - Subordinated Debenture and Other Obligations (Details)</ShortName>
      <MenuCategory>Details</MenuCategory>
      <Position>84</Position>
    </Report>
    <Report instance="bmrc-20231231.htm">
      <IsDefault>false</IsDefault>
      <HasEmbeddedReports>false</HasEmbeddedReports>
      <HtmlFileName>R85.htm</HtmlFileName>
      <LongName>9954529 - Disclosure - Borrowings and Other Obligations - Schedule of Borrowings (Details)</LongName>
      <ReportType>Sheet</ReportType>
      <Role>http://www.bankofmarin.com/role/BorrowingsandOtherObligationsScheduleofBorrowingsDetails</Role>
      <ShortName>Borrowings and Other Obligations - Schedule of Borrowings (Details)</ShortName>
      <MenuCategory>Details</MenuCategory>
      <Position>85</Position>
    </Report>
    <Report instance="bmrc-20231231.htm">
      <IsDefault>false</IsDefault>
      <HasEmbeddedReports>false</HasEmbeddedReports>
      <HtmlFileName>R86.htm</HtmlFileName>
      <LongName>9954530 - Disclosure - Stockholders' Equity and Stock Plans - Narrative (Details)</LongName>
      <ReportType>Sheet</ReportType>
      <Role>http://www.bankofmarin.com/role/StockholdersEquityandStockPlansNarrativeDetails</Role>
      <ShortName>Stockholders' Equity and Stock Plans - Narrative (Details)</ShortName>
      <MenuCategory>Details</MenuCategory>
      <Position>86</Position>
    </Report>
    <Report instance="bmrc-20231231.htm">
      <IsDefault>false</IsDefault>
      <HasEmbeddedReports>false</HasEmbeddedReports>
      <HtmlFileName>R87.htm</HtmlFileName>
      <LongName>9954531 - Disclosure - Stockholders' Equity and Stock Plans - Schedule of Cashless Exercise Information (Details)</LongName>
      <ReportType>Sheet</ReportType>
      <Role>http://www.bankofmarin.com/role/StockholdersEquityandStockPlansScheduleofCashlessExerciseInformationDetails</Role>
      <ShortName>Stockholders' Equity and Stock Plans - Schedule of Cashless Exercise Information (Details)</ShortName>
      <MenuCategory>Details</MenuCategory>
      <Position>87</Position>
    </Report>
    <Report instance="bmrc-20231231.htm">
      <IsDefault>false</IsDefault>
      <HasEmbeddedReports>false</HasEmbeddedReports>
      <HtmlFileName>R88.htm</HtmlFileName>
      <LongName>9954532 - Disclosure - Stockholders' Equity and Stock Plans - Schedule of Options Outstanding Rollforward (Details)</LongName>
      <ReportType>Sheet</ReportType>
      <Role>http://www.bankofmarin.com/role/StockholdersEquityandStockPlansScheduleofOptionsOutstandingRollforwardDetails</Role>
      <ShortName>Stockholders' Equity and Stock Plans - Schedule of Options Outstanding Rollforward (Details)</ShortName>
      <MenuCategory>Details</MenuCategory>
      <Position>88</Position>
    </Report>
    <Report instance="bmrc-20231231.htm">
      <IsDefault>false</IsDefault>
      <HasEmbeddedReports>false</HasEmbeddedReports>
      <HtmlFileName>R89.htm</HtmlFileName>
      <LongName>9954533 - Disclosure - Stockholders' Equity and Stock Plans - Schedule of Options Outstanding by Price Range (Details)</LongName>
      <ReportType>Sheet</ReportType>
      <Role>http://www.bankofmarin.com/role/StockholdersEquityandStockPlansScheduleofOptionsOutstandingbyPriceRangeDetails</Role>
      <ShortName>Stockholders' Equity and Stock Plans - Schedule of Options Outstanding by Price Range (Details)</ShortName>
      <MenuCategory>Details</MenuCategory>
      <Position>89</Position>
    </Report>
    <Report instance="bmrc-20231231.htm">
      <IsDefault>false</IsDefault>
      <HasEmbeddedReports>false</HasEmbeddedReports>
      <HtmlFileName>R90.htm</HtmlFileName>
      <LongName>9954534 - Disclosure - Stockholders' Equity and Stock Plans - Schedule of Non-vested Awards Activity (Details)</LongName>
      <ReportType>Sheet</ReportType>
      <Role>http://www.bankofmarin.com/role/StockholdersEquityandStockPlansScheduleofNonvestedAwardsActivityDetails</Role>
      <ShortName>Stockholders' Equity and Stock Plans - Schedule of Non-vested Awards Activity (Details)</ShortName>
      <MenuCategory>Details</MenuCategory>
      <Position>90</Position>
    </Report>
    <Report instance="bmrc-20231231.htm">
      <IsDefault>false</IsDefault>
      <HasEmbeddedReports>false</HasEmbeddedReports>
      <HtmlFileName>R91.htm</HtmlFileName>
      <LongName>9954535 - Disclosure - Stockholders' Equity and Stock Plans - Schedule of Valuation Assumptions (Details)</LongName>
      <ReportType>Sheet</ReportType>
      <Role>http://www.bankofmarin.com/role/StockholdersEquityandStockPlansScheduleofValuationAssumptionsDetails</Role>
      <ShortName>Stockholders' Equity and Stock Plans - Schedule of Valuation Assumptions (Details)</ShortName>
      <MenuCategory>Details</MenuCategory>
      <Position>91</Position>
    </Report>
    <Report instance="bmrc-20231231.htm">
      <IsDefault>false</IsDefault>
      <HasEmbeddedReports>false</HasEmbeddedReports>
      <HtmlFileName>R92.htm</HtmlFileName>
      <LongName>9954536 - Disclosure - Stockholders' Equity and Stock Plans - Schedule of Dividends (Details)</LongName>
      <ReportType>Sheet</ReportType>
      <Role>http://www.bankofmarin.com/role/StockholdersEquityandStockPlansScheduleofDividendsDetails</Role>
      <ShortName>Stockholders' Equity and Stock Plans - Schedule of Dividends (Details)</ShortName>
      <MenuCategory>Details</MenuCategory>
      <Position>92</Position>
    </Report>
    <Report instance="bmrc-20231231.htm">
      <IsDefault>false</IsDefault>
      <HasEmbeddedReports>false</HasEmbeddedReports>
      <HtmlFileName>R93.htm</HtmlFileName>
      <LongName>9954537 - Disclosure - Stockholders' Equity and Stock Plans - Schedule of Share Repurchases (Details)</LongName>
      <ReportType>Sheet</ReportType>
      <Role>http://www.bankofmarin.com/role/StockholdersEquityandStockPlansScheduleofShareRepurchasesDetails</Role>
      <ShortName>Stockholders' Equity and Stock Plans - Schedule of Share Repurchases (Details)</ShortName>
      <MenuCategory>Details</MenuCategory>
      <Position>93</Position>
    </Report>
    <Report instance="bmrc-20231231.htm">
      <IsDefault>false</IsDefault>
      <HasEmbeddedReports>false</HasEmbeddedReports>
      <HtmlFileName>R94.htm</HtmlFileName>
      <LongName>9954538 - Disclosure - Fair Value of Assets and Liabilities - Schedule of Recorded on a Recurring Basis (Details)</LongName>
      <ReportType>Sheet</ReportType>
      <Role>http://www.bankofmarin.com/role/FairValueofAssetsandLiabilitiesScheduleofRecordedonaRecurringBasisDetails</Role>
      <ShortName>Fair Value of Assets and Liabilities - Schedule of Recorded on a Recurring Basis (Details)</ShortName>
      <MenuCategory>Details</MenuCategory>
      <Position>94</Position>
    </Report>
    <Report instance="bmrc-20231231.htm">
      <IsDefault>false</IsDefault>
      <HasEmbeddedReports>false</HasEmbeddedReports>
      <HtmlFileName>R95.htm</HtmlFileName>
      <LongName>9954539 - Disclosure - Fair Value of Assets and Liabilities - Narrative (Details)</LongName>
      <ReportType>Sheet</ReportType>
      <Role>http://www.bankofmarin.com/role/FairValueofAssetsandLiabilitiesNarrativeDetails</Role>
      <ShortName>Fair Value of Assets and Liabilities - Narrative (Details)</ShortName>
      <MenuCategory>Details</MenuCategory>
      <Position>95</Position>
    </Report>
    <Report instance="bmrc-20231231.htm">
      <IsDefault>false</IsDefault>
      <HasEmbeddedReports>false</HasEmbeddedReports>
      <HtmlFileName>R96.htm</HtmlFileName>
      <LongName>9954540 - Disclosure - Fair Value of Assets and Liabilities - Schedule of Fair Value Assets Measured on Non-recurring Basis (Details)</LongName>
      <ReportType>Sheet</ReportType>
      <Role>http://www.bankofmarin.com/role/FairValueofAssetsandLiabilitiesScheduleofFairValueAssetsMeasuredonNonrecurringBasisDetails</Role>
      <ShortName>Fair Value of Assets and Liabilities - Schedule of Fair Value Assets Measured on Non-recurring Basis (Details)</ShortName>
      <MenuCategory>Details</MenuCategory>
      <Position>96</Position>
    </Report>
    <Report instance="bmrc-20231231.htm">
      <IsDefault>false</IsDefault>
      <HasEmbeddedReports>false</HasEmbeddedReports>
      <HtmlFileName>R97.htm</HtmlFileName>
      <LongName>9954541 - Disclosure - Fair Value of Assets and Liabilities - Schedule of Fair Value of Financial Instruments (Details)</LongName>
      <ReportType>Sheet</ReportType>
      <Role>http://www.bankofmarin.com/role/FairValueofAssetsandLiabilitiesScheduleofFairValueofFinancialInstrumentsDetails</Role>
      <ShortName>Fair Value of Assets and Liabilities - Schedule of Fair Value of Financial Instruments (Details)</ShortName>
      <MenuCategory>Details</MenuCategory>
      <Position>97</Position>
    </Report>
    <Report instance="bmrc-20231231.htm">
      <IsDefault>false</IsDefault>
      <HasEmbeddedReports>false</HasEmbeddedReports>
      <HtmlFileName>R98.htm</HtmlFileName>
      <LongName>9954542 - Disclosure - Benefit Plans - Deferred Compensation Plan (Details)</LongName>
      <ReportType>Sheet</ReportType>
      <Role>http://www.bankofmarin.com/role/BenefitPlansDeferredCompensationPlanDetails</Role>
      <ShortName>Benefit Plans - Deferred Compensation Plan (Details)</ShortName>
      <MenuCategory>Details</MenuCategory>
      <Position>98</Position>
    </Report>
    <Report instance="bmrc-20231231.htm">
      <IsDefault>false</IsDefault>
      <HasEmbeddedReports>false</HasEmbeddedReports>
      <HtmlFileName>R99.htm</HtmlFileName>
      <LongName>9954543 - Disclosure - Benefit Plans - Defined Contribution Plan and Employee Stock Ownership Plan (Details)</LongName>
      <ReportType>Sheet</ReportType>
      <Role>http://www.bankofmarin.com/role/BenefitPlansDefinedContributionPlanandEmployeeStockOwnershipPlanDetails</Role>
      <ShortName>Benefit Plans - Defined Contribution Plan and Employee Stock Ownership Plan (Details)</ShortName>
      <MenuCategory>Details</MenuCategory>
      <Position>99</Position>
    </Report>
    <Report instance="bmrc-20231231.htm">
      <IsDefault>false</IsDefault>
      <HasEmbeddedReports>false</HasEmbeddedReports>
      <HtmlFileName>R100.htm</HtmlFileName>
      <LongName>9954544 - Disclosure - Benefit Plans - Supplemental Executive Retirement Plan (Details)</LongName>
      <ReportType>Sheet</ReportType>
      <Role>http://www.bankofmarin.com/role/BenefitPlansSupplementalExecutiveRetirementPlanDetails</Role>
      <ShortName>Benefit Plans - Supplemental Executive Retirement Plan (Details)</ShortName>
      <MenuCategory>Details</MenuCategory>
      <Position>100</Position>
    </Report>
    <Report instance="bmrc-20231231.htm">
      <IsDefault>false</IsDefault>
      <HasEmbeddedReports>false</HasEmbeddedReports>
      <HtmlFileName>R101.htm</HtmlFileName>
      <LongName>9954545 - Disclosure - Income Taxes - Schedule of Components of Income Tax Provision (Details)</LongName>
      <ReportType>Sheet</ReportType>
      <Role>http://www.bankofmarin.com/role/IncomeTaxesScheduleofComponentsofIncomeTaxProvisionDetails</Role>
      <ShortName>Income Taxes - Schedule of Components of Income Tax Provision (Details)</ShortName>
      <MenuCategory>Details</MenuCategory>
      <Position>101</Position>
    </Report>
    <Report instance="bmrc-20231231.htm">
      <IsDefault>false</IsDefault>
      <HasEmbeddedReports>false</HasEmbeddedReports>
      <HtmlFileName>R102.htm</HtmlFileName>
      <LongName>9954546 - Disclosure - Income Taxes - Schedule of Deferred Tax Asset and Liability (Details)</LongName>
      <ReportType>Sheet</ReportType>
      <Role>http://www.bankofmarin.com/role/IncomeTaxesScheduleofDeferredTaxAssetandLiabilityDetails</Role>
      <ShortName>Income Taxes - Schedule of Deferred Tax Asset and Liability (Details)</ShortName>
      <MenuCategory>Details</MenuCategory>
      <Position>102</Position>
    </Report>
    <Report instance="bmrc-20231231.htm">
      <IsDefault>false</IsDefault>
      <HasEmbeddedReports>false</HasEmbeddedReports>
      <HtmlFileName>R103.htm</HtmlFileName>
      <LongName>9954547 - Disclosure - Income Taxes - Schedule of Effective Income Tax Reconciliation (Details)</LongName>
      <ReportType>Sheet</ReportType>
      <Role>http://www.bankofmarin.com/role/IncomeTaxesScheduleofEffectiveIncomeTaxReconciliationDetails</Role>
      <ShortName>Income Taxes - Schedule of Effective Income Tax Reconciliation (Details)</ShortName>
      <MenuCategory>Details</MenuCategory>
      <Position>103</Position>
    </Report>
    <Report instance="bmrc-20231231.htm">
      <IsDefault>false</IsDefault>
      <HasEmbeddedReports>false</HasEmbeddedReports>
      <HtmlFileName>R104.htm</HtmlFileName>
      <LongName>9954548 - Disclosure - Commitments and Contingencies - Narrative (Details)</LongName>
      <ReportType>Sheet</ReportType>
      <Role>http://www.bankofmarin.com/role/CommitmentsandContingenciesNarrativeDetails</Role>
      <ShortName>Commitments and Contingencies - Narrative (Details)</ShortName>
      <MenuCategory>Details</MenuCategory>
      <Position>104</Position>
    </Report>
    <Report instance="bmrc-20231231.htm">
      <IsDefault>false</IsDefault>
      <HasEmbeddedReports>false</HasEmbeddedReports>
      <HtmlFileName>R105.htm</HtmlFileName>
      <LongName>9954549 - Disclosure - Commitments and Contingencies - Schedule of Operating and Finance Lease Right-of-Use Assets and Lease Liabilities (Details)</LongName>
      <ReportType>Sheet</ReportType>
      <Role>http://www.bankofmarin.com/role/CommitmentsandContingenciesScheduleofOperatingandFinanceLeaseRightofUseAssetsandLeaseLiabilitiesDetails</Role>
      <ShortName>Commitments and Contingencies - Schedule of Operating and Finance Lease Right-of-Use Assets and Lease Liabilities (Details)</ShortName>
      <MenuCategory>Details</MenuCategory>
      <Position>105</Position>
    </Report>
    <Report instance="bmrc-20231231.htm">
      <IsDefault>false</IsDefault>
      <HasEmbeddedReports>false</HasEmbeddedReports>
      <HtmlFileName>R106.htm</HtmlFileName>
      <LongName>9954550 - Disclosure - Commitments and Contingencies - Schedule of Noncash Investing and Financing Activities (Details)</LongName>
      <ReportType>Sheet</ReportType>
      <Role>http://www.bankofmarin.com/role/CommitmentsandContingenciesScheduleofNoncashInvestingandFinancingActivitiesDetails</Role>
      <ShortName>Commitments and Contingencies - Schedule of Noncash Investing and Financing Activities (Details)</ShortName>
      <MenuCategory>Details</MenuCategory>
      <Position>106</Position>
    </Report>
    <Report instance="bmrc-20231231.htm">
      <IsDefault>false</IsDefault>
      <HasEmbeddedReports>false</HasEmbeddedReports>
      <HtmlFileName>R107.htm</HtmlFileName>
      <LongName>9954551 - Disclosure - Commitments and Contingencies - Schedule of Lease Cost (Details)</LongName>
      <ReportType>Sheet</ReportType>
      <Role>http://www.bankofmarin.com/role/CommitmentsandContingenciesScheduleofLeaseCostDetails</Role>
      <ShortName>Commitments and Contingencies - Schedule of Lease Cost (Details)</ShortName>
      <MenuCategory>Details</MenuCategory>
      <Position>107</Position>
    </Report>
    <Report instance="bmrc-20231231.htm">
      <IsDefault>false</IsDefault>
      <HasEmbeddedReports>false</HasEmbeddedReports>
      <HtmlFileName>R108.htm</HtmlFileName>
      <LongName>9954552 - Disclosure - Commitments and Contingencies - Schedule of Lease Liability Maturity Schedule (Details)</LongName>
      <ReportType>Sheet</ReportType>
      <Role>http://www.bankofmarin.com/role/CommitmentsandContingenciesScheduleofLeaseLiabilityMaturityScheduleDetails</Role>
      <ShortName>Commitments and Contingencies - Schedule of Lease Liability Maturity Schedule (Details)</ShortName>
      <MenuCategory>Details</MenuCategory>
      <Position>108</Position>
    </Report>
    <Report instance="bmrc-20231231.htm">
      <IsDefault>false</IsDefault>
      <HasEmbeddedReports>false</HasEmbeddedReports>
      <HtmlFileName>R109.htm</HtmlFileName>
      <LongName>9954553 - Disclosure - Concentrations of Credit Risk (Details)</LongName>
      <ReportType>Sheet</ReportType>
      <Role>http://www.bankofmarin.com/role/ConcentrationsofCreditRiskDetails</Role>
      <ShortName>Concentrations of Credit Risk (Details)</ShortName>
      <MenuCategory>Details</MenuCategory>
      <ParentRole>http://www.bankofmarin.com/role/ConcentrationsofCreditRisk</ParentRole>
      <Position>109</Position>
    </Report>
    <Report instance="bmrc-20231231.htm">
      <IsDefault>false</IsDefault>
      <HasEmbeddedReports>false</HasEmbeddedReports>
      <HtmlFileName>R110.htm</HtmlFileName>
      <LongName>9954554 - Disclosure - Derivative Financial Instruments and Hedging Activities - Narrative (Details)</LongName>
      <ReportType>Sheet</ReportType>
      <Role>http://www.bankofmarin.com/role/DerivativeFinancialInstrumentsandHedgingActivitiesNarrativeDetails</Role>
      <ShortName>Derivative Financial Instruments and Hedging Activities - Narrative (Details)</ShortName>
      <MenuCategory>Details</MenuCategory>
      <ParentRole>http://www.bankofmarin.com/role/DerivativeFinancialInstrumentsandHedgingActivitiesTables</ParentRole>
      <Position>110</Position>
    </Report>
    <Report instance="bmrc-20231231.htm">
      <IsDefault>false</IsDefault>
      <HasEmbeddedReports>false</HasEmbeddedReports>
      <HtmlFileName>R111.htm</HtmlFileName>
      <LongName>9954555 - Disclosure - Derivative Financial Instruments and Hedging Activities - Schedule of Information on Derivatives (Details)</LongName>
      <ReportType>Sheet</ReportType>
      <Role>http://www.bankofmarin.com/role/DerivativeFinancialInstrumentsandHedgingActivitiesScheduleofInformationonDerivativesDetails</Role>
      <ShortName>Derivative Financial Instruments and Hedging Activities - Schedule of Information on Derivatives (Details)</ShortName>
      <MenuCategory>Details</MenuCategory>
      <Position>111</Position>
    </Report>
    <Report instance="bmrc-20231231.htm">
      <IsDefault>false</IsDefault>
      <HasEmbeddedReports>false</HasEmbeddedReports>
      <HtmlFileName>R112.htm</HtmlFileName>
      <LongName>9954556 - Disclosure - Derivative Financial Instruments and Hedging Activities - Schedule of Interest Income (Details)</LongName>
      <ReportType>Sheet</ReportType>
      <Role>http://www.bankofmarin.com/role/DerivativeFinancialInstrumentsandHedgingActivitiesScheduleofInterestIncomeDetails</Role>
      <ShortName>Derivative Financial Instruments and Hedging Activities - Schedule of Interest Income (Details)</ShortName>
      <MenuCategory>Details</MenuCategory>
      <Position>112</Position>
    </Report>
    <Report instance="bmrc-20231231.htm">
      <IsDefault>false</IsDefault>
      <HasEmbeddedReports>false</HasEmbeddedReports>
      <HtmlFileName>R113.htm</HtmlFileName>
      <LongName>9954557 - Disclosure - Derivative Financial Instruments and Hedging Activities - Schedule of Offsetting of Assets (Details)</LongName>
      <ReportType>Sheet</ReportType>
      <Role>http://www.bankofmarin.com/role/DerivativeFinancialInstrumentsandHedgingActivitiesScheduleofOffsettingofAssetsDetails</Role>
      <ShortName>Derivative Financial Instruments and Hedging Activities - Schedule of Offsetting of Assets (Details)</ShortName>
      <MenuCategory>Details</MenuCategory>
      <Position>113</Position>
    </Report>
    <Report instance="bmrc-20231231.htm">
      <IsDefault>false</IsDefault>
      <HasEmbeddedReports>false</HasEmbeddedReports>
      <HtmlFileName>R114.htm</HtmlFileName>
      <LongName>9954558 - Disclosure - Derivative Financial Instruments and Hedging Activities - Schedule of Offsetting of Liabilities (Details)</LongName>
      <ReportType>Sheet</ReportType>
      <Role>http://www.bankofmarin.com/role/DerivativeFinancialInstrumentsandHedgingActivitiesScheduleofOffsettingofLiabilitiesDetails</Role>
      <ShortName>Derivative Financial Instruments and Hedging Activities - Schedule of Offsetting of Liabilities (Details)</ShortName>
      <MenuCategory>Details</MenuCategory>
      <Position>114</Position>
    </Report>
    <Report instance="bmrc-20231231.htm">
      <IsDefault>false</IsDefault>
      <HasEmbeddedReports>false</HasEmbeddedReports>
      <HtmlFileName>R115.htm</HtmlFileName>
      <LongName>9954559 - Disclosure - Regulatory Matters - Schedule of Capital Adequacy Ratios (Details)</LongName>
      <ReportType>Sheet</ReportType>
      <Role>http://www.bankofmarin.com/role/RegulatoryMattersScheduleofCapitalAdequacyRatiosDetails</Role>
      <ShortName>Regulatory Matters - Schedule of Capital Adequacy Ratios (Details)</ShortName>
      <MenuCategory>Details</MenuCategory>
      <Position>115</Position>
    </Report>
    <Report instance="bmrc-20231231.htm">
      <IsDefault>false</IsDefault>
      <HasEmbeddedReports>false</HasEmbeddedReports>
      <HtmlFileName>R116.htm</HtmlFileName>
      <LongName>9954560 - Disclosure - Financial Instruments with Off-Balance Sheet Risk (Details)</LongName>
      <ReportType>Sheet</ReportType>
      <Role>http://www.bankofmarin.com/role/FinancialInstrumentswithOffBalanceSheetRiskDetails</Role>
      <ShortName>Financial Instruments with Off-Balance Sheet Risk (Details)</ShortName>
      <MenuCategory>Details</MenuCategory>
      <ParentRole>http://www.bankofmarin.com/role/FinancialInstrumentswithOffBalanceSheetRiskTables</ParentRole>
      <Position>116</Position>
    </Report>
    <Report instance="bmrc-20231231.htm">
      <IsDefault>false</IsDefault>
      <HasEmbeddedReports>false</HasEmbeddedReports>
      <HtmlFileName>R117.htm</HtmlFileName>
      <LongName>9954561 - Disclosure - Condensed Bank of Marin Bancorp Parent Only Financial Statements - Condensed Uncosolidated Statements of Condition (Details)</LongName>
      <ReportType>Sheet</ReportType>
      <Role>http://www.bankofmarin.com/role/CondensedBankofMarinBancorpParentOnlyFinancialStatementsCondensedUncosolidatedStatementsofConditionDetails</Role>
      <ShortName>Condensed Bank of Marin Bancorp Parent Only Financial Statements - Condensed Uncosolidated Statements of Condition (Details)</ShortName>
      <MenuCategory>Details</MenuCategory>
      <Position>117</Position>
    </Report>
    <Report instance="bmrc-20231231.htm">
      <IsDefault>false</IsDefault>
      <HasEmbeddedReports>false</HasEmbeddedReports>
      <HtmlFileName>R118.htm</HtmlFileName>
      <LongName>9954562 - Disclosure - Condensed Bank of Marin Bancorp Parent Only Financial Statements - Condensed Unconsolidated Statements of Income (Details)</LongName>
      <ReportType>Sheet</ReportType>
      <Role>http://www.bankofmarin.com/role/CondensedBankofMarinBancorpParentOnlyFinancialStatementsCondensedUnconsolidatedStatementsofIncomeDetails</Role>
      <ShortName>Condensed Bank of Marin Bancorp Parent Only Financial Statements - Condensed Unconsolidated Statements of Income (Details)</ShortName>
      <MenuCategory>Details</MenuCategory>
      <Position>118</Position>
    </Report>
    <Report instance="bmrc-20231231.htm">
      <IsDefault>false</IsDefault>
      <HasEmbeddedReports>false</HasEmbeddedReports>
      <HtmlFileName>R119.htm</HtmlFileName>
      <LongName>9954563 - Disclosure - Condensed Bank of Marin Bancorp Parent Only Financial Statements - Condensed Unconsolidated Statements of Cash Flows (Details)</LongName>
      <ReportType>Sheet</ReportType>
      <Role>http://www.bankofmarin.com/role/CondensedBankofMarinBancorpParentOnlyFinancialStatementsCondensedUnconsolidatedStatementsofCashFlowsDetails</Role>
      <ShortName>Condensed Bank of Marin Bancorp Parent Only Financial Statements - Condensed Unconsolidated Statements of Cash Flows (Details)</ShortName>
      <MenuCategory>Details</MenuCategory>
      <Position>119</Position>
    </Report>
    <Report instance="bmrc-20231231.htm">
      <IsDefault>false</IsDefault>
      <HasEmbeddedReports>false</HasEmbeddedReports>
      <HtmlFileName>R120.htm</HtmlFileName>
      <LongName>9954564 - Disclosure - Merger - Narrative (Details)</LongName>
      <ReportType>Sheet</ReportType>
      <Role>http://www.bankofmarin.com/role/MergerNarrativeDetails</Role>
      <ShortName>Merger - Narrative (Details)</ShortName>
      <MenuCategory>Details</MenuCategory>
      <Position>120</Position>
    </Report>
    <Report instance="bmrc-20231231.htm">
      <IsDefault>false</IsDefault>
      <HasEmbeddedReports>false</HasEmbeddedReports>
      <HtmlFileName>R121.htm</HtmlFileName>
      <LongName>9954565 - Disclosure - Merger - Schedule of Consideration Paid for AMRB (Details)</LongName>
      <ReportType>Sheet</ReportType>
      <Role>http://www.bankofmarin.com/role/MergerScheduleofConsiderationPaidforAMRBDetails</Role>
      <ShortName>Merger - Schedule of Consideration Paid for AMRB (Details)</ShortName>
      <MenuCategory>Details</MenuCategory>
      <Position>121</Position>
    </Report>
    <Report instance="bmrc-20231231.htm">
      <IsDefault>false</IsDefault>
      <HasEmbeddedReports>false</HasEmbeddedReports>
      <HtmlFileName>R122.htm</HtmlFileName>
      <LongName>9954566 - Disclosure - Merger - Schedule of Merger-Related One-Time and Conversion Costs (Details)</LongName>
      <ReportType>Sheet</ReportType>
      <Role>http://www.bankofmarin.com/role/MergerScheduleofMergerRelatedOneTimeandConversionCostsDetails</Role>
      <ShortName>Merger - Schedule of Merger-Related One-Time and Conversion Costs (Details)</ShortName>
      <MenuCategory>Details</MenuCategory>
      <Position>122</Position>
    </Report>
    <Report>
      <IsDefault>false</IsDefault>
      <HasEmbeddedReports>false</HasEmbeddedReports>
      <LongName>All Reports</LongName>
      <ReportType>Book</ReportType>
      <ShortName>All Reports</ShortName>
    </Report>
  </MyReports>
  <InputFiles>
    <File doctype="10-K" isDefinitelyFs="true" isUsgaap="true" original="bmrc-20231231.htm">bmrc-20231231.htm</File>
    <File>bmrc-20231231.xsd</File>
    <File>bmrc-20231231_cal.xml</File>
    <File>bmrc-20231231_def.xml</File>
    <File>bmrc-20231231_lab.xml</File>
    <File>bmrc-20231231_pre.xml</File>
  </InputFiles>
  <SupplementalFiles>
    <File>bmrc-20231231_g1.jpg</File>
  </SupplementalFiles>
  <BaseTaxonomies>
    <BaseTaxonomy items="3">http://fasb.org/srt/2023</BaseTaxonomy>
    <BaseTaxonomy items="2845">http://fasb.org/us-gaap/2023</BaseTaxonomy>
    <BaseTaxonomy items="39">http://xbrl.sec.gov/dei/2023</BaseTaxonomy>
  </BaseTaxonomies>
  <HasPresentationLinkbase>true</HasPresentationLinkbase>
  <HasCalculationLinkbase>true</HasCalculationLinkbase>
</FilingSummary>
