<?xml version="1.0" encoding="utf-8"?>
<xbrl
  xmlns="http://www.xbrl.org/2003/instance"
  xmlns:dei="http://xbrl.sec.gov/dei/2025"
  xmlns:link="http://www.xbrl.org/2003/linkbase"
  xmlns:xlink="http://www.w3.org/1999/xlink">
    <link:schemaRef xlink:href="jmsb-20260818.xsd" xlink:type="simple"/>
    <context id="Duration_8_18_2026_To_8_18_2026_FQciKR3C2UKTPD7Qx4TTZA">
        <entity>
            <identifier scheme="http://www.sec.gov/CIK">0001710482</identifier>
        </entity>
        <period>
            <startDate>2026-08-18</startDate>
            <endDate>2026-08-18</endDate>
        </period>
    </context>
    <dei:EntityCentralIndexKey
      contextRef="Duration_8_18_2026_To_8_18_2026_FQciKR3C2UKTPD7Qx4TTZA"
      id="Tc_UHVzuWiYj0KcPuzB9W1Oow_2_1">0001710482</dei:EntityCentralIndexKey>
    <dei:AmendmentFlag
      contextRef="Duration_8_18_2026_To_8_18_2026_FQciKR3C2UKTPD7Qx4TTZA"
      id="Tc_3aPFRug71kmTic-cO2c9pw_3_1">false</dei:AmendmentFlag>
    <dei:DocumentType
      contextRef="Duration_8_18_2026_To_8_18_2026_FQciKR3C2UKTPD7Qx4TTZA"
      id="Narr_c1X0zikpvkegAbksuFLyPA">8-K</dei:DocumentType>
    <dei:DocumentPeriodEndDate
      contextRef="Duration_8_18_2026_To_8_18_2026_FQciKR3C2UKTPD7Qx4TTZA"
      id="Narr_2ndQ0ObPtEy6bPVagHdcWA">2026-08-18</dei:DocumentPeriodEndDate>
    <dei:EntityRegistrantName
      contextRef="Duration_8_18_2026_To_8_18_2026_FQciKR3C2UKTPD7Qx4TTZA"
      id="Narr_ZidQOWlsMUmz2iZKki6JZQ">John Marshall Bancorp,&#160;Inc.</dei:EntityRegistrantName>
    <dei:EntityIncorporationStateCountryCode
      contextRef="Duration_8_18_2026_To_8_18_2026_FQciKR3C2UKTPD7Qx4TTZA"
      id="Tc_6RZNFTztJE-SpK4LVHQSSQ_1_0">VA</dei:EntityIncorporationStateCountryCode>
    <dei:EntityFileNumber
      contextRef="Duration_8_18_2026_To_8_18_2026_FQciKR3C2UKTPD7Qx4TTZA"
      id="Tc_XAKi98wLMUmZ93zDIg5P5g_1_2">001-41315</dei:EntityFileNumber>
    <dei:EntityTaxIdentificationNumber
      contextRef="Duration_8_18_2026_To_8_18_2026_FQciKR3C2UKTPD7Qx4TTZA"
      id="Tc_e-Gl1ViocEe3hArtPx6AuQ_1_4">81-5424879</dei:EntityTaxIdentificationNumber>
    <dei:EntityAddressAddressLine1
      contextRef="Duration_8_18_2026_To_8_18_2026_FQciKR3C2UKTPD7Qx4TTZA"
      id="Narr_KfeKTKhBHUyNFVVs2jMamA">1943 Isaac Newton Square</dei:EntityAddressAddressLine1>
    <dei:EntityAddressAddressLine2
      contextRef="Duration_8_18_2026_To_8_18_2026_FQciKR3C2UKTPD7Qx4TTZA"
      id="Narr_gT5fYNR-GkKaPPfW3GILqA">Suite&#160;100</dei:EntityAddressAddressLine2>
    <dei:EntityAddressCityOrTown
      contextRef="Duration_8_18_2026_To_8_18_2026_FQciKR3C2UKTPD7Qx4TTZA"
      id="Narr_UpRDbvt3Cku_ghQw9PHkLQ">Reston</dei:EntityAddressCityOrTown>
    <dei:EntityAddressStateOrProvince
      contextRef="Duration_8_18_2026_To_8_18_2026_FQciKR3C2UKTPD7Qx4TTZA"
      id="Narr_KuhSzng7Qk6pbGtFn3icEQ">VA</dei:EntityAddressStateOrProvince>
    <dei:EntityAddressPostalZipCode
      contextRef="Duration_8_18_2026_To_8_18_2026_FQciKR3C2UKTPD7Qx4TTZA"
      id="Narr_vzT2benqIE2hgXMeoSrVsw">20190</dei:EntityAddressPostalZipCode>
    <dei:CityAreaCode
      contextRef="Duration_8_18_2026_To_8_18_2026_FQciKR3C2UKTPD7Qx4TTZA"
      id="Narr__gGhuZTjJEOpWc3HGtCFzQ">703</dei:CityAreaCode>
    <dei:LocalPhoneNumber
      contextRef="Duration_8_18_2026_To_8_18_2026_FQciKR3C2UKTPD7Qx4TTZA"
      id="Narr_DcJ0j2xjGkS10924p48_oA">584-0840</dei:LocalPhoneNumber>
    <dei:WrittenCommunications
      contextRef="Duration_8_18_2026_To_8_18_2026_FQciKR3C2UKTPD7Qx4TTZA"
      id="Tc_gXknSl1PEkaahlDACqWw4Q_1_1">false</dei:WrittenCommunications>
    <dei:SolicitingMaterial
      contextRef="Duration_8_18_2026_To_8_18_2026_FQciKR3C2UKTPD7Qx4TTZA"
      id="Tc_mURZVZTKS0SxFBB8G3n3lA_2_1">false</dei:SolicitingMaterial>
    <dei:PreCommencementTenderOffer
      contextRef="Duration_8_18_2026_To_8_18_2026_FQciKR3C2UKTPD7Qx4TTZA"
      id="Tc_dBDifGYiR0iL30uOUG_tXw_3_1">false</dei:PreCommencementTenderOffer>
    <dei:PreCommencementIssuerTenderOffer
      contextRef="Duration_8_18_2026_To_8_18_2026_FQciKR3C2UKTPD7Qx4TTZA"
      id="Tc_4fTH-c3sq02o6Kmtpq09-g_4_1">false</dei:PreCommencementIssuerTenderOffer>
    <dei:Security12bTitle
      contextRef="Duration_8_18_2026_To_8_18_2026_FQciKR3C2UKTPD7Qx4TTZA"
      id="Tc_lVc_LUp4i0-r8fZJyZc9LA_1_0">Common Stock, par value $0.01 per share</dei:Security12bTitle>
    <dei:TradingSymbol
      contextRef="Duration_8_18_2026_To_8_18_2026_FQciKR3C2UKTPD7Qx4TTZA"
      id="Tc_lkmsaZu0FkaEebc1tENlDQ_1_2">JMSB</dei:TradingSymbol>
    <dei:SecurityExchangeName
      contextRef="Duration_8_18_2026_To_8_18_2026_FQciKR3C2UKTPD7Qx4TTZA"
      id="Tc_Xr1RPTMzdUKryAQFERwfZA_1_4">NASDAQ</dei:SecurityExchangeName>
    <dei:EntityEmergingGrowthCompany
      contextRef="Duration_8_18_2026_To_8_18_2026_FQciKR3C2UKTPD7Qx4TTZA"
      id="Narr_FCNj-w3Tw0SYDp0ZqcH4UA">true</dei:EntityEmergingGrowthCompany>
    <dei:EntityExTransitionPeriod
      contextRef="Duration_8_18_2026_To_8_18_2026_FQciKR3C2UKTPD7Qx4TTZA"
      id="Narr_gHbEwsyHJEqbeh4qYAO9pg">true</dei:EntityExTransitionPeriod>
</xbrl>
