<?xml version="1.0" encoding="utf-8"?>
<xbrl
  xmlns="http://www.xbrl.org/2003/instance"
  xmlns:dei="http://xbrl.sec.gov/dei/2025"
  xmlns:ecd="http://xbrl.sec.gov/ecd/2025"
  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="biaf-20241231.xsd" xlink:type="simple"/>
    <context id="From2024-01-01to2024-12-31">
        <entity>
            <identifier scheme="http://www.sec.gov/CIK">0001712762</identifier>
        </entity>
        <period>
            <startDate>2024-01-01</startDate>
            <endDate>2024-12-31</endDate>
        </period>
    </context>
    <context id="From2024-01-012024-12-31_2024-12-31">
        <entity>
            <identifier scheme="http://www.sec.gov/CIK">0001712762</identifier>
            <segment>
                <xbrldi:typedMember dimension="ecd:RestatementDateAxis">
                    <ecd:RestatementDateAxis.domain>2024-12-31</ecd:RestatementDateAxis.domain>
                </xbrldi:typedMember>
            </segment>
        </entity>
        <period>
            <startDate>2024-01-01</startDate>
            <endDate>2024-12-31</endDate>
        </period>
    </context>
    <dei:AmendmentFlag contextRef="From2024-01-01to2024-12-31" id="Fact000003">false</dei:AmendmentFlag>
    <dei:EntityCentralIndexKey contextRef="From2024-01-01to2024-12-31" id="Fact000004">0001712762</dei:EntityCentralIndexKey>
    <dei:DocumentType contextRef="From2024-01-01to2024-12-31" id="xdx2ixbrl0010">PRE 14A</dei:DocumentType>
    <dei:EntityRegistrantName contextRef="From2024-01-01to2024-12-31" id="Fact000011">bioAffinity Technologies, Inc.</dei:EntityRegistrantName>
    <ecd:InsiderTrdPoliciesProcAdoptedFlag contextRef="From2024-01-01to2024-12-31" id="Fact000012">true</ecd:InsiderTrdPoliciesProcAdoptedFlag>
    <ecd:RestatementDoesNotRequireRecoveryTextBlock
      contextRef="From2024-01-012024-12-31_2024-12-31"
      id="Fact000013">&lt;span style="font-family: Times New Roman, Times, Serif; font-size: 10pt"&gt;The
Board has adopted a clawback policy which requires the clawback of erroneously awarded incentive-based compensation of past or current
executive officers awarded during the three full fiscal years preceding the date on which the issuer is required to prepare an accounting
restatement due to the material noncompliance of the Company with any financial reporting requirement under the federal securities laws.
There is no fault or misconduct required to trigger a clawback.&lt;/span&gt;</ecd:RestatementDoesNotRequireRecoveryTextBlock>
    <ecd:AwardTmgMnpiDiscTextBlock contextRef="From2024-01-01to2024-12-31" id="Fact000015">&lt;span style="font-family: Times New Roman, Times, Serif; font-size: 10pt"&gt;While
we do &lt;span class="xdx_phnt_RGlzY2xvc3VyZSAtIEF3YXJkIFRpbWluZyBEaXNjbG9zdXJlAA__" id="xdx_90F_eecd--AwardTmgMnpiCnsdrdFlag_dbF_c20240101__20241231_zGnkONj78Mkd"&gt;not&lt;/span&gt; have a formal written policy in place with regard to the timing of awards of options in relation to the disclosure of material
nonpublic information, the Compensation Committee does not seek to time equity grants to take advantage of information, either positive
or negative, about our Company that has not been publicly disclosed. It has been our practice to grant equity awards to our officers
and directors upon their appointment. We intend to issue equity grants to our officers and directors at the same time each year. It is
our policy to grant our executive officers annual equity awards of restricted stock in the first quarter of each year and to grant our
directors annual equity awards of restricted stock on July 1 of each year. Option grants, if any, are effective on the date the award
determination is made by the Compensation Committee, and the exercise price of options is the closing market price of our common stock
on the business day of the grant or, if the grant is made on a weekend or holiday, on the prior business day.&lt;/span&gt;&lt;span style="font-family: Times New Roman, Times, Serif; font-size: 10pt"&gt;During
the fiscal year ended December 31, 2025, we did not award any options to a named executive officer, and &lt;span class="xdx_phnt_RGlzY2xvc3VyZSAtIEF3YXJkIFRpbWluZyBEaXNjbG9zdXJlAA__" id="xdx_90F_eecd--AwardTmgHowMnpiCnsdrdTextBlock_c20240101__20241231_z4JUzyJ0mMCb"&gt;we did &lt;span class="xdx_phnt_RGlzY2xvc3VyZSAtIEF3YXJkIFRpbWluZyBEaXNjbG9zdXJlAA__" id="xdx_90E_eecd--MnpiDiscTimedForCompValFlag_dbF_c20240101__20241231_z0cBDuKzPGra"&gt;&lt;span class="xdx_phnt_RGlzY2xvc3VyZSAtIEF3YXJkIFRpbWluZyBEaXNjbG9zdXJlAA__" id="xdx_907_eecd--MnpiDiscTimedForCompValFlag_dbF_c20240101__20241231_zP9XPeKfJBZi"&gt;not&lt;/span&gt;&lt;/span&gt; time the disclosure
of material nonpublic information for the purpose of affecting the value of executive compensation&lt;/span&gt;.&lt;/span&gt;</ecd:AwardTmgMnpiDiscTextBlock>
    <ecd:AwardTmgMnpiCnsdrdFlag contextRef="From2024-01-01to2024-12-31" id="Fact000016">false</ecd:AwardTmgMnpiCnsdrdFlag>
    <ecd:AwardTmgHowMnpiCnsdrdTextBlock contextRef="From2024-01-01to2024-12-31" id="Fact000017">we did &lt;span class="xdx_phnt_RGlzY2xvc3VyZSAtIEF3YXJkIFRpbWluZyBEaXNjbG9zdXJlAA__" id="xdx_90E_eecd--MnpiDiscTimedForCompValFlag_dbF_c20240101__20241231_z0cBDuKzPGra"&gt;&lt;span class="xdx_phnt_RGlzY2xvc3VyZSAtIEF3YXJkIFRpbWluZyBEaXNjbG9zdXJlAA__" id="xdx_907_eecd--MnpiDiscTimedForCompValFlag_dbF_c20240101__20241231_zP9XPeKfJBZi"&gt;not&lt;/span&gt;&lt;/span&gt; time the disclosure
of material nonpublic information for the purpose of affecting the value of executive compensation</ecd:AwardTmgHowMnpiCnsdrdTextBlock>
    <ecd:MnpiDiscTimedForCompValFlag contextRef="From2024-01-01to2024-12-31" id="Fact000018">false</ecd:MnpiDiscTimedForCompValFlag>
    <ecd:MnpiDiscTimedForCompValFlag contextRef="From2024-01-01to2024-12-31" id="Fact000019">false</ecd:MnpiDiscTimedForCompValFlag>
</xbrl>
