<?xml version='1.0' encoding='utf-8'?>
<FilingSummary>
  <Version>3.21.2</Version>
  <ProcessingTime/>
  <ReportFormat>html</ReportFormat>
  <ContextCount>636</ContextCount>
  <ElementCount>745</ElementCount>
  <EntityCount>1</EntityCount>
  <FootnotesReported>true</FootnotesReported>
  <SegmentCount>191</SegmentCount>
  <ScenarioCount>0</ScenarioCount>
  <TuplesReported>false</TuplesReported>
  <UnitCount>16</UnitCount>
  <MyReports>
    <Report instance="unfi-20210731.htm">
      <IsDefault>false</IsDefault>
      <HasEmbeddedReports>false</HasEmbeddedReports>
      <HtmlFileName>R1.htm</HtmlFileName>
      <LongName>000010001 - Document - Cover</LongName>
      <ReportType>Sheet</ReportType>
      <Role>http://www.unfi.com/role/Cover</Role>
      <ShortName>Cover</ShortName>
      <MenuCategory>Cover</MenuCategory>
      <Position>1</Position>
    </Report>
    <Report instance="unfi-20210731.htm">
      <IsDefault>false</IsDefault>
      <HasEmbeddedReports>false</HasEmbeddedReports>
      <HtmlFileName>R2.htm</HtmlFileName>
      <LongName>100010002 - Statement - CONSOLIDATED BALANCE SHEETS</LongName>
      <ReportType>Sheet</ReportType>
      <Role>http://www.unfi.com/role/CONSOLIDATEDBALANCESHEETS</Role>
      <ShortName>CONSOLIDATED BALANCE SHEETS</ShortName>
      <MenuCategory>Statements</MenuCategory>
      <Position>2</Position>
    </Report>
    <Report instance="unfi-20210731.htm">
      <IsDefault>false</IsDefault>
      <HasEmbeddedReports>false</HasEmbeddedReports>
      <HtmlFileName>R3.htm</HtmlFileName>
      <LongName>100020003 - Statement - CONSOLIDATED BALANCE SHEETS (Parenthetical)</LongName>
      <ReportType>Sheet</ReportType>
      <Role>http://www.unfi.com/role/CONSOLIDATEDBALANCESHEETSParenthetical</Role>
      <ShortName>CONSOLIDATED BALANCE SHEETS (Parenthetical)</ShortName>
      <MenuCategory>Statements</MenuCategory>
      <Position>3</Position>
    </Report>
    <Report instance="unfi-20210731.htm">
      <IsDefault>false</IsDefault>
      <HasEmbeddedReports>false</HasEmbeddedReports>
      <HtmlFileName>R4.htm</HtmlFileName>
      <LongName>100030004 - Statement - CONSOLIDATED STATEMENTS OF OPERATIONS</LongName>
      <ReportType>Sheet</ReportType>
      <Role>http://www.unfi.com/role/CONSOLIDATEDSTATEMENTSOFOPERATIONS</Role>
      <ShortName>CONSOLIDATED STATEMENTS OF OPERATIONS</ShortName>
      <MenuCategory>Statements</MenuCategory>
      <Position>4</Position>
    </Report>
    <Report instance="unfi-20210731.htm">
      <IsDefault>false</IsDefault>
      <HasEmbeddedReports>false</HasEmbeddedReports>
      <HtmlFileName>R5.htm</HtmlFileName>
      <LongName>100040005 - Statement - CONSOLIDATED STATEMENTS OF COMPREHENSIVE INCOME</LongName>
      <ReportType>Sheet</ReportType>
      <Role>http://www.unfi.com/role/CONSOLIDATEDSTATEMENTSOFCOMPREHENSIVEINCOME</Role>
      <ShortName>CONSOLIDATED STATEMENTS OF COMPREHENSIVE INCOME</ShortName>
      <MenuCategory>Statements</MenuCategory>
      <Position>5</Position>
    </Report>
    <Report instance="unfi-20210731.htm">
      <IsDefault>false</IsDefault>
      <HasEmbeddedReports>false</HasEmbeddedReports>
      <HtmlFileName>R6.htm</HtmlFileName>
      <LongName>100050006 - Statement - CONSOLIDATED STATEMENTS OF COMPREHENSIVE INCOME (Parenthetical)</LongName>
      <ReportType>Sheet</ReportType>
      <Role>http://www.unfi.com/role/CONSOLIDATEDSTATEMENTSOFCOMPREHENSIVEINCOMEParenthetical</Role>
      <ShortName>CONSOLIDATED STATEMENTS OF COMPREHENSIVE INCOME (Parenthetical)</ShortName>
      <MenuCategory>Statements</MenuCategory>
      <Position>6</Position>
    </Report>
    <Report instance="unfi-20210731.htm">
      <IsDefault>false</IsDefault>
      <HasEmbeddedReports>false</HasEmbeddedReports>
      <HtmlFileName>R7.htm</HtmlFileName>
      <LongName>100060007 - Statement - CONSOLIDATED STATEMENTS OF STOCKHOLDERS' EQUITY</LongName>
      <ReportType>Sheet</ReportType>
      <Role>http://www.unfi.com/role/CONSOLIDATEDSTATEMENTSOFSTOCKHOLDERSEQUITY</Role>
      <ShortName>CONSOLIDATED STATEMENTS OF STOCKHOLDERS' EQUITY</ShortName>
      <MenuCategory>Statements</MenuCategory>
      <Position>7</Position>
    </Report>
    <Report instance="unfi-20210731.htm">
      <IsDefault>false</IsDefault>
      <HasEmbeddedReports>false</HasEmbeddedReports>
      <HtmlFileName>R8.htm</HtmlFileName>
      <LongName>100070008 - Statement - CONSOLIDATED STATEMENTS OF CASH FLOWS</LongName>
      <ReportType>Sheet</ReportType>
      <Role>http://www.unfi.com/role/CONSOLIDATEDSTATEMENTSOFCASHFLOWS</Role>
      <ShortName>CONSOLIDATED STATEMENTS OF CASH FLOWS</ShortName>
      <MenuCategory>Statements</MenuCategory>
      <Position>8</Position>
    </Report>
    <Report instance="unfi-20210731.htm">
      <IsDefault>false</IsDefault>
      <HasEmbeddedReports>false</HasEmbeddedReports>
      <HtmlFileName>R9.htm</HtmlFileName>
      <LongName>210011001 - Disclosure - SIGNIFICANT ACCOUNTING POLICIES</LongName>
      <ReportType>Sheet</ReportType>
      <Role>http://www.unfi.com/role/SIGNIFICANTACCOUNTINGPOLICIES</Role>
      <ShortName>SIGNIFICANT ACCOUNTING POLICIES</ShortName>
      <MenuCategory>Notes</MenuCategory>
      <Position>9</Position>
    </Report>
    <Report instance="unfi-20210731.htm">
      <IsDefault>false</IsDefault>
      <HasEmbeddedReports>false</HasEmbeddedReports>
      <HtmlFileName>R10.htm</HtmlFileName>
      <LongName>210131002 - Disclosure - RECENTLY ADOPTED AND ISSUED ACCOUNTING PRONOUNCEMENTS</LongName>
      <ReportType>Sheet</ReportType>
      <Role>http://www.unfi.com/role/RECENTLYADOPTEDANDISSUEDACCOUNTINGPRONOUNCEMENTS</Role>
      <ShortName>RECENTLY ADOPTED AND ISSUED ACCOUNTING PRONOUNCEMENTS</ShortName>
      <MenuCategory>Notes</MenuCategory>
      <Position>10</Position>
    </Report>
    <Report instance="unfi-20210731.htm">
      <IsDefault>false</IsDefault>
      <HasEmbeddedReports>false</HasEmbeddedReports>
      <HtmlFileName>R11.htm</HtmlFileName>
      <LongName>210141003 - Disclosure - REVENUE RECOGNITION</LongName>
      <ReportType>Sheet</ReportType>
      <Role>http://www.unfi.com/role/REVENUERECOGNITION</Role>
      <ShortName>REVENUE RECOGNITION</ShortName>
      <MenuCategory>Notes</MenuCategory>
      <Position>11</Position>
    </Report>
    <Report instance="unfi-20210731.htm">
      <IsDefault>false</IsDefault>
      <HasEmbeddedReports>false</HasEmbeddedReports>
      <HtmlFileName>R12.htm</HtmlFileName>
      <LongName>210201004 - Disclosure - RESTRUCTURING, ACQUISITION, AND INTEGRATION RELATED EXPENSES</LongName>
      <ReportType>Sheet</ReportType>
      <Role>http://www.unfi.com/role/RESTRUCTURINGACQUISITIONANDINTEGRATIONRELATEDEXPENSES</Role>
      <ShortName>RESTRUCTURING, ACQUISITION, AND INTEGRATION RELATED EXPENSES</ShortName>
      <MenuCategory>Notes</MenuCategory>
      <Position>12</Position>
    </Report>
    <Report instance="unfi-20210731.htm">
      <IsDefault>false</IsDefault>
      <HasEmbeddedReports>false</HasEmbeddedReports>
      <HtmlFileName>R13.htm</HtmlFileName>
      <LongName>210231005 - Disclosure - PROPERTY AND EQUIPMENT, NET</LongName>
      <ReportType>Sheet</ReportType>
      <Role>http://www.unfi.com/role/PROPERTYANDEQUIPMENTNET</Role>
      <ShortName>PROPERTY AND EQUIPMENT, NET</ShortName>
      <MenuCategory>Notes</MenuCategory>
      <Position>13</Position>
    </Report>
    <Report instance="unfi-20210731.htm">
      <IsDefault>false</IsDefault>
      <HasEmbeddedReports>false</HasEmbeddedReports>
      <HtmlFileName>R14.htm</HtmlFileName>
      <LongName>210271006 - Disclosure - GOODWILL AND INTANGIBLE ASSETS, NET</LongName>
      <ReportType>Sheet</ReportType>
      <Role>http://www.unfi.com/role/GOODWILLANDINTANGIBLEASSETSNET</Role>
      <ShortName>GOODWILL AND INTANGIBLE ASSETS, NET</ShortName>
      <MenuCategory>Notes</MenuCategory>
      <Position>14</Position>
    </Report>
    <Report instance="unfi-20210731.htm">
      <IsDefault>false</IsDefault>
      <HasEmbeddedReports>false</HasEmbeddedReports>
      <HtmlFileName>R15.htm</HtmlFileName>
      <LongName>210331007 - Disclosure - FAIR VALUE MEASUREMENTS OF FINANCIAL INSTRUMENTS</LongName>
      <ReportType>Sheet</ReportType>
      <Role>http://www.unfi.com/role/FAIRVALUEMEASUREMENTSOFFINANCIALINSTRUMENTS</Role>
      <ShortName>FAIR VALUE MEASUREMENTS OF FINANCIAL INSTRUMENTS</ShortName>
      <MenuCategory>Notes</MenuCategory>
      <Position>15</Position>
    </Report>
    <Report instance="unfi-20210731.htm">
      <IsDefault>false</IsDefault>
      <HasEmbeddedReports>false</HasEmbeddedReports>
      <HtmlFileName>R16.htm</HtmlFileName>
      <LongName>210381008 - Disclosure - DERIVATIVES</LongName>
      <ReportType>Sheet</ReportType>
      <Role>http://www.unfi.com/role/DERIVATIVES</Role>
      <ShortName>DERIVATIVES</ShortName>
      <MenuCategory>Notes</MenuCategory>
      <Position>16</Position>
    </Report>
    <Report instance="unfi-20210731.htm">
      <IsDefault>false</IsDefault>
      <HasEmbeddedReports>false</HasEmbeddedReports>
      <HtmlFileName>R17.htm</HtmlFileName>
      <LongName>210431009 - Disclosure - LONG-TERM DEBT</LongName>
      <ReportType>Sheet</ReportType>
      <Role>http://www.unfi.com/role/LONGTERMDEBT</Role>
      <ShortName>LONG-TERM DEBT</ShortName>
      <MenuCategory>Notes</MenuCategory>
      <Position>17</Position>
    </Report>
    <Report instance="unfi-20210731.htm">
      <IsDefault>false</IsDefault>
      <HasEmbeddedReports>false</HasEmbeddedReports>
      <HtmlFileName>R18.htm</HtmlFileName>
      <LongName>210521010 - Disclosure - COMPREHENSIVE INCOME (LOSS) AND ACCUMULATED OTHER COMPREHENSIVE LOSS</LongName>
      <ReportType>Sheet</ReportType>
      <Role>http://www.unfi.com/role/COMPREHENSIVEINCOMELOSSANDACCUMULATEDOTHERCOMPREHENSIVELOSS</Role>
      <ShortName>COMPREHENSIVE INCOME (LOSS) AND ACCUMULATED OTHER COMPREHENSIVE LOSS</ShortName>
      <MenuCategory>Notes</MenuCategory>
      <Position>18</Position>
    </Report>
    <Report instance="unfi-20210731.htm">
      <IsDefault>false</IsDefault>
      <HasEmbeddedReports>false</HasEmbeddedReports>
      <HtmlFileName>R19.htm</HtmlFileName>
      <LongName>210571011 - Disclosure - LEASES</LongName>
      <ReportType>Sheet</ReportType>
      <Role>http://www.unfi.com/role/LEASES</Role>
      <ShortName>LEASES</ShortName>
      <MenuCategory>Notes</MenuCategory>
      <Position>19</Position>
    </Report>
    <Report instance="unfi-20210731.htm">
      <IsDefault>false</IsDefault>
      <HasEmbeddedReports>false</HasEmbeddedReports>
      <HtmlFileName>R20.htm</HtmlFileName>
      <LongName>210651012 - Disclosure - SHARE-BASED AWARDS</LongName>
      <ReportType>Sheet</ReportType>
      <Role>http://www.unfi.com/role/SHAREBASEDAWARDS</Role>
      <ShortName>SHARE-BASED AWARDS</ShortName>
      <MenuCategory>Notes</MenuCategory>
      <Position>20</Position>
    </Report>
    <Report instance="unfi-20210731.htm">
      <IsDefault>false</IsDefault>
      <HasEmbeddedReports>false</HasEmbeddedReports>
      <HtmlFileName>R21.htm</HtmlFileName>
      <LongName>210731013 - Disclosure - BENEFIT PLANS</LongName>
      <ReportType>Sheet</ReportType>
      <Role>http://www.unfi.com/role/BENEFITPLANS</Role>
      <ShortName>BENEFIT PLANS</ShortName>
      <MenuCategory>Notes</MenuCategory>
      <Position>21</Position>
    </Report>
    <Report instance="unfi-20210731.htm">
      <IsDefault>false</IsDefault>
      <HasEmbeddedReports>false</HasEmbeddedReports>
      <HtmlFileName>R22.htm</HtmlFileName>
      <LongName>210911014 - Disclosure - INCOME TAXES</LongName>
      <ReportType>Sheet</ReportType>
      <Role>http://www.unfi.com/role/INCOMETAXES</Role>
      <ShortName>INCOME TAXES</ShortName>
      <MenuCategory>Notes</MenuCategory>
      <Position>22</Position>
    </Report>
    <Report instance="unfi-20210731.htm">
      <IsDefault>false</IsDefault>
      <HasEmbeddedReports>false</HasEmbeddedReports>
      <HtmlFileName>R23.htm</HtmlFileName>
      <LongName>211031015 - Disclosure - EARNINGS PER SHARE</LongName>
      <ReportType>Sheet</ReportType>
      <Role>http://www.unfi.com/role/EARNINGSPERSHARE</Role>
      <ShortName>EARNINGS PER SHARE</ShortName>
      <MenuCategory>Notes</MenuCategory>
      <Position>23</Position>
    </Report>
    <Report instance="unfi-20210731.htm">
      <IsDefault>false</IsDefault>
      <HasEmbeddedReports>false</HasEmbeddedReports>
      <HtmlFileName>R24.htm</HtmlFileName>
      <LongName>211061016 - Disclosure - BUSINESS SEGMENTS</LongName>
      <ReportType>Sheet</ReportType>
      <Role>http://www.unfi.com/role/BUSINESSSEGMENTS</Role>
      <ShortName>BUSINESS SEGMENTS</ShortName>
      <MenuCategory>Notes</MenuCategory>
      <Position>24</Position>
    </Report>
    <Report instance="unfi-20210731.htm">
      <IsDefault>false</IsDefault>
      <HasEmbeddedReports>false</HasEmbeddedReports>
      <HtmlFileName>R25.htm</HtmlFileName>
      <LongName>211111017 - Disclosure - COMMITMENTS, CONTINGENCIES AND OFF-BALANCE SHEET ARRANGEMENTS</LongName>
      <ReportType>Sheet</ReportType>
      <Role>http://www.unfi.com/role/COMMITMENTSCONTINGENCIESANDOFFBALANCESHEETARRANGEMENTS</Role>
      <ShortName>COMMITMENTS, CONTINGENCIES AND OFF-BALANCE SHEET ARRANGEMENTS</ShortName>
      <MenuCategory>Notes</MenuCategory>
      <Position>25</Position>
    </Report>
    <Report instance="unfi-20210731.htm">
      <IsDefault>false</IsDefault>
      <HasEmbeddedReports>false</HasEmbeddedReports>
      <HtmlFileName>R26.htm</HtmlFileName>
      <LongName>211131018 - Disclosure - DISCONTINUED OPERATIONS</LongName>
      <ReportType>Sheet</ReportType>
      <Role>http://www.unfi.com/role/DISCONTINUEDOPERATIONS</Role>
      <ShortName>DISCONTINUED OPERATIONS</ShortName>
      <MenuCategory>Notes</MenuCategory>
      <Position>26</Position>
    </Report>
    <Report instance="unfi-20210731.htm">
      <IsDefault>false</IsDefault>
      <HasEmbeddedReports>false</HasEmbeddedReports>
      <HtmlFileName>R27.htm</HtmlFileName>
      <LongName>220022001 - Disclosure - SIGNIFICANT ACCOUNTING POLICIES (Policies)</LongName>
      <ReportType>Sheet</ReportType>
      <Role>http://www.unfi.com/role/SIGNIFICANTACCOUNTINGPOLICIESPolicies</Role>
      <ShortName>SIGNIFICANT ACCOUNTING POLICIES (Policies)</ShortName>
      <MenuCategory>Policies</MenuCategory>
      <Position>27</Position>
    </Report>
    <Report instance="unfi-20210731.htm">
      <IsDefault>false</IsDefault>
      <HasEmbeddedReports>false</HasEmbeddedReports>
      <HtmlFileName>R28.htm</HtmlFileName>
      <LongName>230033001 - Disclosure - SIGNIFICANT ACCOUNTING POLICIES (Tables)</LongName>
      <ReportType>Sheet</ReportType>
      <Role>http://www.unfi.com/role/SIGNIFICANTACCOUNTINGPOLICIESTables</Role>
      <ShortName>SIGNIFICANT ACCOUNTING POLICIES (Tables)</ShortName>
      <MenuCategory>Tables</MenuCategory>
      <ParentRole>http://www.unfi.com/role/SIGNIFICANTACCOUNTINGPOLICIES</ParentRole>
      <Position>28</Position>
    </Report>
    <Report instance="unfi-20210731.htm">
      <IsDefault>false</IsDefault>
      <HasEmbeddedReports>false</HasEmbeddedReports>
      <HtmlFileName>R29.htm</HtmlFileName>
      <LongName>230153002 - Disclosure - REVENUE RECOGNITION (Tables)</LongName>
      <ReportType>Sheet</ReportType>
      <Role>http://www.unfi.com/role/REVENUERECOGNITIONTables</Role>
      <ShortName>REVENUE RECOGNITION (Tables)</ShortName>
      <MenuCategory>Tables</MenuCategory>
      <ParentRole>http://www.unfi.com/role/REVENUERECOGNITION</ParentRole>
      <Position>29</Position>
    </Report>
    <Report instance="unfi-20210731.htm">
      <IsDefault>false</IsDefault>
      <HasEmbeddedReports>false</HasEmbeddedReports>
      <HtmlFileName>R30.htm</HtmlFileName>
      <LongName>230213003 - Disclosure - RESTRUCTURING, ACQUISITION AND INTEGRATION RELATED EXPENSES (Tables)</LongName>
      <ReportType>Sheet</ReportType>
      <Role>http://www.unfi.com/role/RESTRUCTURINGACQUISITIONANDINTEGRATIONRELATEDEXPENSESTables</Role>
      <ShortName>RESTRUCTURING, ACQUISITION AND INTEGRATION RELATED EXPENSES (Tables)</ShortName>
      <MenuCategory>Tables</MenuCategory>
      <Position>30</Position>
    </Report>
    <Report instance="unfi-20210731.htm">
      <IsDefault>false</IsDefault>
      <HasEmbeddedReports>false</HasEmbeddedReports>
      <HtmlFileName>R31.htm</HtmlFileName>
      <LongName>230243004 - Disclosure - PROPERTY AND EQUIPMENT, NET (Tables)</LongName>
      <ReportType>Sheet</ReportType>
      <Role>http://www.unfi.com/role/PROPERTYANDEQUIPMENTNETTables</Role>
      <ShortName>PROPERTY AND EQUIPMENT, NET (Tables)</ShortName>
      <MenuCategory>Tables</MenuCategory>
      <ParentRole>http://www.unfi.com/role/PROPERTYANDEQUIPMENTNET</ParentRole>
      <Position>31</Position>
    </Report>
    <Report instance="unfi-20210731.htm">
      <IsDefault>false</IsDefault>
      <HasEmbeddedReports>false</HasEmbeddedReports>
      <HtmlFileName>R32.htm</HtmlFileName>
      <LongName>230283005 - Disclosure - GOODWILL AND INTANGIBLE ASSETS, NET (Tables)</LongName>
      <ReportType>Sheet</ReportType>
      <Role>http://www.unfi.com/role/GOODWILLANDINTANGIBLEASSETSNETTables</Role>
      <ShortName>GOODWILL AND INTANGIBLE ASSETS, NET (Tables)</ShortName>
      <MenuCategory>Tables</MenuCategory>
      <ParentRole>http://www.unfi.com/role/GOODWILLANDINTANGIBLEASSETSNET</ParentRole>
      <Position>32</Position>
    </Report>
    <Report instance="unfi-20210731.htm">
      <IsDefault>false</IsDefault>
      <HasEmbeddedReports>false</HasEmbeddedReports>
      <HtmlFileName>R33.htm</HtmlFileName>
      <LongName>230343006 - Disclosure - FAIR VALUE MEASUREMENTS OF FINANCIAL INSTRUMENTS (Tables)</LongName>
      <ReportType>Sheet</ReportType>
      <Role>http://www.unfi.com/role/FAIRVALUEMEASUREMENTSOFFINANCIALINSTRUMENTSTables</Role>
      <ShortName>FAIR VALUE MEASUREMENTS OF FINANCIAL INSTRUMENTS (Tables)</ShortName>
      <MenuCategory>Tables</MenuCategory>
      <ParentRole>http://www.unfi.com/role/FAIRVALUEMEASUREMENTSOFFINANCIALINSTRUMENTS</ParentRole>
      <Position>33</Position>
    </Report>
    <Report instance="unfi-20210731.htm">
      <IsDefault>false</IsDefault>
      <HasEmbeddedReports>false</HasEmbeddedReports>
      <HtmlFileName>R34.htm</HtmlFileName>
      <LongName>230393007 - Disclosure - DERIVATIVES (Tables)</LongName>
      <ReportType>Sheet</ReportType>
      <Role>http://www.unfi.com/role/DERIVATIVESTables</Role>
      <ShortName>DERIVATIVES (Tables)</ShortName>
      <MenuCategory>Tables</MenuCategory>
      <ParentRole>http://www.unfi.com/role/DERIVATIVES</ParentRole>
      <Position>34</Position>
    </Report>
    <Report instance="unfi-20210731.htm">
      <IsDefault>false</IsDefault>
      <HasEmbeddedReports>false</HasEmbeddedReports>
      <HtmlFileName>R35.htm</HtmlFileName>
      <LongName>230443008 - Disclosure - LONG-TERM DEBT (Tables)</LongName>
      <ReportType>Sheet</ReportType>
      <Role>http://www.unfi.com/role/LONGTERMDEBTTables</Role>
      <ShortName>LONG-TERM DEBT (Tables)</ShortName>
      <MenuCategory>Tables</MenuCategory>
      <ParentRole>http://www.unfi.com/role/LONGTERMDEBT</ParentRole>
      <Position>35</Position>
    </Report>
    <Report instance="unfi-20210731.htm">
      <IsDefault>false</IsDefault>
      <HasEmbeddedReports>false</HasEmbeddedReports>
      <HtmlFileName>R36.htm</HtmlFileName>
      <LongName>230533009 - Disclosure - COMPREHENSIVE INCOME (LOSS) AND ACCUMULATED OTHER COMPREHENSIVE LOSS (Tables)</LongName>
      <ReportType>Sheet</ReportType>
      <Role>http://www.unfi.com/role/COMPREHENSIVEINCOMELOSSANDACCUMULATEDOTHERCOMPREHENSIVELOSSTables</Role>
      <ShortName>COMPREHENSIVE INCOME (LOSS) AND ACCUMULATED OTHER COMPREHENSIVE LOSS (Tables)</ShortName>
      <MenuCategory>Tables</MenuCategory>
      <ParentRole>http://www.unfi.com/role/COMPREHENSIVEINCOMELOSSANDACCUMULATEDOTHERCOMPREHENSIVELOSS</ParentRole>
      <Position>36</Position>
    </Report>
    <Report instance="unfi-20210731.htm">
      <IsDefault>false</IsDefault>
      <HasEmbeddedReports>false</HasEmbeddedReports>
      <HtmlFileName>R37.htm</HtmlFileName>
      <LongName>230583010 - Disclosure - LEASES (Tables)</LongName>
      <ReportType>Sheet</ReportType>
      <Role>http://www.unfi.com/role/LEASESTables</Role>
      <ShortName>LEASES (Tables)</ShortName>
      <MenuCategory>Tables</MenuCategory>
      <ParentRole>http://www.unfi.com/role/LEASES</ParentRole>
      <Position>37</Position>
    </Report>
    <Report instance="unfi-20210731.htm">
      <IsDefault>false</IsDefault>
      <HasEmbeddedReports>false</HasEmbeddedReports>
      <HtmlFileName>R38.htm</HtmlFileName>
      <LongName>230663011 - Disclosure - SHARE-BASED AWARDS (Tables)</LongName>
      <ReportType>Sheet</ReportType>
      <Role>http://www.unfi.com/role/SHAREBASEDAWARDSTables</Role>
      <ShortName>SHARE-BASED AWARDS (Tables)</ShortName>
      <MenuCategory>Tables</MenuCategory>
      <ParentRole>http://www.unfi.com/role/SHAREBASEDAWARDS</ParentRole>
      <Position>38</Position>
    </Report>
    <Report instance="unfi-20210731.htm">
      <IsDefault>false</IsDefault>
      <HasEmbeddedReports>false</HasEmbeddedReports>
      <HtmlFileName>R39.htm</HtmlFileName>
      <LongName>230743012 - Disclosure - BENEFIT PLANS (Tables)</LongName>
      <ReportType>Sheet</ReportType>
      <Role>http://www.unfi.com/role/BENEFITPLANSTables</Role>
      <ShortName>BENEFIT PLANS (Tables)</ShortName>
      <MenuCategory>Tables</MenuCategory>
      <ParentRole>http://www.unfi.com/role/BENEFITPLANS</ParentRole>
      <Position>39</Position>
    </Report>
    <Report instance="unfi-20210731.htm">
      <IsDefault>false</IsDefault>
      <HasEmbeddedReports>false</HasEmbeddedReports>
      <HtmlFileName>R40.htm</HtmlFileName>
      <LongName>230923013 - Disclosure - INCOME TAXES (Tables)</LongName>
      <ReportType>Sheet</ReportType>
      <Role>http://www.unfi.com/role/INCOMETAXESTables</Role>
      <ShortName>INCOME TAXES (Tables)</ShortName>
      <MenuCategory>Tables</MenuCategory>
      <ParentRole>http://www.unfi.com/role/INCOMETAXES</ParentRole>
      <Position>40</Position>
    </Report>
    <Report instance="unfi-20210731.htm">
      <IsDefault>false</IsDefault>
      <HasEmbeddedReports>false</HasEmbeddedReports>
      <HtmlFileName>R41.htm</HtmlFileName>
      <LongName>231043014 - Disclosure - EARNING PER SHARE (Tables)</LongName>
      <ReportType>Sheet</ReportType>
      <Role>http://www.unfi.com/role/EARNINGPERSHARETables</Role>
      <ShortName>EARNING PER SHARE (Tables)</ShortName>
      <MenuCategory>Tables</MenuCategory>
      <Position>41</Position>
    </Report>
    <Report instance="unfi-20210731.htm">
      <IsDefault>false</IsDefault>
      <HasEmbeddedReports>false</HasEmbeddedReports>
      <HtmlFileName>R42.htm</HtmlFileName>
      <LongName>231073015 - Disclosure - BUSINESS SEGMENTS (Tables)</LongName>
      <ReportType>Sheet</ReportType>
      <Role>http://www.unfi.com/role/BUSINESSSEGMENTSTables</Role>
      <ShortName>BUSINESS SEGMENTS (Tables)</ShortName>
      <MenuCategory>Tables</MenuCategory>
      <ParentRole>http://www.unfi.com/role/BUSINESSSEGMENTS</ParentRole>
      <Position>42</Position>
    </Report>
    <Report instance="unfi-20210731.htm">
      <IsDefault>false</IsDefault>
      <HasEmbeddedReports>false</HasEmbeddedReports>
      <HtmlFileName>R43.htm</HtmlFileName>
      <LongName>231143016 - Disclosure - DISCONTINUED OPERATIONS (Tables)</LongName>
      <ReportType>Sheet</ReportType>
      <Role>http://www.unfi.com/role/DISCONTINUEDOPERATIONSTables</Role>
      <ShortName>DISCONTINUED OPERATIONS (Tables)</ShortName>
      <MenuCategory>Tables</MenuCategory>
      <ParentRole>http://www.unfi.com/role/DISCONTINUEDOPERATIONS</ParentRole>
      <Position>43</Position>
    </Report>
    <Report instance="unfi-20210731.htm">
      <IsDefault>false</IsDefault>
      <HasEmbeddedReports>false</HasEmbeddedReports>
      <HtmlFileName>R44.htm</HtmlFileName>
      <LongName>240044001 - Disclosure - SIGNIFICANT ACCOUNTING POLICIES - Discontinued Operations (Details)</LongName>
      <ReportType>Sheet</ReportType>
      <Role>http://www.unfi.com/role/SIGNIFICANTACCOUNTINGPOLICIESDiscontinuedOperationsDetails</Role>
      <ShortName>SIGNIFICANT ACCOUNTING POLICIES - Discontinued Operations (Details)</ShortName>
      <MenuCategory>Details</MenuCategory>
      <Position>44</Position>
    </Report>
    <Report instance="unfi-20210731.htm">
      <IsDefault>false</IsDefault>
      <HasEmbeddedReports>false</HasEmbeddedReports>
      <HtmlFileName>R45.htm</HtmlFileName>
      <LongName>240054002 - Disclosure - SIGNIFICANT ACCOUNTING POLICIES - Cost of Sales (Details)</LongName>
      <ReportType>Sheet</ReportType>
      <Role>http://www.unfi.com/role/SIGNIFICANTACCOUNTINGPOLICIESCostofSalesDetails</Role>
      <ShortName>SIGNIFICANT ACCOUNTING POLICIES - Cost of Sales (Details)</ShortName>
      <MenuCategory>Details</MenuCategory>
      <Position>45</Position>
    </Report>
    <Report instance="unfi-20210731.htm">
      <IsDefault>false</IsDefault>
      <HasEmbeddedReports>false</HasEmbeddedReports>
      <HtmlFileName>R46.htm</HtmlFileName>
      <LongName>240064003 - Disclosure - SIGNIFICANT ACCOUNTING POLICIES - (Gain) Loss on Sale of Assets (Details)</LongName>
      <ReportType>Sheet</ReportType>
      <Role>http://www.unfi.com/role/SIGNIFICANTACCOUNTINGPOLICIESGainLossonSaleofAssetsDetails</Role>
      <ShortName>SIGNIFICANT ACCOUNTING POLICIES - (Gain) Loss on Sale of Assets (Details)</ShortName>
      <MenuCategory>Details</MenuCategory>
      <ParentRole>http://www.unfi.com/role/SIGNIFICANTACCOUNTINGPOLICIESTables</ParentRole>
      <Position>46</Position>
    </Report>
    <Report instance="unfi-20210731.htm">
      <IsDefault>false</IsDefault>
      <HasEmbeddedReports>false</HasEmbeddedReports>
      <HtmlFileName>R47.htm</HtmlFileName>
      <LongName>240074004 - Disclosure - SIGNIFICANT ACCOUNTING POLICIES - Cash and Cash Equivalents (Details)</LongName>
      <ReportType>Sheet</ReportType>
      <Role>http://www.unfi.com/role/SIGNIFICANTACCOUNTINGPOLICIESCashandCashEquivalentsDetails</Role>
      <ShortName>SIGNIFICANT ACCOUNTING POLICIES - Cash and Cash Equivalents (Details)</ShortName>
      <MenuCategory>Details</MenuCategory>
      <Position>47</Position>
    </Report>
    <Report instance="unfi-20210731.htm">
      <IsDefault>false</IsDefault>
      <HasEmbeddedReports>false</HasEmbeddedReports>
      <HtmlFileName>R48.htm</HtmlFileName>
      <LongName>240084005 - Disclosure - SIGNIFICANT ACCOUNTING POLICIES - Inventories, Net (Details)</LongName>
      <ReportType>Sheet</ReportType>
      <Role>http://www.unfi.com/role/SIGNIFICANTACCOUNTINGPOLICIESInventoriesNetDetails</Role>
      <ShortName>SIGNIFICANT ACCOUNTING POLICIES - Inventories, Net (Details)</ShortName>
      <MenuCategory>Details</MenuCategory>
      <Position>48</Position>
    </Report>
    <Report instance="unfi-20210731.htm">
      <IsDefault>false</IsDefault>
      <HasEmbeddedReports>false</HasEmbeddedReports>
      <HtmlFileName>R49.htm</HtmlFileName>
      <LongName>240094006 - Disclosure - SIGNIFICANT ACCOUNTING POLICIES - Intangible Assets With Definite Lives (Details)</LongName>
      <ReportType>Sheet</ReportType>
      <Role>http://www.unfi.com/role/SIGNIFICANTACCOUNTINGPOLICIESIntangibleAssetsWithDefiniteLivesDetails</Role>
      <ShortName>SIGNIFICANT ACCOUNTING POLICIES - Intangible Assets With Definite Lives (Details)</ShortName>
      <MenuCategory>Details</MenuCategory>
      <Position>49</Position>
    </Report>
    <Report instance="unfi-20210731.htm">
      <IsDefault>false</IsDefault>
      <HasEmbeddedReports>false</HasEmbeddedReports>
      <HtmlFileName>R50.htm</HtmlFileName>
      <LongName>240104007 - Disclosure - SIGNIFICANT ACCOUNTING POLICIES - Treasury Stock (Details)</LongName>
      <ReportType>Sheet</ReportType>
      <Role>http://www.unfi.com/role/SIGNIFICANTACCOUNTINGPOLICIESTreasuryStockDetails</Role>
      <ShortName>SIGNIFICANT ACCOUNTING POLICIES - Treasury Stock (Details)</ShortName>
      <MenuCategory>Details</MenuCategory>
      <Position>50</Position>
    </Report>
    <Report instance="unfi-20210731.htm">
      <IsDefault>false</IsDefault>
      <HasEmbeddedReports>false</HasEmbeddedReports>
      <HtmlFileName>R51.htm</HtmlFileName>
      <LongName>240114008 - Disclosure - SIGNIFICANT ACCOUNTING POLICIES - Self Insurance Liabilities, Narrative (Details)</LongName>
      <ReportType>Sheet</ReportType>
      <Role>http://www.unfi.com/role/SIGNIFICANTACCOUNTINGPOLICIESSelfInsuranceLiabilitiesNarrativeDetails</Role>
      <ShortName>SIGNIFICANT ACCOUNTING POLICIES - Self Insurance Liabilities, Narrative (Details)</ShortName>
      <MenuCategory>Details</MenuCategory>
      <Position>51</Position>
    </Report>
    <Report instance="unfi-20210731.htm">
      <IsDefault>false</IsDefault>
      <HasEmbeddedReports>false</HasEmbeddedReports>
      <HtmlFileName>R52.htm</HtmlFileName>
      <LongName>240124009 - Disclosure - SIGNIFICANT ACCOUNTING POLICIES - Changes in Insurance Liabilities (Details)</LongName>
      <ReportType>Sheet</ReportType>
      <Role>http://www.unfi.com/role/SIGNIFICANTACCOUNTINGPOLICIESChangesinInsuranceLiabilitiesDetails</Role>
      <ShortName>SIGNIFICANT ACCOUNTING POLICIES - Changes in Insurance Liabilities (Details)</ShortName>
      <MenuCategory>Details</MenuCategory>
      <Position>52</Position>
    </Report>
    <Report instance="unfi-20210731.htm">
      <IsDefault>false</IsDefault>
      <HasEmbeddedReports>false</HasEmbeddedReports>
      <HtmlFileName>R53.htm</HtmlFileName>
      <LongName>240164010 - Disclosure - REVENUE RECOGNITION - Disaggregation of Revenue (Details)</LongName>
      <ReportType>Sheet</ReportType>
      <Role>http://www.unfi.com/role/REVENUERECOGNITIONDisaggregationofRevenueDetails</Role>
      <ShortName>REVENUE RECOGNITION - Disaggregation of Revenue (Details)</ShortName>
      <MenuCategory>Details</MenuCategory>
      <Position>53</Position>
    </Report>
    <Report instance="unfi-20210731.htm">
      <IsDefault>false</IsDefault>
      <HasEmbeddedReports>false</HasEmbeddedReports>
      <HtmlFileName>R54.htm</HtmlFileName>
      <LongName>240174011 - Disclosure - REVENUE RECOGNITION - Narrative (Details)</LongName>
      <ReportType>Sheet</ReportType>
      <Role>http://www.unfi.com/role/REVENUERECOGNITIONNarrativeDetails</Role>
      <ShortName>REVENUE RECOGNITION - Narrative (Details)</ShortName>
      <MenuCategory>Details</MenuCategory>
      <Position>54</Position>
    </Report>
    <Report instance="unfi-20210731.htm">
      <IsDefault>false</IsDefault>
      <HasEmbeddedReports>false</HasEmbeddedReports>
      <HtmlFileName>R55.htm</HtmlFileName>
      <LongName>240184012 - Disclosure - REVENUE RECOGNITION - Accounts and Notes Receivable (Details)</LongName>
      <ReportType>Notes</ReportType>
      <Role>http://www.unfi.com/role/REVENUERECOGNITIONAccountsandNotesReceivableDetails</Role>
      <ShortName>REVENUE RECOGNITION - Accounts and Notes Receivable (Details)</ShortName>
      <MenuCategory>Details</MenuCategory>
      <Position>55</Position>
    </Report>
    <Report instance="unfi-20210731.htm">
      <IsDefault>false</IsDefault>
      <HasEmbeddedReports>false</HasEmbeddedReports>
      <HtmlFileName>R56.htm</HtmlFileName>
      <LongName>240194013 - Disclosure - REVENUE RECOGNITION - Allowance for Uncollectible Receivables (Details)</LongName>
      <ReportType>Sheet</ReportType>
      <Role>http://www.unfi.com/role/REVENUERECOGNITIONAllowanceforUncollectibleReceivablesDetails</Role>
      <ShortName>REVENUE RECOGNITION - Allowance for Uncollectible Receivables (Details)</ShortName>
      <MenuCategory>Details</MenuCategory>
      <Position>56</Position>
    </Report>
    <Report instance="unfi-20210731.htm">
      <IsDefault>false</IsDefault>
      <HasEmbeddedReports>false</HasEmbeddedReports>
      <HtmlFileName>R57.htm</HtmlFileName>
      <LongName>240224014 - Disclosure - RESTRUCTURING, ACQUISITION AND INTEGRATION RELATED EXPENSES (Details)</LongName>
      <ReportType>Sheet</ReportType>
      <Role>http://www.unfi.com/role/RESTRUCTURINGACQUISITIONANDINTEGRATIONRELATEDEXPENSESDetails</Role>
      <ShortName>RESTRUCTURING, ACQUISITION AND INTEGRATION RELATED EXPENSES (Details)</ShortName>
      <MenuCategory>Details</MenuCategory>
      <ParentRole>http://www.unfi.com/role/RESTRUCTURINGACQUISITIONANDINTEGRATIONRELATEDEXPENSESTables</ParentRole>
      <Position>57</Position>
    </Report>
    <Report instance="unfi-20210731.htm">
      <IsDefault>false</IsDefault>
      <HasEmbeddedReports>false</HasEmbeddedReports>
      <HtmlFileName>R58.htm</HtmlFileName>
      <LongName>240254015 - Disclosure - PROPERTY AND EQUIPMENT, NET - Property and Equipment, Net (Details)</LongName>
      <ReportType>Sheet</ReportType>
      <Role>http://www.unfi.com/role/PROPERTYANDEQUIPMENTNETPropertyandEquipmentNetDetails</Role>
      <ShortName>PROPERTY AND EQUIPMENT, NET - Property and Equipment, Net (Details)</ShortName>
      <MenuCategory>Details</MenuCategory>
      <Position>58</Position>
    </Report>
    <Report instance="unfi-20210731.htm">
      <IsDefault>false</IsDefault>
      <HasEmbeddedReports>false</HasEmbeddedReports>
      <HtmlFileName>R59.htm</HtmlFileName>
      <LongName>240264016 - Disclosure - PROPERTY AND EQUIPMENT, NET - Narrative (Details)</LongName>
      <ReportType>Sheet</ReportType>
      <Role>http://www.unfi.com/role/PROPERTYANDEQUIPMENTNETNarrativeDetails</Role>
      <ShortName>PROPERTY AND EQUIPMENT, NET - Narrative (Details)</ShortName>
      <MenuCategory>Details</MenuCategory>
      <Position>59</Position>
    </Report>
    <Report instance="unfi-20210731.htm">
      <IsDefault>false</IsDefault>
      <HasEmbeddedReports>false</HasEmbeddedReports>
      <HtmlFileName>R60.htm</HtmlFileName>
      <LongName>240294017 - Disclosure - GOODWILL AND INTANGIBLE ASSETS, NET - Narrative (Details)</LongName>
      <ReportType>Sheet</ReportType>
      <Role>http://www.unfi.com/role/GOODWILLANDINTANGIBLEASSETSNETNarrativeDetails</Role>
      <ShortName>GOODWILL AND INTANGIBLE ASSETS, NET - Narrative (Details)</ShortName>
      <MenuCategory>Details</MenuCategory>
      <Position>60</Position>
    </Report>
    <Report instance="unfi-20210731.htm">
      <IsDefault>false</IsDefault>
      <HasEmbeddedReports>false</HasEmbeddedReports>
      <HtmlFileName>R61.htm</HtmlFileName>
      <LongName>240304018 - Disclosure - GOODWILL AND INTANGIBLE ASSETS, NET - Goodwill and Intangible Assets Changes (Details)</LongName>
      <ReportType>Sheet</ReportType>
      <Role>http://www.unfi.com/role/GOODWILLANDINTANGIBLEASSETSNETGoodwillandIntangibleAssetsChangesDetails</Role>
      <ShortName>GOODWILL AND INTANGIBLE ASSETS, NET - Goodwill and Intangible Assets Changes (Details)</ShortName>
      <MenuCategory>Details</MenuCategory>
      <Position>61</Position>
    </Report>
    <Report instance="unfi-20210731.htm">
      <IsDefault>false</IsDefault>
      <HasEmbeddedReports>false</HasEmbeddedReports>
      <HtmlFileName>R62.htm</HtmlFileName>
      <LongName>240314019 - Disclosure - GOODWILL AND INTANGIBLE ASSETS, NET - Identifiable Intangible Assets (Details)</LongName>
      <ReportType>Sheet</ReportType>
      <Role>http://www.unfi.com/role/GOODWILLANDINTANGIBLEASSETSNETIdentifiableIntangibleAssetsDetails</Role>
      <ShortName>GOODWILL AND INTANGIBLE ASSETS, NET - Identifiable Intangible Assets (Details)</ShortName>
      <MenuCategory>Details</MenuCategory>
      <Position>62</Position>
    </Report>
    <Report instance="unfi-20210731.htm">
      <IsDefault>false</IsDefault>
      <HasEmbeddedReports>false</HasEmbeddedReports>
      <HtmlFileName>R63.htm</HtmlFileName>
      <LongName>240324020 - Disclosure - GOODWILL AND INTANGIBLE ASSETS, NET - Estimated Future Amortization Expense (Details)</LongName>
      <ReportType>Sheet</ReportType>
      <Role>http://www.unfi.com/role/GOODWILLANDINTANGIBLEASSETSNETEstimatedFutureAmortizationExpenseDetails</Role>
      <ShortName>GOODWILL AND INTANGIBLE ASSETS, NET - Estimated Future Amortization Expense (Details)</ShortName>
      <MenuCategory>Details</MenuCategory>
      <Position>63</Position>
    </Report>
    <Report instance="unfi-20210731.htm">
      <IsDefault>false</IsDefault>
      <HasEmbeddedReports>false</HasEmbeddedReports>
      <HtmlFileName>R64.htm</HtmlFileName>
      <LongName>240354021 - Disclosure - FAIR VALUE MEASUREMENTS OF FINANCIAL INSTRUMENTS - Recurring Fair Value Measurements (Details)</LongName>
      <ReportType>Sheet</ReportType>
      <Role>http://www.unfi.com/role/FAIRVALUEMEASUREMENTSOFFINANCIALINSTRUMENTSRecurringFairValueMeasurementsDetails</Role>
      <ShortName>FAIR VALUE MEASUREMENTS OF FINANCIAL INSTRUMENTS - Recurring Fair Value Measurements (Details)</ShortName>
      <MenuCategory>Details</MenuCategory>
      <Position>64</Position>
    </Report>
    <Report instance="unfi-20210731.htm">
      <IsDefault>false</IsDefault>
      <HasEmbeddedReports>false</HasEmbeddedReports>
      <HtmlFileName>R65.htm</HtmlFileName>
      <LongName>240364022 - Disclosure - FAIR VALUE MEASUREMENTS OF FINANCIAL INSTRUMENTS - Narrative (Details)</LongName>
      <ReportType>Sheet</ReportType>
      <Role>http://www.unfi.com/role/FAIRVALUEMEASUREMENTSOFFINANCIALINSTRUMENTSNarrativeDetails</Role>
      <ShortName>FAIR VALUE MEASUREMENTS OF FINANCIAL INSTRUMENTS - Narrative (Details)</ShortName>
      <MenuCategory>Details</MenuCategory>
      <ParentRole>http://www.unfi.com/role/FAIRVALUEMEASUREMENTSOFFINANCIALINSTRUMENTSTables</ParentRole>
      <Position>65</Position>
    </Report>
    <Report instance="unfi-20210731.htm">
      <IsDefault>false</IsDefault>
      <HasEmbeddedReports>false</HasEmbeddedReports>
      <HtmlFileName>R66.htm</HtmlFileName>
      <LongName>240374023 - Disclosure - FAIR VALUE MEASUREMENTS OF FINANCIAL INSTRUMENTS - Fair Value Estimates (Details)</LongName>
      <ReportType>Sheet</ReportType>
      <Role>http://www.unfi.com/role/FAIRVALUEMEASUREMENTSOFFINANCIALINSTRUMENTSFairValueEstimatesDetails</Role>
      <ShortName>FAIR VALUE MEASUREMENTS OF FINANCIAL INSTRUMENTS - Fair Value Estimates (Details)</ShortName>
      <MenuCategory>Details</MenuCategory>
      <Position>66</Position>
    </Report>
    <Report instance="unfi-20210731.htm">
      <IsDefault>false</IsDefault>
      <HasEmbeddedReports>false</HasEmbeddedReports>
      <HtmlFileName>R67.htm</HtmlFileName>
      <LongName>240404024 - Disclosure - DERIVATIVES - Outstanding Swap Contracts (Details)</LongName>
      <ReportType>Sheet</ReportType>
      <Role>http://www.unfi.com/role/DERIVATIVESOutstandingSwapContractsDetails</Role>
      <ShortName>DERIVATIVES - Outstanding Swap Contracts (Details)</ShortName>
      <MenuCategory>Details</MenuCategory>
      <Position>67</Position>
    </Report>
    <Report instance="unfi-20210731.htm">
      <IsDefault>false</IsDefault>
      <HasEmbeddedReports>false</HasEmbeddedReports>
      <HtmlFileName>R68.htm</HtmlFileName>
      <LongName>240414025 - Disclosure - DERIVATIVES - Narrative (Details)</LongName>
      <ReportType>Sheet</ReportType>
      <Role>http://www.unfi.com/role/DERIVATIVESNarrativeDetails</Role>
      <ShortName>DERIVATIVES - Narrative (Details)</ShortName>
      <MenuCategory>Details</MenuCategory>
      <Position>68</Position>
    </Report>
    <Report instance="unfi-20210731.htm">
      <IsDefault>false</IsDefault>
      <HasEmbeddedReports>false</HasEmbeddedReports>
      <HtmlFileName>R69.htm</HtmlFileName>
      <LongName>240424026 - Disclosure - DERIVATIVES - Interest Rate Swap Contracts (Details)</LongName>
      <ReportType>Sheet</ReportType>
      <Role>http://www.unfi.com/role/DERIVATIVESInterestRateSwapContractsDetails</Role>
      <ShortName>DERIVATIVES - Interest Rate Swap Contracts (Details)</ShortName>
      <MenuCategory>Details</MenuCategory>
      <Position>69</Position>
    </Report>
    <Report instance="unfi-20210731.htm">
      <IsDefault>false</IsDefault>
      <HasEmbeddedReports>false</HasEmbeddedReports>
      <HtmlFileName>R70.htm</HtmlFileName>
      <LongName>240454027 - Disclosure - LONG-TERM DEBT - Schedule of Long-term Debt (Details)</LongName>
      <ReportType>Sheet</ReportType>
      <Role>http://www.unfi.com/role/LONGTERMDEBTScheduleofLongtermDebtDetails</Role>
      <ShortName>LONG-TERM DEBT - Schedule of Long-term Debt (Details)</ShortName>
      <MenuCategory>Details</MenuCategory>
      <Position>70</Position>
    </Report>
    <Report instance="unfi-20210731.htm">
      <IsDefault>false</IsDefault>
      <HasEmbeddedReports>false</HasEmbeddedReports>
      <HtmlFileName>R71.htm</HtmlFileName>
      <LongName>240464028 - Disclosure - LONG-TERM DEBT - Schedule of Maturities of Long-term Debt (Details)</LongName>
      <ReportType>Sheet</ReportType>
      <Role>http://www.unfi.com/role/LONGTERMDEBTScheduleofMaturitiesofLongtermDebtDetails</Role>
      <ShortName>LONG-TERM DEBT - Schedule of Maturities of Long-term Debt (Details)</ShortName>
      <MenuCategory>Details</MenuCategory>
      <Position>71</Position>
    </Report>
    <Report instance="unfi-20210731.htm">
      <IsDefault>false</IsDefault>
      <HasEmbeddedReports>false</HasEmbeddedReports>
      <HtmlFileName>R72.htm</HtmlFileName>
      <LongName>240474029 - Disclosure - LONG-TERM DEBT - Refinancing Activities (Details)</LongName>
      <ReportType>Sheet</ReportType>
      <Role>http://www.unfi.com/role/LONGTERMDEBTRefinancingActivitiesDetails</Role>
      <ShortName>LONG-TERM DEBT - Refinancing Activities (Details)</ShortName>
      <MenuCategory>Details</MenuCategory>
      <Position>72</Position>
    </Report>
    <Report instance="unfi-20210731.htm">
      <IsDefault>false</IsDefault>
      <HasEmbeddedReports>false</HasEmbeddedReports>
      <HtmlFileName>R73.htm</HtmlFileName>
      <LongName>240484030 - Disclosure - LONG-TERM DEBT - Senior Notes (Details)</LongName>
      <ReportType>Notes</ReportType>
      <Role>http://www.unfi.com/role/LONGTERMDEBTSeniorNotesDetails</Role>
      <ShortName>LONG-TERM DEBT - Senior Notes (Details)</ShortName>
      <MenuCategory>Details</MenuCategory>
      <Position>73</Position>
    </Report>
    <Report instance="unfi-20210731.htm">
      <IsDefault>false</IsDefault>
      <HasEmbeddedReports>false</HasEmbeddedReports>
      <HtmlFileName>R74.htm</HtmlFileName>
      <LongName>240494031 - Disclosure - LONG-TERM DEBT - ABL Credit Facility (Details)</LongName>
      <ReportType>Sheet</ReportType>
      <Role>http://www.unfi.com/role/LONGTERMDEBTABLCreditFacilityDetails</Role>
      <ShortName>LONG-TERM DEBT - ABL Credit Facility (Details)</ShortName>
      <MenuCategory>Details</MenuCategory>
      <Position>74</Position>
    </Report>
    <Report instance="unfi-20210731.htm">
      <IsDefault>false</IsDefault>
      <HasEmbeddedReports>false</HasEmbeddedReports>
      <HtmlFileName>R75.htm</HtmlFileName>
      <LongName>240504032 - Disclosure - LONG-TERM DEBT - Line of Credit Facilities (Details)</LongName>
      <ReportType>Sheet</ReportType>
      <Role>http://www.unfi.com/role/LONGTERMDEBTLineofCreditFacilitiesDetails</Role>
      <ShortName>LONG-TERM DEBT - Line of Credit Facilities (Details)</ShortName>
      <MenuCategory>Details</MenuCategory>
      <Position>75</Position>
    </Report>
    <Report instance="unfi-20210731.htm">
      <IsDefault>false</IsDefault>
      <HasEmbeddedReports>false</HasEmbeddedReports>
      <HtmlFileName>R76.htm</HtmlFileName>
      <LongName>240514033 - Disclosure - LONG-TERM DEBT - Term Loan Facility (Details)</LongName>
      <ReportType>Sheet</ReportType>
      <Role>http://www.unfi.com/role/LONGTERMDEBTTermLoanFacilityDetails</Role>
      <ShortName>LONG-TERM DEBT - Term Loan Facility (Details)</ShortName>
      <MenuCategory>Details</MenuCategory>
      <Position>76</Position>
    </Report>
    <Report instance="unfi-20210731.htm">
      <IsDefault>false</IsDefault>
      <HasEmbeddedReports>false</HasEmbeddedReports>
      <HtmlFileName>R77.htm</HtmlFileName>
      <LongName>240544034 - Disclosure - COMPREHENSIVE INCOME (LOSS) AND ACCUMULATED OTHER COMPREHENSIVE LOSS - Changes by Component (Details)</LongName>
      <ReportType>Sheet</ReportType>
      <Role>http://www.unfi.com/role/COMPREHENSIVEINCOMELOSSANDACCUMULATEDOTHERCOMPREHENSIVELOSSChangesbyComponentDetails</Role>
      <ShortName>COMPREHENSIVE INCOME (LOSS) AND ACCUMULATED OTHER COMPREHENSIVE LOSS - Changes by Component (Details)</ShortName>
      <MenuCategory>Details</MenuCategory>
      <ParentRole>http://www.unfi.com/role/COMPREHENSIVEINCOMELOSSANDACCUMULATEDOTHERCOMPREHENSIVELOSSTables</ParentRole>
      <Position>77</Position>
    </Report>
    <Report instance="unfi-20210731.htm">
      <IsDefault>false</IsDefault>
      <HasEmbeddedReports>false</HasEmbeddedReports>
      <HtmlFileName>R78.htm</HtmlFileName>
      <LongName>240554035 - Disclosure - COMPREHENSIVE INCOME (LOSS) AND ACCUMULATED OTHER COMPREHENSIVE LOSS - Reclassification out of Other Comprehensive Loss (Details)</LongName>
      <ReportType>Sheet</ReportType>
      <Role>http://www.unfi.com/role/COMPREHENSIVEINCOMELOSSANDACCUMULATEDOTHERCOMPREHENSIVELOSSReclassificationoutofOtherComprehensiveLossDetails</Role>
      <ShortName>COMPREHENSIVE INCOME (LOSS) AND ACCUMULATED OTHER COMPREHENSIVE LOSS - Reclassification out of Other Comprehensive Loss (Details)</ShortName>
      <MenuCategory>Details</MenuCategory>
      <ParentRole>http://www.unfi.com/role/COMPREHENSIVEINCOMELOSSANDACCUMULATEDOTHERCOMPREHENSIVELOSSTables</ParentRole>
      <Position>78</Position>
    </Report>
    <Report instance="unfi-20210731.htm">
      <IsDefault>false</IsDefault>
      <HasEmbeddedReports>false</HasEmbeddedReports>
      <HtmlFileName>R79.htm</HtmlFileName>
      <LongName>240564036 - Disclosure - COMPREHENSIVE INCOME (LOSS) AND ACCUMULATED OTHER COMPREHENSIVE LOSS - Narrative (Details)</LongName>
      <ReportType>Sheet</ReportType>
      <Role>http://www.unfi.com/role/COMPREHENSIVEINCOMELOSSANDACCUMULATEDOTHERCOMPREHENSIVELOSSNarrativeDetails</Role>
      <ShortName>COMPREHENSIVE INCOME (LOSS) AND ACCUMULATED OTHER COMPREHENSIVE LOSS - Narrative (Details)</ShortName>
      <MenuCategory>Details</MenuCategory>
      <ParentRole>http://www.unfi.com/role/COMPREHENSIVEINCOMELOSSANDACCUMULATEDOTHERCOMPREHENSIVELOSSTables</ParentRole>
      <Position>79</Position>
    </Report>
    <Report instance="unfi-20210731.htm">
      <IsDefault>false</IsDefault>
      <HasEmbeddedReports>false</HasEmbeddedReports>
      <HtmlFileName>R80.htm</HtmlFileName>
      <LongName>240594037 - Disclosure - LEASES - Lease Assets and Liabilities (Details)</LongName>
      <ReportType>Sheet</ReportType>
      <Role>http://www.unfi.com/role/LEASESLeaseAssetsandLiabilitiesDetails</Role>
      <ShortName>LEASES - Lease Assets and Liabilities (Details)</ShortName>
      <MenuCategory>Details</MenuCategory>
      <Position>80</Position>
    </Report>
    <Report instance="unfi-20210731.htm">
      <IsDefault>false</IsDefault>
      <HasEmbeddedReports>false</HasEmbeddedReports>
      <HtmlFileName>R81.htm</HtmlFileName>
      <LongName>240604038 - Disclosure - LEASES - Lease Cost (Details)</LongName>
      <ReportType>Sheet</ReportType>
      <Role>http://www.unfi.com/role/LEASESLeaseCostDetails</Role>
      <ShortName>LEASES - Lease Cost (Details)</ShortName>
      <MenuCategory>Details</MenuCategory>
      <Position>81</Position>
    </Report>
    <Report instance="unfi-20210731.htm">
      <IsDefault>false</IsDefault>
      <HasEmbeddedReports>false</HasEmbeddedReports>
      <HtmlFileName>R82.htm</HtmlFileName>
      <LongName>240614039 - Disclosure - LEASES - Rent Expense (Details)</LongName>
      <ReportType>Sheet</ReportType>
      <Role>http://www.unfi.com/role/LEASESRentExpenseDetails</Role>
      <ShortName>LEASES - Rent Expense (Details)</ShortName>
      <MenuCategory>Details</MenuCategory>
      <Position>82</Position>
    </Report>
    <Report instance="unfi-20210731.htm">
      <IsDefault>false</IsDefault>
      <HasEmbeddedReports>false</HasEmbeddedReports>
      <HtmlFileName>R83.htm</HtmlFileName>
      <LongName>240624040 - Disclosure - LEASES - Narrative (Details)</LongName>
      <ReportType>Sheet</ReportType>
      <Role>http://www.unfi.com/role/LEASESNarrativeDetails</Role>
      <ShortName>LEASES - Narrative (Details)</ShortName>
      <MenuCategory>Details</MenuCategory>
      <Position>83</Position>
    </Report>
    <Report instance="unfi-20210731.htm">
      <IsDefault>false</IsDefault>
      <HasEmbeddedReports>false</HasEmbeddedReports>
      <HtmlFileName>R84.htm</HtmlFileName>
      <LongName>240634041 - Disclosure - LEASES - Future Minimum Lease Payments and Lease Receipts (Details)</LongName>
      <ReportType>Sheet</ReportType>
      <Role>http://www.unfi.com/role/LEASESFutureMinimumLeasePaymentsandLeaseReceiptsDetails</Role>
      <ShortName>LEASES - Future Minimum Lease Payments and Lease Receipts (Details)</ShortName>
      <MenuCategory>Details</MenuCategory>
      <Position>84</Position>
    </Report>
    <Report instance="unfi-20210731.htm">
      <IsDefault>false</IsDefault>
      <HasEmbeddedReports>false</HasEmbeddedReports>
      <HtmlFileName>R85.htm</HtmlFileName>
      <LongName>240644042 - Disclosure - LEASES - Schedule of Other Information Related to Leases (Details)</LongName>
      <ReportType>Sheet</ReportType>
      <Role>http://www.unfi.com/role/LEASESScheduleofOtherInformationRelatedtoLeasesDetails</Role>
      <ShortName>LEASES - Schedule of Other Information Related to Leases (Details)</ShortName>
      <MenuCategory>Details</MenuCategory>
      <Position>85</Position>
    </Report>
    <Report instance="unfi-20210731.htm">
      <IsDefault>false</IsDefault>
      <HasEmbeddedReports>false</HasEmbeddedReports>
      <HtmlFileName>R86.htm</HtmlFileName>
      <LongName>240674043 - Disclosure - SHARE-BASED AWARDS - Additional Information (Details)</LongName>
      <ReportType>Sheet</ReportType>
      <Role>http://www.unfi.com/role/SHAREBASEDAWARDSAdditionalInformationDetails</Role>
      <ShortName>SHARE-BASED AWARDS - Additional Information (Details)</ShortName>
      <MenuCategory>Details</MenuCategory>
      <Position>86</Position>
    </Report>
    <Report instance="unfi-20210731.htm">
      <IsDefault>false</IsDefault>
      <HasEmbeddedReports>false</HasEmbeddedReports>
      <HtmlFileName>R87.htm</HtmlFileName>
      <LongName>240684044 - Disclosure - SHARE-BASED AWARDS - Share-Based Compensation Expense (Details)</LongName>
      <ReportType>Sheet</ReportType>
      <Role>http://www.unfi.com/role/SHAREBASEDAWARDSShareBasedCompensationExpenseDetails</Role>
      <ShortName>SHARE-BASED AWARDS - Share-Based Compensation Expense (Details)</ShortName>
      <MenuCategory>Details</MenuCategory>
      <Position>87</Position>
    </Report>
    <Report instance="unfi-20210731.htm">
      <IsDefault>false</IsDefault>
      <HasEmbeddedReports>false</HasEmbeddedReports>
      <HtmlFileName>R88.htm</HtmlFileName>
      <LongName>240694045 - Disclosure - SHARE-BASED AWARDS - Restricted Stock Awards (Details)</LongName>
      <ReportType>Sheet</ReportType>
      <Role>http://www.unfi.com/role/SHAREBASEDAWARDSRestrictedStockAwardsDetails</Role>
      <ShortName>SHARE-BASED AWARDS - Restricted Stock Awards (Details)</ShortName>
      <MenuCategory>Details</MenuCategory>
      <Position>88</Position>
    </Report>
    <Report instance="unfi-20210731.htm">
      <IsDefault>false</IsDefault>
      <HasEmbeddedReports>false</HasEmbeddedReports>
      <HtmlFileName>R89.htm</HtmlFileName>
      <LongName>240704046 - Disclosure - SHARE-BASED AWARDS - Performance-Based Share Awards (Details)</LongName>
      <ReportType>Sheet</ReportType>
      <Role>http://www.unfi.com/role/SHAREBASEDAWARDSPerformanceBasedShareAwardsDetails</Role>
      <ShortName>SHARE-BASED AWARDS - Performance-Based Share Awards (Details)</ShortName>
      <MenuCategory>Details</MenuCategory>
      <Position>89</Position>
    </Report>
    <Report instance="unfi-20210731.htm">
      <IsDefault>false</IsDefault>
      <HasEmbeddedReports>false</HasEmbeddedReports>
      <HtmlFileName>R90.htm</HtmlFileName>
      <LongName>240714047 - Disclosure - SHARE-BASED AWARDS - Stock Options (Details)</LongName>
      <ReportType>Sheet</ReportType>
      <Role>http://www.unfi.com/role/SHAREBASEDAWARDSStockOptionsDetails</Role>
      <ShortName>SHARE-BASED AWARDS - Stock Options (Details)</ShortName>
      <MenuCategory>Details</MenuCategory>
      <Position>90</Position>
    </Report>
    <Report instance="unfi-20210731.htm">
      <IsDefault>false</IsDefault>
      <HasEmbeddedReports>false</HasEmbeddedReports>
      <HtmlFileName>R91.htm</HtmlFileName>
      <LongName>240724048 - Disclosure - SHARE-BASED AWARDS - Supervalu Replacement Awards (Details)</LongName>
      <ReportType>Sheet</ReportType>
      <Role>http://www.unfi.com/role/SHAREBASEDAWARDSSupervaluReplacementAwardsDetails</Role>
      <ShortName>SHARE-BASED AWARDS - Supervalu Replacement Awards (Details)</ShortName>
      <MenuCategory>Details</MenuCategory>
      <Position>91</Position>
    </Report>
    <Report instance="unfi-20210731.htm">
      <IsDefault>false</IsDefault>
      <HasEmbeddedReports>false</HasEmbeddedReports>
      <HtmlFileName>R92.htm</HtmlFileName>
      <LongName>240754049 - Disclosure - BENEFIT PLANS - Additional Information (Details)</LongName>
      <ReportType>Sheet</ReportType>
      <Role>http://www.unfi.com/role/BENEFITPLANSAdditionalInformationDetails</Role>
      <ShortName>BENEFIT PLANS - Additional Information (Details)</ShortName>
      <MenuCategory>Details</MenuCategory>
      <Position>92</Position>
    </Report>
    <Report instance="unfi-20210731.htm">
      <IsDefault>false</IsDefault>
      <HasEmbeddedReports>false</HasEmbeddedReports>
      <HtmlFileName>R93.htm</HtmlFileName>
      <LongName>240764050 - Disclosure - BENEFIT PLANS - Defined Benefit Pension Plans (Details)</LongName>
      <ReportType>Sheet</ReportType>
      <Role>http://www.unfi.com/role/BENEFITPLANSDefinedBenefitPensionPlansDetails</Role>
      <ShortName>BENEFIT PLANS - Defined Benefit Pension Plans (Details)</ShortName>
      <MenuCategory>Details</MenuCategory>
      <Position>93</Position>
    </Report>
    <Report instance="unfi-20210731.htm">
      <IsDefault>false</IsDefault>
      <HasEmbeddedReports>false</HasEmbeddedReports>
      <HtmlFileName>R94.htm</HtmlFileName>
      <LongName>240774051 - Disclosure - BENEFIT PLANS - Net Periodic Benefit (Income) (Details)</LongName>
      <ReportType>Sheet</ReportType>
      <Role>http://www.unfi.com/role/BENEFITPLANSNetPeriodicBenefitIncomeDetails</Role>
      <ShortName>BENEFIT PLANS - Net Periodic Benefit (Income) (Details)</ShortName>
      <MenuCategory>Details</MenuCategory>
      <Position>94</Position>
    </Report>
    <Report instance="unfi-20210731.htm">
      <IsDefault>false</IsDefault>
      <HasEmbeddedReports>false</HasEmbeddedReports>
      <HtmlFileName>R95.htm</HtmlFileName>
      <LongName>240784052 - Disclosure - BENEFIT PLANS - Amounts Recognized in Consolidated Balance Sheet (Details)</LongName>
      <ReportType>Sheet</ReportType>
      <Role>http://www.unfi.com/role/BENEFITPLANSAmountsRecognizedinConsolidatedBalanceSheetDetails</Role>
      <ShortName>BENEFIT PLANS - Amounts Recognized in Consolidated Balance Sheet (Details)</ShortName>
      <MenuCategory>Details</MenuCategory>
      <Position>95</Position>
    </Report>
    <Report instance="unfi-20210731.htm">
      <IsDefault>false</IsDefault>
      <HasEmbeddedReports>false</HasEmbeddedReports>
      <HtmlFileName>R96.htm</HtmlFileName>
      <LongName>240794053 - Disclosure - BENEFIT PLANS - Benefit Plan Assumptions (Details)</LongName>
      <ReportType>Sheet</ReportType>
      <Role>http://www.unfi.com/role/BENEFITPLANSBenefitPlanAssumptionsDetails</Role>
      <ShortName>BENEFIT PLANS - Benefit Plan Assumptions (Details)</ShortName>
      <MenuCategory>Details</MenuCategory>
      <Position>96</Position>
    </Report>
    <Report instance="unfi-20210731.htm">
      <IsDefault>false</IsDefault>
      <HasEmbeddedReports>false</HasEmbeddedReports>
      <HtmlFileName>R97.htm</HtmlFileName>
      <LongName>240804054 - Disclosure - BENEFIT PLANS - Allocation of Pension Plan Assets (Details)</LongName>
      <ReportType>Sheet</ReportType>
      <Role>http://www.unfi.com/role/BENEFITPLANSAllocationofPensionPlanAssetsDetails</Role>
      <ShortName>BENEFIT PLANS - Allocation of Pension Plan Assets (Details)</ShortName>
      <MenuCategory>Details</MenuCategory>
      <Position>97</Position>
    </Report>
    <Report instance="unfi-20210731.htm">
      <IsDefault>false</IsDefault>
      <HasEmbeddedReports>false</HasEmbeddedReports>
      <HtmlFileName>R98.htm</HtmlFileName>
      <LongName>240814055 - Disclosure - BENEFIT PLANS - Fair Value of Defined Benefit Pension Plans Assets (Details)</LongName>
      <ReportType>Sheet</ReportType>
      <Role>http://www.unfi.com/role/BENEFITPLANSFairValueofDefinedBenefitPensionPlansAssetsDetails</Role>
      <ShortName>BENEFIT PLANS - Fair Value of Defined Benefit Pension Plans Assets (Details)</ShortName>
      <MenuCategory>Details</MenuCategory>
      <Position>98</Position>
    </Report>
    <Report instance="unfi-20210731.htm">
      <IsDefault>false</IsDefault>
      <HasEmbeddedReports>false</HasEmbeddedReports>
      <HtmlFileName>R99.htm</HtmlFileName>
      <LongName>240824056 - Disclosure - BENEFIT PLANS - Contributions (Details)</LongName>
      <ReportType>Sheet</ReportType>
      <Role>http://www.unfi.com/role/BENEFITPLANSContributionsDetails</Role>
      <ShortName>BENEFIT PLANS - Contributions (Details)</ShortName>
      <MenuCategory>Details</MenuCategory>
      <Position>99</Position>
    </Report>
    <Report instance="unfi-20210731.htm">
      <IsDefault>false</IsDefault>
      <HasEmbeddedReports>false</HasEmbeddedReports>
      <HtmlFileName>R100.htm</HtmlFileName>
      <LongName>240834057 - Disclosure - BENEFIT PLANS - Estimated Future Benefit Payments (Details)</LongName>
      <ReportType>Sheet</ReportType>
      <Role>http://www.unfi.com/role/BENEFITPLANSEstimatedFutureBenefitPaymentsDetails</Role>
      <ShortName>BENEFIT PLANS - Estimated Future Benefit Payments (Details)</ShortName>
      <MenuCategory>Details</MenuCategory>
      <Position>100</Position>
    </Report>
    <Report instance="unfi-20210731.htm">
      <IsDefault>false</IsDefault>
      <HasEmbeddedReports>false</HasEmbeddedReports>
      <HtmlFileName>R101.htm</HtmlFileName>
      <LongName>240844058 - Disclosure - BENEFIT PLANS - Defined Contribution Plans (Details)</LongName>
      <ReportType>Sheet</ReportType>
      <Role>http://www.unfi.com/role/BENEFITPLANSDefinedContributionPlansDetails</Role>
      <ShortName>BENEFIT PLANS - Defined Contribution Plans (Details)</ShortName>
      <MenuCategory>Details</MenuCategory>
      <Position>101</Position>
    </Report>
    <Report instance="unfi-20210731.htm">
      <IsDefault>false</IsDefault>
      <HasEmbeddedReports>false</HasEmbeddedReports>
      <HtmlFileName>R102.htm</HtmlFileName>
      <LongName>240854059 - Disclosure - BENEFIT PLANS - Post-Employment Benefits (Details)</LongName>
      <ReportType>Sheet</ReportType>
      <Role>http://www.unfi.com/role/BENEFITPLANSPostEmploymentBenefitsDetails</Role>
      <ShortName>BENEFIT PLANS - Post-Employment Benefits (Details)</ShortName>
      <MenuCategory>Details</MenuCategory>
      <Position>102</Position>
    </Report>
    <Report instance="unfi-20210731.htm">
      <IsDefault>false</IsDefault>
      <HasEmbeddedReports>false</HasEmbeddedReports>
      <HtmlFileName>R103.htm</HtmlFileName>
      <LongName>240864060 - Disclosure - BENEFIT PLANS - Significant Multiemployer Plans (Details)</LongName>
      <ReportType>Sheet</ReportType>
      <Role>http://www.unfi.com/role/BENEFITPLANSSignificantMultiemployerPlansDetails</Role>
      <ShortName>BENEFIT PLANS - Significant Multiemployer Plans (Details)</ShortName>
      <MenuCategory>Details</MenuCategory>
      <Position>103</Position>
    </Report>
    <Report instance="unfi-20210731.htm">
      <IsDefault>false</IsDefault>
      <HasEmbeddedReports>false</HasEmbeddedReports>
      <HtmlFileName>R104.htm</HtmlFileName>
      <LongName>240874061 - Disclosure - BENEFIT PLANS - Schedule of Collective Bargaining Agreement Dates and Contributions to Each Plan Table (Details)</LongName>
      <ReportType>Sheet</ReportType>
      <Role>http://www.unfi.com/role/BENEFITPLANSScheduleofCollectiveBargainingAgreementDatesandContributionstoEachPlanTableDetails</Role>
      <ShortName>BENEFIT PLANS - Schedule of Collective Bargaining Agreement Dates and Contributions to Each Plan Table (Details)</ShortName>
      <MenuCategory>Details</MenuCategory>
      <Position>104</Position>
    </Report>
    <Report instance="unfi-20210731.htm">
      <IsDefault>false</IsDefault>
      <HasEmbeddedReports>false</HasEmbeddedReports>
      <HtmlFileName>R105.htm</HtmlFileName>
      <LongName>240884062 - Disclosure - BENEFIT PLANS - Multiemployer Pension Plans, Additional Information (Details)</LongName>
      <ReportType>Sheet</ReportType>
      <Role>http://www.unfi.com/role/BENEFITPLANSMultiemployerPensionPlansAdditionalInformationDetails</Role>
      <ShortName>BENEFIT PLANS - Multiemployer Pension Plans, Additional Information (Details)</ShortName>
      <MenuCategory>Details</MenuCategory>
      <Position>105</Position>
    </Report>
    <Report instance="unfi-20210731.htm">
      <IsDefault>false</IsDefault>
      <HasEmbeddedReports>false</HasEmbeddedReports>
      <HtmlFileName>R106.htm</HtmlFileName>
      <LongName>240894063 - Disclosure - BENEFIT PLANS - Multiemployer Benefit Plans Other than Pensions (Details)</LongName>
      <ReportType>Sheet</ReportType>
      <Role>http://www.unfi.com/role/BENEFITPLANSMultiemployerBenefitPlansOtherthanPensionsDetails</Role>
      <ShortName>BENEFIT PLANS - Multiemployer Benefit Plans Other than Pensions (Details)</ShortName>
      <MenuCategory>Details</MenuCategory>
      <Position>106</Position>
    </Report>
    <Report instance="unfi-20210731.htm">
      <IsDefault>false</IsDefault>
      <HasEmbeddedReports>false</HasEmbeddedReports>
      <HtmlFileName>R107.htm</HtmlFileName>
      <LongName>240904064 - Disclosure - BENEFIT PLANS - Collective Bargaining Agreements (Details)</LongName>
      <ReportType>Sheet</ReportType>
      <Role>http://www.unfi.com/role/BENEFITPLANSCollectiveBargainingAgreementsDetails</Role>
      <ShortName>BENEFIT PLANS - Collective Bargaining Agreements (Details)</ShortName>
      <MenuCategory>Details</MenuCategory>
      <Position>107</Position>
    </Report>
    <Report instance="unfi-20210731.htm">
      <IsDefault>false</IsDefault>
      <HasEmbeddedReports>false</HasEmbeddedReports>
      <HtmlFileName>R108.htm</HtmlFileName>
      <LongName>240934065 - Disclosure - INCOME TAXES - Income Tax Expense (Benefit), Narrative (Details)</LongName>
      <ReportType>Sheet</ReportType>
      <Role>http://www.unfi.com/role/INCOMETAXESIncomeTaxExpenseBenefitNarrativeDetails</Role>
      <ShortName>INCOME TAXES - Income Tax Expense (Benefit), Narrative (Details)</ShortName>
      <MenuCategory>Details</MenuCategory>
      <Position>108</Position>
    </Report>
    <Report instance="unfi-20210731.htm">
      <IsDefault>false</IsDefault>
      <HasEmbeddedReports>false</HasEmbeddedReports>
      <HtmlFileName>R109.htm</HtmlFileName>
      <LongName>240944066 - Disclosure - INCOME TAXES - Total (Benefit) Provision for Income Taxes (Details)</LongName>
      <ReportType>Sheet</ReportType>
      <Role>http://www.unfi.com/role/INCOMETAXESTotalBenefitProvisionforIncomeTaxesDetails</Role>
      <ShortName>INCOME TAXES - Total (Benefit) Provision for Income Taxes (Details)</ShortName>
      <MenuCategory>Details</MenuCategory>
      <Position>109</Position>
    </Report>
    <Report instance="unfi-20210731.htm">
      <IsDefault>false</IsDefault>
      <HasEmbeddedReports>false</HasEmbeddedReports>
      <HtmlFileName>R110.htm</HtmlFileName>
      <LongName>240954067 - Disclosure - INCOME TAXES - Income Tax Expense (Benefit) (Details)</LongName>
      <ReportType>Sheet</ReportType>
      <Role>http://www.unfi.com/role/INCOMETAXESIncomeTaxExpenseBenefitDetails</Role>
      <ShortName>INCOME TAXES - Income Tax Expense (Benefit) (Details)</ShortName>
      <MenuCategory>Details</MenuCategory>
      <Position>110</Position>
    </Report>
    <Report instance="unfi-20210731.htm">
      <IsDefault>false</IsDefault>
      <HasEmbeddedReports>false</HasEmbeddedReports>
      <HtmlFileName>R111.htm</HtmlFileName>
      <LongName>240964068 - Disclosure - INCOME TAXES - Federal and State Income Tax (Benefit) Expense (Details)</LongName>
      <ReportType>Sheet</ReportType>
      <Role>http://www.unfi.com/role/INCOMETAXESFederalandStateIncomeTaxBenefitExpenseDetails</Role>
      <ShortName>INCOME TAXES - Federal and State Income Tax (Benefit) Expense (Details)</ShortName>
      <MenuCategory>Details</MenuCategory>
      <Position>111</Position>
    </Report>
    <Report instance="unfi-20210731.htm">
      <IsDefault>false</IsDefault>
      <HasEmbeddedReports>false</HasEmbeddedReports>
      <HtmlFileName>R112.htm</HtmlFileName>
      <LongName>240974069 - Disclosure - INCOME TAXES - Effective Income Tax Rate Reconciliation (Details)</LongName>
      <ReportType>Sheet</ReportType>
      <Role>http://www.unfi.com/role/INCOMETAXESEffectiveIncomeTaxRateReconciliationDetails</Role>
      <ShortName>INCOME TAXES - Effective Income Tax Rate Reconciliation (Details)</ShortName>
      <MenuCategory>Details</MenuCategory>
      <Position>112</Position>
    </Report>
    <Report instance="unfi-20210731.htm">
      <IsDefault>false</IsDefault>
      <HasEmbeddedReports>false</HasEmbeddedReports>
      <HtmlFileName>R113.htm</HtmlFileName>
      <LongName>240984070 - Disclosure - INCOME TAXES - Reconciliation of Unrecognized Tax Benefits (Details)</LongName>
      <ReportType>Sheet</ReportType>
      <Role>http://www.unfi.com/role/INCOMETAXESReconciliationofUnrecognizedTaxBenefitsDetails</Role>
      <ShortName>INCOME TAXES - Reconciliation of Unrecognized Tax Benefits (Details)</ShortName>
      <MenuCategory>Details</MenuCategory>
      <Position>113</Position>
    </Report>
    <Report instance="unfi-20210731.htm">
      <IsDefault>false</IsDefault>
      <HasEmbeddedReports>false</HasEmbeddedReports>
      <HtmlFileName>R114.htm</HtmlFileName>
      <LongName>240994071 - Disclosure - INCOME TAXES - Uncertain Tax Positions, Narrative (Details)</LongName>
      <ReportType>Sheet</ReportType>
      <Role>http://www.unfi.com/role/INCOMETAXESUncertainTaxPositionsNarrativeDetails</Role>
      <ShortName>INCOME TAXES - Uncertain Tax Positions, Narrative (Details)</ShortName>
      <MenuCategory>Details</MenuCategory>
      <Position>114</Position>
    </Report>
    <Report instance="unfi-20210731.htm">
      <IsDefault>false</IsDefault>
      <HasEmbeddedReports>false</HasEmbeddedReports>
      <HtmlFileName>R115.htm</HtmlFileName>
      <LongName>241004072 - Disclosure - INCOME TAXES - Schedule of Deferred Tax Assets and Liabilities (Details)</LongName>
      <ReportType>Sheet</ReportType>
      <Role>http://www.unfi.com/role/INCOMETAXESScheduleofDeferredTaxAssetsandLiabilitiesDetails</Role>
      <ShortName>INCOME TAXES - Schedule of Deferred Tax Assets and Liabilities (Details)</ShortName>
      <MenuCategory>Details</MenuCategory>
      <Position>115</Position>
    </Report>
    <Report instance="unfi-20210731.htm">
      <IsDefault>false</IsDefault>
      <HasEmbeddedReports>false</HasEmbeddedReports>
      <HtmlFileName>R116.htm</HtmlFileName>
      <LongName>241014073 - Disclosure - INCOME TAXES - Tax Credits and Valuation Allowances (Details)</LongName>
      <ReportType>Sheet</ReportType>
      <Role>http://www.unfi.com/role/INCOMETAXESTaxCreditsandValuationAllowancesDetails</Role>
      <ShortName>INCOME TAXES - Tax Credits and Valuation Allowances (Details)</ShortName>
      <MenuCategory>Details</MenuCategory>
      <Position>116</Position>
    </Report>
    <Report instance="unfi-20210731.htm">
      <IsDefault>false</IsDefault>
      <HasEmbeddedReports>false</HasEmbeddedReports>
      <HtmlFileName>R117.htm</HtmlFileName>
      <LongName>241024074 - Disclosure - INCOME TAXES - Effective Tax Rate (Details)</LongName>
      <ReportType>Sheet</ReportType>
      <Role>http://www.unfi.com/role/INCOMETAXESEffectiveTaxRateDetails</Role>
      <ShortName>INCOME TAXES - Effective Tax Rate (Details)</ShortName>
      <MenuCategory>Details</MenuCategory>
      <Position>117</Position>
    </Report>
    <Report instance="unfi-20210731.htm">
      <IsDefault>false</IsDefault>
      <HasEmbeddedReports>false</HasEmbeddedReports>
      <HtmlFileName>R118.htm</HtmlFileName>
      <LongName>241054075 - Disclosure - EARNINGS PER SHARE (Details)</LongName>
      <ReportType>Sheet</ReportType>
      <Role>http://www.unfi.com/role/EARNINGSPERSHAREDetails</Role>
      <ShortName>EARNINGS PER SHARE (Details)</ShortName>
      <MenuCategory>Details</MenuCategory>
      <ParentRole>http://www.unfi.com/role/EARNINGSPERSHARE</ParentRole>
      <Position>118</Position>
    </Report>
    <Report instance="unfi-20210731.htm">
      <IsDefault>false</IsDefault>
      <HasEmbeddedReports>false</HasEmbeddedReports>
      <HtmlFileName>R119.htm</HtmlFileName>
      <LongName>241084076 - Disclosure - BUSINESS SEGMENTS - Narrative (Details)</LongName>
      <ReportType>Sheet</ReportType>
      <Role>http://www.unfi.com/role/BUSINESSSEGMENTSNarrativeDetails</Role>
      <ShortName>BUSINESS SEGMENTS - Narrative (Details)</ShortName>
      <MenuCategory>Details</MenuCategory>
      <Position>119</Position>
    </Report>
    <Report instance="unfi-20210731.htm">
      <IsDefault>false</IsDefault>
      <HasEmbeddedReports>false</HasEmbeddedReports>
      <HtmlFileName>R120.htm</HtmlFileName>
      <LongName>241094077 - Disclosure - BUSINESS SEGEMENTS - Segment Information (Details)</LongName>
      <ReportType>Sheet</ReportType>
      <Role>http://www.unfi.com/role/BUSINESSSEGEMENTSSegmentInformationDetails</Role>
      <ShortName>BUSINESS SEGEMENTS - Segment Information (Details)</ShortName>
      <MenuCategory>Details</MenuCategory>
      <Position>120</Position>
    </Report>
    <Report instance="unfi-20210731.htm">
      <IsDefault>false</IsDefault>
      <HasEmbeddedReports>false</HasEmbeddedReports>
      <HtmlFileName>R121.htm</HtmlFileName>
      <LongName>241104078 - Disclosure - BUSINESS SEGEMENTS - Assets by Reportable Segment (Details)</LongName>
      <ReportType>Sheet</ReportType>
      <Role>http://www.unfi.com/role/BUSINESSSEGEMENTSAssetsbyReportableSegmentDetails</Role>
      <ShortName>BUSINESS SEGEMENTS - Assets by Reportable Segment (Details)</ShortName>
      <MenuCategory>Details</MenuCategory>
      <Position>121</Position>
    </Report>
    <Report instance="unfi-20210731.htm">
      <IsDefault>false</IsDefault>
      <HasEmbeddedReports>false</HasEmbeddedReports>
      <HtmlFileName>R122.htm</HtmlFileName>
      <LongName>241124079 - Disclosure - COMMITMENTS, CONTINGENCIES AND OFF-BALANCE SHEET ARRANGEMENTS (Details)</LongName>
      <ReportType>Sheet</ReportType>
      <Role>http://www.unfi.com/role/COMMITMENTSCONTINGENCIESANDOFFBALANCESHEETARRANGEMENTSDetails</Role>
      <ShortName>COMMITMENTS, CONTINGENCIES AND OFF-BALANCE SHEET ARRANGEMENTS (Details)</ShortName>
      <MenuCategory>Details</MenuCategory>
      <ParentRole>http://www.unfi.com/role/COMMITMENTSCONTINGENCIESANDOFFBALANCESHEETARRANGEMENTS</ParentRole>
      <Position>122</Position>
    </Report>
    <Report instance="unfi-20210731.htm">
      <IsDefault>false</IsDefault>
      <HasEmbeddedReports>false</HasEmbeddedReports>
      <HtmlFileName>R123.htm</HtmlFileName>
      <LongName>241154080 - Disclosure - DISCONTINUED OPERATIONS - Narrative (Details)</LongName>
      <ReportType>Sheet</ReportType>
      <Role>http://www.unfi.com/role/DISCONTINUEDOPERATIONSNarrativeDetails</Role>
      <ShortName>DISCONTINUED OPERATIONS - Narrative (Details)</ShortName>
      <MenuCategory>Details</MenuCategory>
      <Position>123</Position>
    </Report>
    <Report instance="unfi-20210731.htm">
      <IsDefault>false</IsDefault>
      <HasEmbeddedReports>false</HasEmbeddedReports>
      <HtmlFileName>R124.htm</HtmlFileName>
      <LongName>241164081 - Disclosure - DISCONTINUED OPERATIONS - Operating Results (Details)</LongName>
      <ReportType>Sheet</ReportType>
      <Role>http://www.unfi.com/role/DISCONTINUEDOPERATIONSOperatingResultsDetails</Role>
      <ShortName>DISCONTINUED OPERATIONS - Operating Results (Details)</ShortName>
      <MenuCategory>Details</MenuCategory>
      <Position>124</Position>
    </Report>
    <Report instance="unfi-20210731.htm">
      <IsDefault>false</IsDefault>
      <HasEmbeddedReports>false</HasEmbeddedReports>
      <HtmlFileName>R125.htm</HtmlFileName>
      <LongName>241174082 - Disclosure - DISCONTINUED OPERATIONS - Balance Sheet (Details)</LongName>
      <ReportType>Sheet</ReportType>
      <Role>http://www.unfi.com/role/DISCONTINUEDOPERATIONSBalanceSheetDetails</Role>
      <ShortName>DISCONTINUED OPERATIONS - Balance Sheet (Details)</ShortName>
      <MenuCategory>Details</MenuCategory>
      <Position>125</Position>
    </Report>
    <Report>
      <IsDefault>false</IsDefault>
      <HasEmbeddedReports>false</HasEmbeddedReports>
      <LongName>All Reports</LongName>
      <ReportType>Book</ReportType>
      <ShortName>All Reports</ShortName>
    </Report>
  </MyReports>
  <InputFiles>
    <File doctype="10-K" original="unfi-20210731.htm">unfi-20210731.htm</File>
    <File>exhibit1034-severanceagree.htm</File>
    <File>exhibit1035-changeincontro.htm</File>
    <File>exhibit1036-indemnificatio.htm</File>
    <File>exhibit21-73121.htm</File>
    <File>exhibit231-73121.htm</File>
    <File>exhibit311-10k73121.htm</File>
    <File>exhibit312-10k73121.htm</File>
    <File>exhibit321-10k73121.htm</File>
    <File>exhibit322-10k73121.htm</File>
    <File>unfi-20210731.xsd</File>
    <File>unfi-20210731_cal.xml</File>
    <File>unfi-20210731_def.xml</File>
    <File>unfi-20210731_lab.xml</File>
    <File>unfi-20210731_pre.xml</File>
  </InputFiles>
  <SupplementalFiles>
    <File>unfi-20210731_g1.jpg</File>
    <File>unfi-20210731_g2.jpg</File>
    <File>unfi-20210731_g3.jpg</File>
    <File>unfi-20210731_g4.jpg</File>
  </SupplementalFiles>
  <BaseTaxonomies>
    <BaseTaxonomy>http://fasb.org/us-gaap/2021-01-31</BaseTaxonomy>
    <BaseTaxonomy>http://xbrl.sec.gov/country/2021</BaseTaxonomy>
    <BaseTaxonomy>http://xbrl.sec.gov/dei/2021</BaseTaxonomy>
    <BaseTaxonomy>http://fasb.org/srt/2021-01-31</BaseTaxonomy>
  </BaseTaxonomies>
  <HasPresentationLinkbase>true</HasPresentationLinkbase>
  <HasCalculationLinkbase>true</HasCalculationLinkbase>
</FilingSummary>
