<?xml version='1.0' encoding='utf-8'?>
<FilingSummary>
  <Version>3.24.0.1</Version>
  <ProcessingTime/>
  <ReportFormat>html</ReportFormat>
  <ContextCount>117</ContextCount>
  <ElementCount>255</ElementCount>
  <EntityCount>1</EntityCount>
  <FootnotesReported>true</FootnotesReported>
  <SegmentCount>46</SegmentCount>
  <ScenarioCount>0</ScenarioCount>
  <TuplesReported>false</TuplesReported>
  <UnitCount>4</UnitCount>
  <MyReports>
    <Report instance="sanm-20231230.htm">
      <IsDefault>false</IsDefault>
      <HasEmbeddedReports>false</HasEmbeddedReports>
      <HtmlFileName>R1.htm</HtmlFileName>
      <LongName>0000001 - Document - Document and Entity Information Document</LongName>
      <ReportType>Sheet</ReportType>
      <Role>http://www.sanmina.com/role/DocumentandEntityInformationDocument</Role>
      <ShortName>Document and Entity Information Document</ShortName>
      <MenuCategory>Cover</MenuCategory>
      <Position>1</Position>
    </Report>
    <Report instance="sanm-20231230.htm">
      <IsDefault>false</IsDefault>
      <HasEmbeddedReports>false</HasEmbeddedReports>
      <HtmlFileName>R2.htm</HtmlFileName>
      <LongName>0000002 - Statement - Condensed Consolidated Balance Sheets</LongName>
      <ReportType>Sheet</ReportType>
      <Role>http://www.sanmina.com/role/CondensedConsolidatedBalanceSheets</Role>
      <ShortName>Condensed Consolidated Balance Sheets</ShortName>
      <MenuCategory>Statements</MenuCategory>
      <Position>2</Position>
    </Report>
    <Report instance="sanm-20231230.htm">
      <IsDefault>false</IsDefault>
      <HasEmbeddedReports>false</HasEmbeddedReports>
      <HtmlFileName>R3.htm</HtmlFileName>
      <LongName>0000003 - Statement - Condensed Consolidated Statements of Income</LongName>
      <ReportType>Sheet</ReportType>
      <Role>http://www.sanmina.com/role/CondensedConsolidatedStatementsofIncome</Role>
      <ShortName>Condensed Consolidated Statements of Income</ShortName>
      <MenuCategory>Statements</MenuCategory>
      <Position>3</Position>
    </Report>
    <Report instance="sanm-20231230.htm">
      <IsDefault>false</IsDefault>
      <HasEmbeddedReports>false</HasEmbeddedReports>
      <HtmlFileName>R4.htm</HtmlFileName>
      <LongName>0000004 - Statement - Condensed Consolidated Statement of Comprehensive Income (Loss)</LongName>
      <ReportType>Sheet</ReportType>
      <Role>http://www.sanmina.com/role/CondensedConsolidatedStatementofComprehensiveIncomeLoss</Role>
      <ShortName>Condensed Consolidated Statement of Comprehensive Income (Loss)</ShortName>
      <MenuCategory>Statements</MenuCategory>
      <Position>4</Position>
    </Report>
    <Report instance="sanm-20231230.htm">
      <IsDefault>false</IsDefault>
      <HasEmbeddedReports>false</HasEmbeddedReports>
      <HtmlFileName>R5.htm</HtmlFileName>
      <LongName>0000005 - Statement - Condensed Consolidated Statements of Stockholder's Equity Statement</LongName>
      <ReportType>Sheet</ReportType>
      <Role>http://www.sanmina.com/role/CondensedConsolidatedStatementsofStockholdersEquityStatement</Role>
      <ShortName>Condensed Consolidated Statements of Stockholder's Equity Statement</ShortName>
      <MenuCategory>Statements</MenuCategory>
      <Position>5</Position>
    </Report>
    <Report instance="sanm-20231230.htm">
      <IsDefault>false</IsDefault>
      <HasEmbeddedReports>false</HasEmbeddedReports>
      <HtmlFileName>R6.htm</HtmlFileName>
      <LongName>0000006 - Statement - Condensed Consolidated Statements of Cash Flows</LongName>
      <ReportType>Sheet</ReportType>
      <Role>http://www.sanmina.com/role/CondensedConsolidatedStatementsofCashFlows</Role>
      <ShortName>Condensed Consolidated Statements of Cash Flows</ShortName>
      <MenuCategory>Statements</MenuCategory>
      <Position>6</Position>
    </Report>
    <Report instance="sanm-20231230.htm">
      <IsDefault>false</IsDefault>
      <HasEmbeddedReports>false</HasEmbeddedReports>
      <HtmlFileName>R7.htm</HtmlFileName>
      <LongName>0000007 - Statement - Condensed Consolidated Balance Sheets (Parentheticals)</LongName>
      <ReportType>Sheet</ReportType>
      <Role>http://www.sanmina.com/role/CondensedConsolidatedBalanceSheetsParentheticals</Role>
      <ShortName>Condensed Consolidated Balance Sheets (Parentheticals)</ShortName>
      <MenuCategory>Statements</MenuCategory>
      <Position>7</Position>
    </Report>
    <Report instance="sanm-20231230.htm">
      <IsDefault>false</IsDefault>
      <HasEmbeddedReports>false</HasEmbeddedReports>
      <HtmlFileName>R8.htm</HtmlFileName>
      <LongName>0000008 - Disclosure - BASIS OF PRESENTATION</LongName>
      <ReportType>Sheet</ReportType>
      <Role>http://www.sanmina.com/role/BASISOFPRESENTATION</Role>
      <ShortName>BASIS OF PRESENTATION</ShortName>
      <MenuCategory>Notes</MenuCategory>
      <Position>8</Position>
    </Report>
    <Report instance="sanm-20231230.htm">
      <IsDefault>false</IsDefault>
      <HasEmbeddedReports>false</HasEmbeddedReports>
      <HtmlFileName>R9.htm</HtmlFileName>
      <LongName>0000009 - Disclosure - REVENUE RECOGNITION</LongName>
      <ReportType>Sheet</ReportType>
      <Role>http://www.sanmina.com/role/REVENUERECOGNITION</Role>
      <ShortName>REVENUE RECOGNITION</ShortName>
      <MenuCategory>Notes</MenuCategory>
      <Position>9</Position>
    </Report>
    <Report instance="sanm-20231230.htm">
      <IsDefault>false</IsDefault>
      <HasEmbeddedReports>false</HasEmbeddedReports>
      <HtmlFileName>R10.htm</HtmlFileName>
      <LongName>0000010 - Disclosure - FINANCIAL INSTRUMENTS</LongName>
      <ReportType>Sheet</ReportType>
      <Role>http://www.sanmina.com/role/FINANCIALINSTRUMENTS</Role>
      <ShortName>FINANCIAL INSTRUMENTS</ShortName>
      <MenuCategory>Notes</MenuCategory>
      <Position>10</Position>
    </Report>
    <Report instance="sanm-20231230.htm">
      <IsDefault>false</IsDefault>
      <HasEmbeddedReports>false</HasEmbeddedReports>
      <HtmlFileName>R11.htm</HtmlFileName>
      <LongName>0000011 - Disclosure - DEBT</LongName>
      <ReportType>Sheet</ReportType>
      <Role>http://www.sanmina.com/role/DEBT</Role>
      <ShortName>DEBT</ShortName>
      <MenuCategory>Notes</MenuCategory>
      <Position>11</Position>
    </Report>
    <Report instance="sanm-20231230.htm">
      <IsDefault>false</IsDefault>
      <HasEmbeddedReports>false</HasEmbeddedReports>
      <HtmlFileName>R12.htm</HtmlFileName>
      <LongName>0000012 - Disclosure - LEASES</LongName>
      <ReportType>Sheet</ReportType>
      <Role>http://www.sanmina.com/role/LEASES</Role>
      <ShortName>LEASES</ShortName>
      <MenuCategory>Notes</MenuCategory>
      <Position>12</Position>
    </Report>
    <Report instance="sanm-20231230.htm">
      <IsDefault>false</IsDefault>
      <HasEmbeddedReports>false</HasEmbeddedReports>
      <HtmlFileName>R13.htm</HtmlFileName>
      <LongName>0000013 - Disclosure - ACCOUNTS RECEIVABLE SALE PROGRAM</LongName>
      <ReportType>Sheet</ReportType>
      <Role>http://www.sanmina.com/role/ACCOUNTSRECEIVABLESALEPROGRAM</Role>
      <ShortName>ACCOUNTS RECEIVABLE SALE PROGRAM</ShortName>
      <MenuCategory>Notes</MenuCategory>
      <Position>13</Position>
    </Report>
    <Report instance="sanm-20231230.htm">
      <IsDefault>false</IsDefault>
      <HasEmbeddedReports>false</HasEmbeddedReports>
      <HtmlFileName>R14.htm</HtmlFileName>
      <LongName>0000014 - Disclosure - COMMITMENTS AND CONTINGENCIES</LongName>
      <ReportType>Sheet</ReportType>
      <Role>http://www.sanmina.com/role/COMMITMENTSANDCONTINGENCIES</Role>
      <ShortName>COMMITMENTS AND CONTINGENCIES</ShortName>
      <MenuCategory>Notes</MenuCategory>
      <Position>14</Position>
    </Report>
    <Report instance="sanm-20231230.htm">
      <IsDefault>false</IsDefault>
      <HasEmbeddedReports>false</HasEmbeddedReports>
      <HtmlFileName>R15.htm</HtmlFileName>
      <LongName>0000015 - Disclosure - INCOME TAX</LongName>
      <ReportType>Sheet</ReportType>
      <Role>http://www.sanmina.com/role/INCOMETAX</Role>
      <ShortName>INCOME TAX</ShortName>
      <MenuCategory>Notes</MenuCategory>
      <Position>15</Position>
    </Report>
    <Report instance="sanm-20231230.htm">
      <IsDefault>false</IsDefault>
      <HasEmbeddedReports>false</HasEmbeddedReports>
      <HtmlFileName>R16.htm</HtmlFileName>
      <LongName>0000016 - Disclosure - STOCKHOLDERS' EQUITY</LongName>
      <ReportType>Sheet</ReportType>
      <Role>http://www.sanmina.com/role/STOCKHOLDERSEQUITY</Role>
      <ShortName>STOCKHOLDERS' EQUITY</ShortName>
      <MenuCategory>Notes</MenuCategory>
      <Position>16</Position>
    </Report>
    <Report instance="sanm-20231230.htm">
      <IsDefault>false</IsDefault>
      <HasEmbeddedReports>false</HasEmbeddedReports>
      <HtmlFileName>R17.htm</HtmlFileName>
      <LongName>0000017 - Disclosure - BUSINESS SEGMENT, GEOGRAPHIC AND CUSTOMER INFORMATION</LongName>
      <ReportType>Sheet</ReportType>
      <Role>http://www.sanmina.com/role/BUSINESSSEGMENTGEOGRAPHICANDCUSTOMERINFORMATION</Role>
      <ShortName>BUSINESS SEGMENT, GEOGRAPHIC AND CUSTOMER INFORMATION</ShortName>
      <MenuCategory>Notes</MenuCategory>
      <Position>17</Position>
    </Report>
    <Report instance="sanm-20231230.htm">
      <IsDefault>false</IsDefault>
      <HasEmbeddedReports>false</HasEmbeddedReports>
      <HtmlFileName>R18.htm</HtmlFileName>
      <LongName>0000018 - Disclosure - EARNINGS PER SHARE</LongName>
      <ReportType>Sheet</ReportType>
      <Role>http://www.sanmina.com/role/EARNINGSPERSHARE</Role>
      <ShortName>EARNINGS PER SHARE</ShortName>
      <MenuCategory>Notes</MenuCategory>
      <Position>18</Position>
    </Report>
    <Report instance="sanm-20231230.htm">
      <IsDefault>false</IsDefault>
      <HasEmbeddedReports>false</HasEmbeddedReports>
      <HtmlFileName>R19.htm</HtmlFileName>
      <LongName>0000019 - Disclosure - STOCK-BASED COMPENSATION</LongName>
      <ReportType>Sheet</ReportType>
      <Role>http://www.sanmina.com/role/STOCKBASEDCOMPENSATION</Role>
      <ShortName>STOCK-BASED COMPENSATION</ShortName>
      <MenuCategory>Notes</MenuCategory>
      <Position>19</Position>
    </Report>
    <Report instance="sanm-20231230.htm">
      <IsDefault>false</IsDefault>
      <HasEmbeddedReports>false</HasEmbeddedReports>
      <HtmlFileName>R20.htm</HtmlFileName>
      <LongName>995410 - Disclosure - Pay vs Performance Disclosure</LongName>
      <ReportType>Sheet</ReportType>
      <Role>http://xbrl.sec.gov/ecd/role/PvpDisclosure</Role>
      <ShortName>Pay vs Performance Disclosure</ShortName>
      <MenuCategory>Notes</MenuCategory>
      <Position>20</Position>
    </Report>
    <Report instance="sanm-20231230.htm">
      <IsDefault>false</IsDefault>
      <HasEmbeddedReports>false</HasEmbeddedReports>
      <HtmlFileName>R21.htm</HtmlFileName>
      <LongName>995445 - Disclosure - Insider Trading Arrangements</LongName>
      <ReportType>Sheet</ReportType>
      <Role>http://xbrl.sec.gov/ecd/role/InsiderTradingArrangements</Role>
      <ShortName>Insider Trading Arrangements</ShortName>
      <MenuCategory>Notes</MenuCategory>
      <Position>21</Position>
    </Report>
    <Report instance="sanm-20231230.htm">
      <IsDefault>false</IsDefault>
      <HasEmbeddedReports>false</HasEmbeddedReports>
      <HtmlFileName>R22.htm</HtmlFileName>
      <LongName>9954471 - Disclosure - ACCOUNTING POLICIES (Policies)</LongName>
      <ReportType>Sheet</ReportType>
      <Role>http://www.sanmina.com/role/ACCOUNTINGPOLICIESPolicies</Role>
      <ShortName>ACCOUNTING POLICIES (Policies)</ShortName>
      <MenuCategory>Policies</MenuCategory>
      <Position>22</Position>
    </Report>
    <Report instance="sanm-20231230.htm">
      <IsDefault>false</IsDefault>
      <HasEmbeddedReports>false</HasEmbeddedReports>
      <HtmlFileName>R23.htm</HtmlFileName>
      <LongName>9954472 - Disclosure - REVENUE RECOGNITION (Tables)</LongName>
      <ReportType>Sheet</ReportType>
      <Role>http://www.sanmina.com/role/REVENUERECOGNITIONTables</Role>
      <ShortName>REVENUE RECOGNITION (Tables)</ShortName>
      <MenuCategory>Tables</MenuCategory>
      <ParentRole>http://www.sanmina.com/role/REVENUERECOGNITION</ParentRole>
      <Position>23</Position>
    </Report>
    <Report instance="sanm-20231230.htm">
      <IsDefault>false</IsDefault>
      <HasEmbeddedReports>false</HasEmbeddedReports>
      <HtmlFileName>R24.htm</HtmlFileName>
      <LongName>9954473 - Disclosure - FINANCIAL INSTRUMENTS - Derivative Financial Instruments (Tables)</LongName>
      <ReportType>Sheet</ReportType>
      <Role>http://www.sanmina.com/role/FINANCIALINSTRUMENTSDerivativeFinancialInstrumentsTables</Role>
      <ShortName>FINANCIAL INSTRUMENTS - Derivative Financial Instruments (Tables)</ShortName>
      <MenuCategory>Tables</MenuCategory>
      <Position>24</Position>
    </Report>
    <Report instance="sanm-20231230.htm">
      <IsDefault>false</IsDefault>
      <HasEmbeddedReports>false</HasEmbeddedReports>
      <HtmlFileName>R25.htm</HtmlFileName>
      <LongName>9954474 - Disclosure - DEBT (Tables)</LongName>
      <ReportType>Sheet</ReportType>
      <Role>http://www.sanmina.com/role/DEBTTables</Role>
      <ShortName>DEBT (Tables)</ShortName>
      <MenuCategory>Tables</MenuCategory>
      <ParentRole>http://www.sanmina.com/role/DEBT</ParentRole>
      <Position>25</Position>
    </Report>
    <Report instance="sanm-20231230.htm">
      <IsDefault>false</IsDefault>
      <HasEmbeddedReports>false</HasEmbeddedReports>
      <HtmlFileName>R26.htm</HtmlFileName>
      <LongName>9954475 - Disclosure - LEASES (Tables)</LongName>
      <ReportType>Sheet</ReportType>
      <Role>http://www.sanmina.com/role/LEASESTables</Role>
      <ShortName>LEASES (Tables)</ShortName>
      <MenuCategory>Tables</MenuCategory>
      <ParentRole>http://www.sanmina.com/role/LEASES</ParentRole>
      <Position>26</Position>
    </Report>
    <Report instance="sanm-20231230.htm">
      <IsDefault>false</IsDefault>
      <HasEmbeddedReports>false</HasEmbeddedReports>
      <HtmlFileName>R27.htm</HtmlFileName>
      <LongName>9954476 - Disclosure - STOCKHOLDERS' EQUITY (Tables)</LongName>
      <ReportType>Sheet</ReportType>
      <Role>http://www.sanmina.com/role/STOCKHOLDERSEQUITYTables</Role>
      <ShortName>STOCKHOLDERS' EQUITY (Tables)</ShortName>
      <MenuCategory>Tables</MenuCategory>
      <ParentRole>http://www.sanmina.com/role/STOCKHOLDERSEQUITY</ParentRole>
      <Position>27</Position>
    </Report>
    <Report instance="sanm-20231230.htm">
      <IsDefault>false</IsDefault>
      <HasEmbeddedReports>false</HasEmbeddedReports>
      <HtmlFileName>R28.htm</HtmlFileName>
      <LongName>9954477 - Disclosure - BUSINESS SEGMENT, GEOGRAPHIC AND CUSTOMER INFORMATION (Tables)</LongName>
      <ReportType>Sheet</ReportType>
      <Role>http://www.sanmina.com/role/BUSINESSSEGMENTGEOGRAPHICANDCUSTOMERINFORMATIONTables</Role>
      <ShortName>BUSINESS SEGMENT, GEOGRAPHIC AND CUSTOMER INFORMATION (Tables)</ShortName>
      <MenuCategory>Tables</MenuCategory>
      <ParentRole>http://www.sanmina.com/role/BUSINESSSEGMENTGEOGRAPHICANDCUSTOMERINFORMATION</ParentRole>
      <Position>28</Position>
    </Report>
    <Report instance="sanm-20231230.htm">
      <IsDefault>false</IsDefault>
      <HasEmbeddedReports>false</HasEmbeddedReports>
      <HtmlFileName>R29.htm</HtmlFileName>
      <LongName>9954478 - Disclosure - EARNINGS PER SHARE (Tables)</LongName>
      <ReportType>Sheet</ReportType>
      <Role>http://www.sanmina.com/role/EARNINGSPERSHARETables</Role>
      <ShortName>EARNINGS PER SHARE (Tables)</ShortName>
      <MenuCategory>Tables</MenuCategory>
      <ParentRole>http://www.sanmina.com/role/EARNINGSPERSHARE</ParentRole>
      <Position>29</Position>
    </Report>
    <Report instance="sanm-20231230.htm">
      <IsDefault>false</IsDefault>
      <HasEmbeddedReports>false</HasEmbeddedReports>
      <HtmlFileName>R30.htm</HtmlFileName>
      <LongName>9954479 - Disclosure - STOCK-BASED COMPENSATION (Tables)</LongName>
      <ReportType>Sheet</ReportType>
      <Role>http://www.sanmina.com/role/STOCKBASEDCOMPENSATIONTables</Role>
      <ShortName>STOCK-BASED COMPENSATION (Tables)</ShortName>
      <MenuCategory>Tables</MenuCategory>
      <ParentRole>http://www.sanmina.com/role/STOCKBASEDCOMPENSATION</ParentRole>
      <Position>30</Position>
    </Report>
    <Report instance="sanm-20231230.htm">
      <IsDefault>false</IsDefault>
      <HasEmbeddedReports>false</HasEmbeddedReports>
      <HtmlFileName>R31.htm</HtmlFileName>
      <LongName>9954480 - Disclosure - REVENUE RECOGNITION - Disagregation of Revenue (Details)</LongName>
      <ReportType>Sheet</ReportType>
      <Role>http://www.sanmina.com/role/REVENUERECOGNITIONDisagregationofRevenueDetails</Role>
      <ShortName>REVENUE RECOGNITION - Disagregation of Revenue (Details)</ShortName>
      <MenuCategory>Details</MenuCategory>
      <Position>31</Position>
    </Report>
    <Report instance="sanm-20231230.htm">
      <IsDefault>false</IsDefault>
      <HasEmbeddedReports>false</HasEmbeddedReports>
      <HtmlFileName>R32.htm</HtmlFileName>
      <LongName>9954481 - Disclosure - FINANCIAL INSTRUMENTS - Fair Value (Details)</LongName>
      <ReportType>Sheet</ReportType>
      <Role>http://www.sanmina.com/role/FINANCIALINSTRUMENTSFairValueDetails</Role>
      <ShortName>FINANCIAL INSTRUMENTS - Fair Value (Details)</ShortName>
      <MenuCategory>Details</MenuCategory>
      <Position>32</Position>
    </Report>
    <Report instance="sanm-20231230.htm">
      <IsDefault>false</IsDefault>
      <HasEmbeddedReports>false</HasEmbeddedReports>
      <HtmlFileName>R33.htm</HtmlFileName>
      <LongName>9954482 - Disclosure - FINANCIAL INSTRUMENTS - Derivatives (Details)</LongName>
      <ReportType>Sheet</ReportType>
      <Role>http://www.sanmina.com/role/FINANCIALINSTRUMENTSDerivativesDetails</Role>
      <ShortName>FINANCIAL INSTRUMENTS - Derivatives (Details)</ShortName>
      <MenuCategory>Details</MenuCategory>
      <ParentRole>http://www.sanmina.com/role/FINANCIALINSTRUMENTSDerivativeFinancialInstrumentsTables</ParentRole>
      <Position>33</Position>
    </Report>
    <Report instance="sanm-20231230.htm">
      <IsDefault>false</IsDefault>
      <HasEmbeddedReports>false</HasEmbeddedReports>
      <HtmlFileName>R34.htm</HtmlFileName>
      <LongName>9954483 - Disclosure - DEBT - Debt Schedule (Details)</LongName>
      <ReportType>Sheet</ReportType>
      <Role>http://www.sanmina.com/role/DEBTDebtScheduleDetails</Role>
      <ShortName>DEBT - Debt Schedule (Details)</ShortName>
      <MenuCategory>Details</MenuCategory>
      <Position>34</Position>
    </Report>
    <Report instance="sanm-20231230.htm">
      <IsDefault>false</IsDefault>
      <HasEmbeddedReports>false</HasEmbeddedReports>
      <HtmlFileName>R35.htm</HtmlFileName>
      <LongName>9954484 - Disclosure - DEBT - Line of Credit Facility (Details)</LongName>
      <ReportType>Sheet</ReportType>
      <Role>http://www.sanmina.com/role/DEBTLineofCreditFacilityDetails</Role>
      <ShortName>DEBT - Line of Credit Facility (Details)</ShortName>
      <MenuCategory>Details</MenuCategory>
      <Position>35</Position>
    </Report>
    <Report instance="sanm-20231230.htm">
      <IsDefault>false</IsDefault>
      <HasEmbeddedReports>false</HasEmbeddedReports>
      <HtmlFileName>R36.htm</HtmlFileName>
      <LongName>9954485 - Disclosure - LEASES - Lessee Lease Description (Details)</LongName>
      <ReportType>Sheet</ReportType>
      <Role>http://www.sanmina.com/role/LEASESLesseeLeaseDescriptionDetails</Role>
      <ShortName>LEASES - Lessee Lease Description (Details)</ShortName>
      <MenuCategory>Details</MenuCategory>
      <Position>36</Position>
    </Report>
    <Report instance="sanm-20231230.htm">
      <IsDefault>false</IsDefault>
      <HasEmbeddedReports>false</HasEmbeddedReports>
      <HtmlFileName>R37.htm</HtmlFileName>
      <LongName>9954486 - Disclosure - LEASES - Leases (Detail)</LongName>
      <ReportType>Sheet</ReportType>
      <Role>http://www.sanmina.com/role/LEASESLeasesDetail</Role>
      <ShortName>LEASES - Leases (Detail)</ShortName>
      <MenuCategory>Details</MenuCategory>
      <Position>37</Position>
    </Report>
    <Report instance="sanm-20231230.htm">
      <IsDefault>false</IsDefault>
      <HasEmbeddedReports>false</HasEmbeddedReports>
      <HtmlFileName>R38.htm</HtmlFileName>
      <LongName>9954487 - Disclosure - LEASES - Lease Cost (Details)</LongName>
      <ReportType>Sheet</ReportType>
      <Role>http://www.sanmina.com/role/LEASESLeaseCostDetails</Role>
      <ShortName>LEASES - Lease Cost (Details)</ShortName>
      <MenuCategory>Details</MenuCategory>
      <Position>38</Position>
    </Report>
    <Report instance="sanm-20231230.htm">
      <IsDefault>false</IsDefault>
      <HasEmbeddedReports>false</HasEmbeddedReports>
      <HtmlFileName>R39.htm</HtmlFileName>
      <LongName>9954488 - Disclosure - LEASES - Future Lease Liability (Details)</LongName>
      <ReportType>Sheet</ReportType>
      <Role>http://www.sanmina.com/role/LEASESFutureLeaseLiabilityDetails</Role>
      <ShortName>LEASES - Future Lease Liability (Details)</ShortName>
      <MenuCategory>Details</MenuCategory>
      <Position>39</Position>
    </Report>
    <Report instance="sanm-20231230.htm">
      <IsDefault>false</IsDefault>
      <HasEmbeddedReports>false</HasEmbeddedReports>
      <HtmlFileName>R40.htm</HtmlFileName>
      <LongName>9954489 - Disclosure - ACCOUNTS RECEIVABLE SALE PROGRAM (Details)</LongName>
      <ReportType>Sheet</ReportType>
      <Role>http://www.sanmina.com/role/ACCOUNTSRECEIVABLESALEPROGRAMDetails</Role>
      <ShortName>ACCOUNTS RECEIVABLE SALE PROGRAM (Details)</ShortName>
      <MenuCategory>Details</MenuCategory>
      <ParentRole>http://www.sanmina.com/role/ACCOUNTSRECEIVABLESALEPROGRAM</ParentRole>
      <Position>40</Position>
    </Report>
    <Report instance="sanm-20231230.htm">
      <IsDefault>false</IsDefault>
      <HasEmbeddedReports>false</HasEmbeddedReports>
      <HtmlFileName>R41.htm</HtmlFileName>
      <LongName>9954490 - Disclosure - COMMITMENTS AND CONTINGENCIES - Contingencies (Details)</LongName>
      <ReportType>Sheet</ReportType>
      <Role>http://www.sanmina.com/role/COMMITMENTSANDCONTINGENCIESContingenciesDetails</Role>
      <ShortName>COMMITMENTS AND CONTINGENCIES - Contingencies (Details)</ShortName>
      <MenuCategory>Details</MenuCategory>
      <Position>41</Position>
    </Report>
    <Report instance="sanm-20231230.htm">
      <IsDefault>false</IsDefault>
      <HasEmbeddedReports>false</HasEmbeddedReports>
      <HtmlFileName>R42.htm</HtmlFileName>
      <LongName>9954491 - Disclosure - INCOME TAX (Details)</LongName>
      <ReportType>Sheet</ReportType>
      <Role>http://www.sanmina.com/role/INCOMETAXDetails</Role>
      <ShortName>INCOME TAX (Details)</ShortName>
      <MenuCategory>Details</MenuCategory>
      <ParentRole>http://www.sanmina.com/role/INCOMETAX</ParentRole>
      <Position>42</Position>
    </Report>
    <Report instance="sanm-20231230.htm">
      <IsDefault>false</IsDefault>
      <HasEmbeddedReports>false</HasEmbeddedReports>
      <HtmlFileName>R43.htm</HtmlFileName>
      <LongName>9954492 - Disclosure - STOCKHOLDERS' EQUITY (Details)</LongName>
      <ReportType>Sheet</ReportType>
      <Role>http://www.sanmina.com/role/STOCKHOLDERSEQUITYDetails</Role>
      <ShortName>STOCKHOLDERS' EQUITY (Details)</ShortName>
      <MenuCategory>Details</MenuCategory>
      <ParentRole>http://www.sanmina.com/role/STOCKHOLDERSEQUITYTables</ParentRole>
      <Position>43</Position>
    </Report>
    <Report instance="sanm-20231230.htm">
      <IsDefault>false</IsDefault>
      <HasEmbeddedReports>false</HasEmbeddedReports>
      <HtmlFileName>R44.htm</HtmlFileName>
      <LongName>9954493 - Disclosure - STOCKHOLDERS' EQUITY - Stock Repurchase (Details)</LongName>
      <ReportType>Sheet</ReportType>
      <Role>http://www.sanmina.com/role/STOCKHOLDERSEQUITYStockRepurchaseDetails</Role>
      <ShortName>STOCKHOLDERS' EQUITY - Stock Repurchase (Details)</ShortName>
      <MenuCategory>Details</MenuCategory>
      <Position>44</Position>
    </Report>
    <Report instance="sanm-20231230.htm">
      <IsDefault>false</IsDefault>
      <HasEmbeddedReports>false</HasEmbeddedReports>
      <HtmlFileName>R45.htm</HtmlFileName>
      <LongName>9954494 - Disclosure - STOCKHOLDERS' EQUITY - Non-controlling Interest (Details)</LongName>
      <ReportType>Sheet</ReportType>
      <Role>http://www.sanmina.com/role/STOCKHOLDERSEQUITYNoncontrollingInterestDetails</Role>
      <ShortName>STOCKHOLDERS' EQUITY - Non-controlling Interest (Details)</ShortName>
      <MenuCategory>Details</MenuCategory>
      <Position>45</Position>
    </Report>
    <Report instance="sanm-20231230.htm">
      <IsDefault>false</IsDefault>
      <HasEmbeddedReports>false</HasEmbeddedReports>
      <HtmlFileName>R46.htm</HtmlFileName>
      <LongName>9954495 - Disclosure - BUSINESS SEGMENT, GEOGRAPHIC AND CUSTOMER INFORMATION - Revenue and Gross Profit by Segment (Details)</LongName>
      <ReportType>Sheet</ReportType>
      <Role>http://www.sanmina.com/role/BUSINESSSEGMENTGEOGRAPHICANDCUSTOMERINFORMATIONRevenueandGrossProfitbySegmentDetails</Role>
      <ShortName>BUSINESS SEGMENT, GEOGRAPHIC AND CUSTOMER INFORMATION - Revenue and Gross Profit by Segment (Details)</ShortName>
      <MenuCategory>Details</MenuCategory>
      <Position>46</Position>
    </Report>
    <Report instance="sanm-20231230.htm">
      <IsDefault>false</IsDefault>
      <HasEmbeddedReports>false</HasEmbeddedReports>
      <HtmlFileName>R47.htm</HtmlFileName>
      <LongName>9954496 - Disclosure - EARNINGS PER SHARE (Details)</LongName>
      <ReportType>Sheet</ReportType>
      <Role>http://www.sanmina.com/role/EARNINGSPERSHAREDetails</Role>
      <ShortName>EARNINGS PER SHARE (Details)</ShortName>
      <MenuCategory>Details</MenuCategory>
      <ParentRole>http://www.sanmina.com/role/EARNINGSPERSHARETables</ParentRole>
      <Position>47</Position>
    </Report>
    <Report instance="sanm-20231230.htm">
      <IsDefault>false</IsDefault>
      <HasEmbeddedReports>false</HasEmbeddedReports>
      <HtmlFileName>R48.htm</HtmlFileName>
      <LongName>9954497 - Disclosure - STOCK-BASED COMPENSATION - Share-Based Compensation Arrangements (Details)</LongName>
      <ReportType>Sheet</ReportType>
      <Role>http://www.sanmina.com/role/STOCKBASEDCOMPENSATIONShareBasedCompensationArrangementsDetails</Role>
      <ShortName>STOCK-BASED COMPENSATION - Share-Based Compensation Arrangements (Details)</ShortName>
      <MenuCategory>Details</MenuCategory>
      <Position>48</Position>
    </Report>
    <Report instance="sanm-20231230.htm">
      <IsDefault>false</IsDefault>
      <HasEmbeddedReports>false</HasEmbeddedReports>
      <HtmlFileName>R49.htm</HtmlFileName>
      <LongName>9954498 - Disclosure - STOCK-BASED COMPENSATION - Shares Authorized for Future Issuance and Available for Grant (Details)</LongName>
      <ReportType>Sheet</ReportType>
      <Role>http://www.sanmina.com/role/STOCKBASEDCOMPENSATIONSharesAuthorizedforFutureIssuanceandAvailableforGrantDetails</Role>
      <ShortName>STOCK-BASED COMPENSATION - Shares Authorized for Future Issuance and Available for Grant (Details)</ShortName>
      <MenuCategory>Details</MenuCategory>
      <Position>49</Position>
    </Report>
    <Report instance="sanm-20231230.htm">
      <IsDefault>false</IsDefault>
      <HasEmbeddedReports>false</HasEmbeddedReports>
      <HtmlFileName>R50.htm</HtmlFileName>
      <LongName>9954499 - Disclosure - STOCK-BASED COMPENSATION - Additional Information (Details)</LongName>
      <ReportType>Sheet</ReportType>
      <Role>http://www.sanmina.com/role/STOCKBASEDCOMPENSATIONAdditionalInformationDetails</Role>
      <ShortName>STOCK-BASED COMPENSATION - Additional Information (Details)</ShortName>
      <MenuCategory>Details</MenuCategory>
      <Position>50</Position>
    </Report>
    <Report instance="sanm-20231230.htm">
      <IsDefault>false</IsDefault>
      <HasEmbeddedReports>false</HasEmbeddedReports>
      <HtmlFileName>R51.htm</HtmlFileName>
      <LongName>9954500 - Disclosure - STOCK-BASED COMPENSATION - Restricted Stock Rollforward (Details)</LongName>
      <ReportType>Sheet</ReportType>
      <Role>http://www.sanmina.com/role/STOCKBASEDCOMPENSATIONRestrictedStockRollforwardDetails</Role>
      <ShortName>STOCK-BASED COMPENSATION - Restricted Stock Rollforward (Details)</ShortName>
      <MenuCategory>Details</MenuCategory>
      <Position>51</Position>
    </Report>
    <Report instance="sanm-20231230.htm">
      <IsDefault>false</IsDefault>
      <HasEmbeddedReports>false</HasEmbeddedReports>
      <HtmlFileName>R52.htm</HtmlFileName>
      <LongName>9954501 - Disclosure - STOCK-BASED COMPENSATION - Unrecognized Stock Based Compensation Expense (Details)</LongName>
      <ReportType>Sheet</ReportType>
      <Role>http://www.sanmina.com/role/STOCKBASEDCOMPENSATIONUnrecognizedStockBasedCompensationExpenseDetails</Role>
      <ShortName>STOCK-BASED COMPENSATION - Unrecognized Stock Based Compensation Expense (Details)</ShortName>
      <MenuCategory>Details</MenuCategory>
      <Position>52</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-Q" isDefinitelyFs="true" isUsgaap="true" original="sanm-20231230.htm">sanm-20231230.htm</File>
    <File>sanm-20231230.xsd</File>
    <File>sanm-20231230_cal.xml</File>
    <File>sanm-20231230_def.xml</File>
    <File>sanm-20231230_lab.xml</File>
    <File>sanm-20231230_pre.xml</File>
  </InputFiles>
  <SupplementalFiles/>
  <BaseTaxonomies>
    <BaseTaxonomy items="411">http://fasb.org/us-gaap/2023</BaseTaxonomy>
    <BaseTaxonomy items="30">http://xbrl.sec.gov/dei/2023</BaseTaxonomy>
    <BaseTaxonomy items="8">http://xbrl.sec.gov/ecd/2023</BaseTaxonomy>
  </BaseTaxonomies>
  <HasPresentationLinkbase>true</HasPresentationLinkbase>
  <HasCalculationLinkbase>true</HasCalculationLinkbase>
</FilingSummary>
