<?xml version="1.0" encoding="utf-8"?>
<xbrl
  xmlns="http://www.xbrl.org/2003/instance"
  xmlns:dei="http://xbrl.sec.gov/dei/2025"
  xmlns:ffd="http://xbrl.sec.gov/ffd/2025"
  xmlns:iso4217="http://www.xbrl.org/2003/iso4217"
  xmlns:link="http://www.xbrl.org/2003/linkbase"
  xmlns:xbrldi="http://xbrl.org/2006/xbrldi"
  xmlns:xlink="http://www.w3.org/1999/xlink">
    <link:schemaRef
      xlink:href="https://xbrl.sec.gov/ffd/2025/ffd-2025.xsd"
      xlink:type="simple"/>
    <context id="C_a2e0e5ac-ec8b-4b52-ade1-c14c29e44d04">
        <entity>
            <identifier scheme="http://www.sec.gov/CIK">0000750558</identifier>
            <segment>
                <xbrldi:typedMember dimension="ffd:OfferingAxis">
                    <dei:lineNo>1</dei:lineNo>
                </xbrldi:typedMember>
            </segment>
        </entity>
        <period>
            <startDate>2026-06-12</startDate>
            <endDate>2026-06-12</endDate>
        </period>
    </context>
    <context id="C_73fe5d76-4d15-4b42-81af-874bcc3588da">
        <entity>
            <identifier scheme="http://www.sec.gov/CIK">0000750558</identifier>
        </entity>
        <period>
            <startDate>2026-06-12</startDate>
            <endDate>2026-06-12</endDate>
        </period>
    </context>
    <unit id="U_pure">
        <measure>pure</measure>
    </unit>
    <unit id="U_shares">
        <measure>shares</measure>
    </unit>
    <unit id="U_USD">
        <measure>iso4217:USD</measure>
    </unit>
    <dei:EntityCentralIndexKey
      contextRef="C_73fe5d76-4d15-4b42-81af-874bcc3588da"
      id="F_3a4718a9-a84c-4060-8b39-fcf91f38f2c7">0000750558</dei:EntityCentralIndexKey>
    <ffd:OffsetTableNa
      contextRef="C_73fe5d76-4d15-4b42-81af-874bcc3588da"
      id="F_5eddbfd8-027f-49d6-b2de-718ed90022cd">N/A</ffd:OffsetTableNa>
    <ffd:PrevslyPdFlg
      contextRef="C_a2e0e5ac-ec8b-4b52-ade1-c14c29e44d04"
      id="F_32942d1b-9dc7-4dcd-87a7-72110a131501">false</ffd:PrevslyPdFlg>
    <ffd:FeeExhibitTp
      contextRef="C_73fe5d76-4d15-4b42-81af-874bcc3588da"
      id="F_e342325b-5b2f-486d-81dc-cc08dd0466d2">EX-FILING FEES</ffd:FeeExhibitTp>
    <ffd:FormTp
      contextRef="C_73fe5d76-4d15-4b42-81af-874bcc3588da"
      id="F_d59ba428-3719-4aeb-8d14-2eee756bb774">S-8</ffd:FormTp>
    <ffd:SubmissnTp
      contextRef="C_73fe5d76-4d15-4b42-81af-874bcc3588da"
      id="F_3c9c5c29-da6c-4603-a107-22bc0c4f2865">S-8</ffd:SubmissnTp>
    <dei:EntityRegistrantName
      contextRef="C_73fe5d76-4d15-4b42-81af-874bcc3588da"
      id="F_d6e31934-88eb-40b3-bb9f-aec720719c57">QNB Corp.</dei:EntityRegistrantName>
    <ffd:OfferingSctyTp
      contextRef="C_a2e0e5ac-ec8b-4b52-ade1-c14c29e44d04"
      id="F_a029e0b7-6a9f-484b-bc5f-12b1d8991250">Equity</ffd:OfferingSctyTp>
    <ffd:OfferingSctyTitl
      contextRef="C_a2e0e5ac-ec8b-4b52-ade1-c14c29e44d04"
      id="F_7cde44b4-0e57-48f2-a2b0-538b3a3f89c5">Common Stock, par value $0.0625 per share</ffd:OfferingSctyTitl>
    <ffd:FeesOthrRuleFlg
      contextRef="C_a2e0e5ac-ec8b-4b52-ade1-c14c29e44d04"
      id="F_b1299293-585a-4dcf-b41b-d2eaf6ebc30d">true</ffd:FeesOthrRuleFlg>
    <ffd:AmtSctiesRegd
      contextRef="C_a2e0e5ac-ec8b-4b52-ade1-c14c29e44d04"
      decimals="-3"
      id="F_d1cdfaa7-6099-41ff-b318-015b2f7455a6"
      unitRef="U_shares">50000</ffd:AmtSctiesRegd>
    <ffd:MaxOfferingPricPerScty
      contextRef="C_a2e0e5ac-ec8b-4b52-ade1-c14c29e44d04"
      decimals="2"
      id="F_7bc1c32f-e5ac-4dad-ad64-c1d293778600"
      unitRef="U_USD">43.38</ffd:MaxOfferingPricPerScty>
    <ffd:MaxAggtOfferingPric
      contextRef="C_a2e0e5ac-ec8b-4b52-ade1-c14c29e44d04"
      decimals="-3"
      id="F_3d923d70-788e-455e-8c19-baa479360c89"
      unitRef="U_USD">2169000</ffd:MaxAggtOfferingPric>
    <ffd:FeeRate
      contextRef="C_a2e0e5ac-ec8b-4b52-ade1-c14c29e44d04"
      decimals="8"
      id="F_0876c78a-e8ba-48f1-8ef6-1b87a78c782f"
      unitRef="U_pure">0.0001381</ffd:FeeRate>
    <ffd:FeeAmt
      contextRef="C_a2e0e5ac-ec8b-4b52-ade1-c14c29e44d04"
      decimals="2"
      id="F_16b3abea-4537-4d5f-b254-5fea06a0e387"
      unitRef="U_USD">299.54</ffd:FeeAmt>
    <ffd:TtlOfferingAmt
      contextRef="C_73fe5d76-4d15-4b42-81af-874bcc3588da"
      decimals="-3"
      id="F_287bf563-8213-4935-ab64-40d525d90dcd"
      unitRef="U_USD">2169000</ffd:TtlOfferingAmt>
    <ffd:TtlFeeAmt
      contextRef="C_73fe5d76-4d15-4b42-81af-874bcc3588da"
      decimals="2"
      id="F_639f0d20-c7be-41bf-9c49-81080957a446"
      unitRef="U_USD">299.54</ffd:TtlFeeAmt>
    <ffd:TtlOffsetAmt
      contextRef="C_73fe5d76-4d15-4b42-81af-874bcc3588da"
      decimals="0"
      id="F_da3e494b-ace3-432c-90f8-1a9fa8867012"
      unitRef="U_USD">0</ffd:TtlOffsetAmt>
    <ffd:NetFeeAmt
      contextRef="C_73fe5d76-4d15-4b42-81af-874bcc3588da"
      decimals="2"
      id="F_4705c7df-69b4-4a4b-993b-432cf62349e9"
      unitRef="U_USD">299.54</ffd:NetFeeAmt>
    <ffd:OfferingNote
      contextRef="C_a2e0e5ac-ec8b-4b52-ade1-c14c29e44d04"
      id="F_55b54e99-c1b1-48c9-8ad5-4af447f899ee">
     &lt;table style="border-spacing:0;table-layout:auto;width:100.0%;border-collapse:separate;"&gt;
      &lt;tr style="visibility:collapse;"&gt;
       &lt;td style="width:4%;box-sizing:content-box;"&gt;&lt;/td&gt;
       &lt;td style="width:96%;box-sizing:content-box;"&gt;&lt;/td&gt;
      &lt;/tr&gt;
      &lt;tr style="height:10pt;white-space:pre-wrap;word-break:break-word;text-align:right;"&gt;
       &lt;td style="padding-top:0in;padding-left:0in;vertical-align:top;padding-bottom:0in;padding-right:0in;"&gt;&lt;p style="font-size:10pt;margin-top:0;font-family:Times New Roman;margin-bottom:8pt;text-align:justify;"&gt;&lt;span style="color:#000000;white-space:pre-wrap;font-kerning:none;min-width:fit-content;"&gt;(1)&lt;/span&gt;&lt;/p&gt;&lt;/td&gt;
       &lt;td style="padding-top:0in;padding-left:0in;vertical-align:top;padding-bottom:0in;padding-right:0in;"&gt;&lt;p style="font-size:10pt;margin-top:0;font-family:Times New Roman;margin-bottom:8pt;text-align:justify;"&gt;&lt;span style="color:#000000;white-space:pre-wrap;font-kerning:none;min-width:fit-content;"&gt;Pursuant to Rule 416 under the Securities Act of 1933, as amended (the &#x201c;Securities Act&#x201d;), this Registration Statement on Form S-8 (this &#x201c;Registration Statement&#x201d;) also covers additional shares that may be offered or issued under the QNB Corp. 2026 Employee Stock Purchase Plan.&lt;/span&gt;&lt;/p&gt;&lt;/td&gt;
      &lt;/tr&gt;
     &lt;/table&gt;&lt;p style="font-size:10pt;margin-top:0;font-family:Times New Roman;margin-bottom:8pt;text-align:justify;"&gt;&lt;span style="white-space:pre-wrap;font-size:12pt;font-family:Times New Roman;font-kerning:none;min-width:fit-content;"&gt;&#160;&lt;/span&gt;&lt;/p&gt;
     &lt;table style="border-spacing:0;table-layout:auto;width:100.0%;border-collapse:separate;"&gt;
      &lt;tr style="visibility:collapse;"&gt;
       &lt;td style="width:4%;box-sizing:content-box;"&gt;&lt;/td&gt;
       &lt;td style="width:96%;box-sizing:content-box;"&gt;&lt;/td&gt;
      &lt;/tr&gt;
      &lt;tr style="height:10pt;white-space:pre-wrap;word-break:break-word;"&gt;
       &lt;td style="padding-top:0in;padding-left:0in;vertical-align:top;padding-bottom:0in;padding-right:0in;text-align:left;"&gt;&lt;p style="font-size:10pt;margin-top:0;font-family:Times New Roman;margin-bottom:8pt;text-align:left;"&gt;&lt;span style="color:#000000;white-space:pre-wrap;font-kerning:none;min-width:fit-content;"&gt;(2)&lt;/span&gt;&lt;/p&gt;&lt;/td&gt;
       &lt;td style="padding-top:0in;padding-left:0in;vertical-align:top;padding-bottom:0in;padding-right:0in;text-align:right;"&gt;&lt;p style="font-size:10pt;margin-top:0;font-family:Times New Roman;margin-bottom:8pt;text-align:justify;"&gt;&lt;span style="color:#000000;white-space:pre-wrap;font-kerning:none;min-width:fit-content;"&gt;Estimated pursuant to Rule 457(c) and (h) under the Securities Act solely for the purpose of calculating the amount of the registration fee based upon the average of the high and low prices for a share of the registrant&#x2019;s common stock on June 8, 2026.&lt;/span&gt;&lt;/p&gt;&lt;/td&gt;
      &lt;/tr&gt;
     &lt;/table&gt;&lt;p style="font-size:10pt;margin-top:0;font-family:Times New Roman;margin-bottom:8pt;text-align:left;"&gt;&lt;span style="white-space:pre-wrap;font-size:12pt;font-family:Times New Roman;font-kerning:none;min-width:fit-content;"&gt;&#160;&lt;/span&gt;&lt;/p&gt;
     &lt;table style="border-spacing:0;table-layout:auto;width:100.0%;border-collapse:separate;"&gt;
      &lt;tr style="visibility:collapse;"&gt;
       &lt;td style="width:4%;box-sizing:content-box;"&gt;&lt;/td&gt;
       &lt;td style="width:96%;box-sizing:content-box;"&gt;&lt;/td&gt;
      &lt;/tr&gt;
      &lt;tr style="height:10pt;white-space:pre-wrap;word-break:break-word;text-align:left;"&gt;
       &lt;td style="padding-top:0in;padding-left:0in;vertical-align:top;padding-bottom:0in;padding-right:0in;"&gt;&lt;p style="font-size:10pt;margin-top:0;font-family:Times New Roman;margin-bottom:8pt;text-align:left;"&gt;&lt;span style="color:#000000;white-space:pre-wrap;font-kerning:none;min-width:fit-content;"&gt;(3)&lt;/span&gt;&lt;/p&gt;&lt;/td&gt;
       &lt;td style="padding-top:0in;padding-left:0in;vertical-align:top;padding-bottom:0in;padding-right:0in;"&gt;&lt;p style="font-size:10pt;margin-top:0;font-family:Times New Roman;margin-bottom:8pt;text-align:left;"&gt;&lt;span style="color:#000000;white-space:pre-wrap;font-kerning:none;min-width:fit-content;"&gt;Rounded up to the nearest penny.&lt;/span&gt;&lt;span style="color:#000000;white-space:pre-wrap;font-kerning:none;min-width:fit-content;"&gt; &lt;/span&gt;&lt;/p&gt;&lt;/td&gt;
      &lt;/tr&gt;
     &lt;/table&gt;</ffd:OfferingNote>
</xbrl>
