<?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="botj-20260728.xsd" xlink:type="simple"/>
    <context id="Duration_7_28_2026_To_7_28_2026">
        <entity>
            <identifier scheme="http://www.sec.gov/CIK">0001275101</identifier>
        </entity>
        <period>
            <startDate>2026-07-28</startDate>
            <endDate>2026-07-28</endDate>
        </period>
    </context>
    <dei:AmendmentFlag
      contextRef="Duration_7_28_2026_To_7_28_2026"
      id="ct-nonNumeric-339632e6-c905-476d-a7ca-edebb3dfbd5b">false</dei:AmendmentFlag>
    <dei:EntityCentralIndexKey
      contextRef="Duration_7_28_2026_To_7_28_2026"
      id="ct-nonNumeric-f2b350ff-5080-4f3e-a3f4-fbe3d55e9072">0001275101</dei:EntityCentralIndexKey>
    <dei:DocumentType
      contextRef="Duration_7_28_2026_To_7_28_2026"
      id="ct-nonNumeric-4c44e094-8c59-4423-bd7c-1f62ccbd8465">8-K</dei:DocumentType>
    <dei:DocumentPeriodEndDate
      contextRef="Duration_7_28_2026_To_7_28_2026"
      id="ct-nonNumeric-9c397457-e32c-45ca-beb2-c38ec707ba30">2026-07-28</dei:DocumentPeriodEndDate>
    <dei:EntityRegistrantName
      contextRef="Duration_7_28_2026_To_7_28_2026"
      id="ct-nonNumeric-8e9fac93-18c1-45f6-a9c3-58aca765828d">BANK OF THE JAMES FINANCIAL GROUP, INC.</dei:EntityRegistrantName>
    <dei:EntityIncorporationStateCountryCode
      contextRef="Duration_7_28_2026_To_7_28_2026"
      id="ct-nonNumeric-282bfcf9-0500-4e6e-a2b7-356bcfc029f9">VA</dei:EntityIncorporationStateCountryCode>
    <dei:EntityFileNumber
      contextRef="Duration_7_28_2026_To_7_28_2026"
      id="ct-nonNumeric-4f22bac8-383b-40ab-a6ab-5cfea2000978">001-35402</dei:EntityFileNumber>
    <dei:EntityTaxIdentificationNumber
      contextRef="Duration_7_28_2026_To_7_28_2026"
      id="ct-nonNumeric-021db0e0-edaa-4b61-a039-162df7d2b026">20-0500300</dei:EntityTaxIdentificationNumber>
    <dei:EntityAddressAddressLine1
      contextRef="Duration_7_28_2026_To_7_28_2026"
      id="ct-nonNumeric-1dcdabe7-a67e-44b4-a15f-aa2d91d2221f">828 Main Street</dei:EntityAddressAddressLine1>
    <dei:EntityAddressCityOrTown
      contextRef="Duration_7_28_2026_To_7_28_2026"
      id="ct-nonNumeric-848b2e01-2979-4e32-b5e7-5befaa634be1">Lynchburg</dei:EntityAddressCityOrTown>
    <dei:EntityAddressStateOrProvince
      contextRef="Duration_7_28_2026_To_7_28_2026"
      id="ct-nonNumeric-d087972c-d367-4660-94d8-32fa1d3a8df2">VA</dei:EntityAddressStateOrProvince>
    <dei:EntityAddressPostalZipCode
      contextRef="Duration_7_28_2026_To_7_28_2026"
      id="ct-nonNumeric-e6ad7224-b5f3-49bb-8003-a7e4299a9b3b">24504</dei:EntityAddressPostalZipCode>
    <dei:CityAreaCode
      contextRef="Duration_7_28_2026_To_7_28_2026"
      id="ct-nonNumeric-fc8317c7-987e-4a12-95bf-93b6c616f8ce">434</dei:CityAreaCode>
    <dei:LocalPhoneNumber
      contextRef="Duration_7_28_2026_To_7_28_2026"
      id="ct-nonNumeric-9cdc6bec-db06-44fa-9a3e-a5201a072c97">846-2000</dei:LocalPhoneNumber>
    <dei:WrittenCommunications
      contextRef="Duration_7_28_2026_To_7_28_2026"
      id="ct-nonNumeric-b760db45-a7e0-4001-b63c-dfe7b7fe3141">false</dei:WrittenCommunications>
    <dei:SolicitingMaterial
      contextRef="Duration_7_28_2026_To_7_28_2026"
      id="ct-nonNumeric-0d7d50e6-5658-4c79-8b9f-904c117d937b">false</dei:SolicitingMaterial>
    <dei:PreCommencementTenderOffer
      contextRef="Duration_7_28_2026_To_7_28_2026"
      id="ct-nonNumeric-b7084751-2ce7-46a4-9a3e-475b8ace03a0">false</dei:PreCommencementTenderOffer>
    <dei:PreCommencementIssuerTenderOffer
      contextRef="Duration_7_28_2026_To_7_28_2026"
      id="ct-nonNumeric-9c3cb217-5aa9-49e6-8d53-9fffd22badd9">false</dei:PreCommencementIssuerTenderOffer>
    <dei:Security12bTitle
      contextRef="Duration_7_28_2026_To_7_28_2026"
      id="ct-nonNumeric-0f6a1752-96ee-4efa-93c1-46071105e535">Common Stock, $2.14 par value</dei:Security12bTitle>
    <dei:TradingSymbol
      contextRef="Duration_7_28_2026_To_7_28_2026"
      id="ct-nonNumeric-6cb6b559-b7b0-4e50-8701-b44c00ac1a44">BOTJ</dei:TradingSymbol>
    <dei:SecurityExchangeName
      contextRef="Duration_7_28_2026_To_7_28_2026"
      id="ct-nonNumeric-7ac44b93-590a-4143-8369-1e36d46df958">NASDAQ</dei:SecurityExchangeName>
    <dei:EntityEmergingGrowthCompany
      contextRef="Duration_7_28_2026_To_7_28_2026"
      id="ct-nonNumeric-c48afca5-bef3-417b-8bac-79ef8a39cdb1">false</dei:EntityEmergingGrowthCompany>
</xbrl>
