<?xml version="1.0" encoding="utf-8"?>
<xbrl
  xmlns="http://www.xbrl.org/2003/instance"
  xmlns:dei="http://xbrl.sec.gov/dei/2026"
  xmlns:link="http://www.xbrl.org/2003/linkbase"
  xmlns:xlink="http://www.w3.org/1999/xlink">
    <link:schemaRef xlink:href="nksh-20260701.xsd" xlink:type="simple"/>
    <context id="C_48d18355-59c4-4f3c-b88c-6bce07ca35d4">
        <entity>
            <identifier scheme="http://www.sec.gov/CIK">0000796534</identifier>
        </entity>
        <period>
            <startDate>2026-07-01</startDate>
            <endDate>2026-07-01</endDate>
        </period>
    </context>
    <dei:AmendmentFlag
      contextRef="C_48d18355-59c4-4f3c-b88c-6bce07ca35d4"
      id="F_ed31af8a-5ddd-47ef-90eb-4052c86d4c35">false</dei:AmendmentFlag>
    <dei:EntityCentralIndexKey
      contextRef="C_48d18355-59c4-4f3c-b88c-6bce07ca35d4"
      id="F_66ea90ba-445b-4a14-937f-935c8e48f625">0000796534</dei:EntityCentralIndexKey>
    <dei:DocumentType
      contextRef="C_48d18355-59c4-4f3c-b88c-6bce07ca35d4"
      id="F_4fa9ab3c-4b85-4997-83d5-fabb95ef5166">8-K</dei:DocumentType>
    <dei:DocumentPeriodEndDate
      contextRef="C_48d18355-59c4-4f3c-b88c-6bce07ca35d4"
      id="F_2ad35d9c-56fa-43bf-9687-2f72637c4557">2026-07-01</dei:DocumentPeriodEndDate>
    <dei:EntityRegistrantName
      contextRef="C_48d18355-59c4-4f3c-b88c-6bce07ca35d4"
      id="F_b5eec949-930e-4e12-b6e8-7272424dcfdd">National Bankshares, Inc.</dei:EntityRegistrantName>
    <dei:EntityIncorporationStateCountryCode
      contextRef="C_48d18355-59c4-4f3c-b88c-6bce07ca35d4"
      id="F_f7c59451-e8b9-464f-ae1a-4798855684ae">VA</dei:EntityIncorporationStateCountryCode>
    <dei:EntityFileNumber
      contextRef="C_48d18355-59c4-4f3c-b88c-6bce07ca35d4"
      id="F_4afb6b5d-1039-439f-b18c-76df0ac86994">0-15204</dei:EntityFileNumber>
    <dei:EntityTaxIdentificationNumber
      contextRef="C_48d18355-59c4-4f3c-b88c-6bce07ca35d4"
      id="F_47284135-f4d8-434a-b702-73a3bb7589b9">54-1375874</dei:EntityTaxIdentificationNumber>
    <dei:EntityAddressAddressLine1
      contextRef="C_48d18355-59c4-4f3c-b88c-6bce07ca35d4"
      id="F_3bb9b2c4-9c43-4772-97fa-4509166cf0d1">101 Hubbard Street</dei:EntityAddressAddressLine1>
    <dei:EntityAddressCityOrTown
      contextRef="C_48d18355-59c4-4f3c-b88c-6bce07ca35d4"
      id="F_856bed30-e28d-42aa-9b92-32d0e460e086">Blacksburg</dei:EntityAddressCityOrTown>
    <dei:EntityAddressStateOrProvince
      contextRef="C_48d18355-59c4-4f3c-b88c-6bce07ca35d4"
      id="F_8b18d487-382b-4dbd-a75e-895a267c8c07">VA</dei:EntityAddressStateOrProvince>
    <dei:EntityAddressPostalZipCode
      contextRef="C_48d18355-59c4-4f3c-b88c-6bce07ca35d4"
      id="F_e116cb4b-6b29-4a16-b6be-2c05c5485b7c">24060</dei:EntityAddressPostalZipCode>
    <dei:CityAreaCode
      contextRef="C_48d18355-59c4-4f3c-b88c-6bce07ca35d4"
      id="F_6e053006-c3b9-4961-8358-194fd52b6288">540</dei:CityAreaCode>
    <dei:LocalPhoneNumber
      contextRef="C_48d18355-59c4-4f3c-b88c-6bce07ca35d4"
      id="F_283ca4f9-27c3-4fdc-848d-3f53a7acf415">951-6300</dei:LocalPhoneNumber>
    <dei:WrittenCommunications
      contextRef="C_48d18355-59c4-4f3c-b88c-6bce07ca35d4"
      id="F_90fb5ad8-deea-468e-8233-794c5552bee2">false</dei:WrittenCommunications>
    <dei:SolicitingMaterial
      contextRef="C_48d18355-59c4-4f3c-b88c-6bce07ca35d4"
      id="F_80996941-8ce2-4348-9cf8-6e175e12a78d">false</dei:SolicitingMaterial>
    <dei:PreCommencementTenderOffer
      contextRef="C_48d18355-59c4-4f3c-b88c-6bce07ca35d4"
      id="F_211390d5-41e8-499b-ad6d-85539e86f74b">false</dei:PreCommencementTenderOffer>
    <dei:PreCommencementIssuerTenderOffer
      contextRef="C_48d18355-59c4-4f3c-b88c-6bce07ca35d4"
      id="F_f48754c7-c104-43be-a2a6-2993349e6a04">false</dei:PreCommencementIssuerTenderOffer>
    <dei:Security12bTitle
      contextRef="C_48d18355-59c4-4f3c-b88c-6bce07ca35d4"
      id="F_c77a496c-30db-4404-ba64-712f5d5cb9c1">Common Stock, par value $1.25 per share</dei:Security12bTitle>
    <dei:TradingSymbol
      contextRef="C_48d18355-59c4-4f3c-b88c-6bce07ca35d4"
      id="F_8929b03e-43d5-479f-a9ad-11568dbebf36">NKSH</dei:TradingSymbol>
    <dei:SecurityExchangeName
      contextRef="C_48d18355-59c4-4f3c-b88c-6bce07ca35d4"
      id="F_8ec948da-3131-433e-a986-27f70c0f9cc7">NASDAQ</dei:SecurityExchangeName>
    <dei:EntityEmergingGrowthCompany
      contextRef="C_48d18355-59c4-4f3c-b88c-6bce07ca35d4"
      id="F_80ce669c-1ba2-4099-8d29-ac0a208b0d00">false</dei:EntityEmergingGrowthCompany>
</xbrl>
