<?xml version="1.0" encoding="utf-8"?>
<xbrl
  xmlns="http://www.xbrl.org/2003/instance"
  xmlns:BIAF="http://bioaffinitytech.com/20260305"
  xmlns:dei="http://xbrl.sec.gov/dei/2025"
  xmlns:link="http://www.xbrl.org/2003/linkbase"
  xmlns:us-gaap="http://fasb.org/us-gaap/2025"
  xmlns:xbrldi="http://xbrl.org/2006/xbrldi"
  xmlns:xlink="http://www.w3.org/1999/xlink">
    <link:schemaRef xlink:href="biaf-20260305.xsd" xlink:type="simple"/>
    <context id="AsOf2026-03-05">
        <entity>
            <identifier scheme="http://www.sec.gov/CIK">0001712762</identifier>
        </entity>
        <period>
            <startDate>2026-03-05</startDate>
            <endDate>2026-03-05</endDate>
        </period>
    </context>
    <context id="From2026-03-052026-03-05_custom_CommonStockParValue0.007PerShareMember">
        <entity>
            <identifier scheme="http://www.sec.gov/CIK">0001712762</identifier>
            <segment>
                <xbrldi:explicitMember dimension="us-gaap:StatementClassOfStockAxis">BIAF:CommonStockParValue0.007PerShareMember</xbrldi:explicitMember>
            </segment>
        </entity>
        <period>
            <startDate>2026-03-05</startDate>
            <endDate>2026-03-05</endDate>
        </period>
    </context>
    <context id="From2026-03-052026-03-05_custom_WarrantsToPurchaseCommonStockMember">
        <entity>
            <identifier scheme="http://www.sec.gov/CIK">0001712762</identifier>
            <segment>
                <xbrldi:explicitMember dimension="us-gaap:StatementClassOfStockAxis">BIAF:WarrantsToPurchaseCommonStockMember</xbrldi:explicitMember>
            </segment>
        </entity>
        <period>
            <startDate>2026-03-05</startDate>
            <endDate>2026-03-05</endDate>
        </period>
    </context>
    <dei:AmendmentFlag contextRef="AsOf2026-03-05" id="Fact000003">false</dei:AmendmentFlag>
    <dei:EntityCentralIndexKey contextRef="AsOf2026-03-05" id="Fact000004">0001712762</dei:EntityCentralIndexKey>
    <dei:DocumentType contextRef="AsOf2026-03-05" id="Fact000009">8-K</dei:DocumentType>
    <dei:DocumentPeriodEndDate contextRef="AsOf2026-03-05" id="Fact000010">2026-03-05</dei:DocumentPeriodEndDate>
    <dei:EntityRegistrantName contextRef="AsOf2026-03-05" id="Fact000011">bioAffinity Technologies, Inc.</dei:EntityRegistrantName>
    <dei:EntityIncorporationStateCountryCode contextRef="AsOf2026-03-05" id="Fact000012">DE</dei:EntityIncorporationStateCountryCode>
    <dei:EntityFileNumber contextRef="AsOf2026-03-05" id="Fact000013">001-41463</dei:EntityFileNumber>
    <dei:EntityTaxIdentificationNumber contextRef="AsOf2026-03-05" id="Fact000014">46-5211056</dei:EntityTaxIdentificationNumber>
    <dei:EntityAddressAddressLine1 contextRef="AsOf2026-03-05" id="Fact000015">3300 Nacogdoches Road</dei:EntityAddressAddressLine1>
    <dei:EntityAddressAddressLine2 contextRef="AsOf2026-03-05" id="Fact000016">Suite 216</dei:EntityAddressAddressLine2>
    <dei:EntityAddressCityOrTown contextRef="AsOf2026-03-05" id="Fact000017">San Antonio</dei:EntityAddressCityOrTown>
    <dei:EntityAddressStateOrProvince contextRef="AsOf2026-03-05" id="Fact000018">TX</dei:EntityAddressStateOrProvince>
    <dei:EntityAddressPostalZipCode contextRef="AsOf2026-03-05" id="Fact000019">78217</dei:EntityAddressPostalZipCode>
    <dei:CityAreaCode contextRef="AsOf2026-03-05" id="Fact000020">(210)</dei:CityAreaCode>
    <dei:LocalPhoneNumber contextRef="AsOf2026-03-05" id="Fact000021">698-5334</dei:LocalPhoneNumber>
    <dei:WrittenCommunications contextRef="AsOf2026-03-05" id="Fact000022">false</dei:WrittenCommunications>
    <dei:SolicitingMaterial contextRef="AsOf2026-03-05" id="Fact000023">false</dei:SolicitingMaterial>
    <dei:PreCommencementTenderOffer contextRef="AsOf2026-03-05" id="Fact000024">false</dei:PreCommencementTenderOffer>
    <dei:PreCommencementIssuerTenderOffer contextRef="AsOf2026-03-05" id="Fact000025">false</dei:PreCommencementIssuerTenderOffer>
    <dei:Security12bTitle
      contextRef="From2026-03-052026-03-05_custom_CommonStockParValue0.007PerShareMember"
      id="Fact000026">Common                                             Stock, par value $0.007 per share</dei:Security12bTitle>
    <dei:TradingSymbol
      contextRef="From2026-03-052026-03-05_custom_CommonStockParValue0.007PerShareMember"
      id="Fact000027">BIAF</dei:TradingSymbol>
    <dei:SecurityExchangeName
      contextRef="From2026-03-052026-03-05_custom_CommonStockParValue0.007PerShareMember"
      id="Fact000028">NASDAQ</dei:SecurityExchangeName>
    <dei:Security12bTitle
      contextRef="From2026-03-052026-03-05_custom_WarrantsToPurchaseCommonStockMember"
      id="Fact000029">Warrants     to purchase Common Stock</dei:Security12bTitle>
    <dei:TradingSymbol
      contextRef="From2026-03-052026-03-05_custom_WarrantsToPurchaseCommonStockMember"
      id="Fact000030">BIAFW</dei:TradingSymbol>
    <dei:SecurityExchangeName
      contextRef="From2026-03-052026-03-05_custom_WarrantsToPurchaseCommonStockMember"
      id="Fact000031">NASDAQ</dei:SecurityExchangeName>
    <dei:EntityEmergingGrowthCompany contextRef="AsOf2026-03-05" id="Fact000032">true</dei:EntityEmergingGrowthCompany>
    <dei:EntityExTransitionPeriod contextRef="AsOf2026-03-05" id="Fact000033">false</dei:EntityExTransitionPeriod>
</xbrl>
