<?xml version='1.0' encoding='utf-8'?>
<FilingSummary>
  <Version>3.19.3.a.u2</Version>
  <ProcessingTime/>
  <ReportFormat>html</ReportFormat>
  <ContextCount>121</ContextCount>
  <ElementCount>305</ElementCount>
  <EntityCount>1</EntityCount>
  <FootnotesReported>true</FootnotesReported>
  <SegmentCount>48</SegmentCount>
  <ScenarioCount>0</ScenarioCount>
  <TuplesReported>false</TuplesReported>
  <UnitCount>4</UnitCount>
  <MyReports>
    <Report instance="sanminadec28201910-q.htm">
      <IsDefault>false</IsDefault>
      <HasEmbeddedReports>false</HasEmbeddedReports>
      <HtmlFileName>R1.htm</HtmlFileName>
      <LongName>0001000 - 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="sanminadec28201910-q.htm">
      <IsDefault>false</IsDefault>
      <HasEmbeddedReports>false</HasEmbeddedReports>
      <HtmlFileName>R2.htm</HtmlFileName>
      <LongName>1001000 - 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="sanminadec28201910-q.htm">
      <IsDefault>false</IsDefault>
      <HasEmbeddedReports>false</HasEmbeddedReports>
      <HtmlFileName>R3.htm</HtmlFileName>
      <LongName>1001501 - 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>3</Position>
    </Report>
    <Report instance="sanminadec28201910-q.htm">
      <IsDefault>false</IsDefault>
      <HasEmbeddedReports>false</HasEmbeddedReports>
      <HtmlFileName>R4.htm</HtmlFileName>
      <LongName>1002000 - 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>4</Position>
    </Report>
    <Report instance="sanminadec28201910-q.htm">
      <IsDefault>false</IsDefault>
      <HasEmbeddedReports>false</HasEmbeddedReports>
      <HtmlFileName>R5.htm</HtmlFileName>
      <LongName>1003000 - Statement - Condensed Consolidated Statement of Comprehensive Income</LongName>
      <ReportType>Sheet</ReportType>
      <Role>http://www.sanmina.com/role/CondensedConsolidatedStatementOfComprehensiveIncome</Role>
      <ShortName>Condensed Consolidated Statement of Comprehensive Income</ShortName>
      <MenuCategory>Statements</MenuCategory>
      <Position>5</Position>
    </Report>
    <Report instance="sanminadec28201910-q.htm">
      <IsDefault>false</IsDefault>
      <HasEmbeddedReports>false</HasEmbeddedReports>
      <HtmlFileName>R6.htm</HtmlFileName>
      <LongName>1004000 - 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>6</Position>
    </Report>
    <Report instance="sanminadec28201910-q.htm">
      <IsDefault>false</IsDefault>
      <HasEmbeddedReports>false</HasEmbeddedReports>
      <HtmlFileName>R7.htm</HtmlFileName>
      <LongName>1005000 - 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>7</Position>
    </Report>
    <Report instance="sanminadec28201910-q.htm">
      <IsDefault>false</IsDefault>
      <HasEmbeddedReports>false</HasEmbeddedReports>
      <HtmlFileName>R8.htm</HtmlFileName>
      <LongName>2101100 - Disclosure - Note 1 Basis of Presentation</LongName>
      <ReportType>Sheet</ReportType>
      <Role>http://www.sanmina.com/role/Note1BasisOfPresentation</Role>
      <ShortName>Note 1 Basis of Presentation</ShortName>
      <MenuCategory>Notes</MenuCategory>
      <Position>8</Position>
    </Report>
    <Report instance="sanminadec28201910-q.htm">
      <IsDefault>false</IsDefault>
      <HasEmbeddedReports>false</HasEmbeddedReports>
      <HtmlFileName>R9.htm</HtmlFileName>
      <LongName>2102100 - Disclosure - Note 2 Inventories</LongName>
      <ReportType>Sheet</ReportType>
      <Role>http://www.sanmina.com/role/Note2Inventories</Role>
      <ShortName>Note 2 Inventories</ShortName>
      <MenuCategory>Notes</MenuCategory>
      <Position>9</Position>
    </Report>
    <Report instance="sanminadec28201910-q.htm">
      <IsDefault>false</IsDefault>
      <HasEmbeddedReports>false</HasEmbeddedReports>
      <HtmlFileName>R10.htm</HtmlFileName>
      <LongName>2104100 - Disclosure - Note 3 Revenue Recognition</LongName>
      <ReportType>Sheet</ReportType>
      <Role>http://www.sanmina.com/role/Note3RevenueRecognition</Role>
      <ShortName>Note 3 Revenue Recognition</ShortName>
      <MenuCategory>Notes</MenuCategory>
      <Position>10</Position>
    </Report>
    <Report instance="sanminadec28201910-q.htm">
      <IsDefault>false</IsDefault>
      <HasEmbeddedReports>false</HasEmbeddedReports>
      <HtmlFileName>R11.htm</HtmlFileName>
      <LongName>2105100 - Disclosure - Note 4 Financial Instruments</LongName>
      <ReportType>Sheet</ReportType>
      <Role>http://www.sanmina.com/role/Note4FinancialInstruments</Role>
      <ShortName>Note 4 Financial Instruments</ShortName>
      <MenuCategory>Notes</MenuCategory>
      <Position>11</Position>
    </Report>
    <Report instance="sanminadec28201910-q.htm">
      <IsDefault>false</IsDefault>
      <HasEmbeddedReports>false</HasEmbeddedReports>
      <HtmlFileName>R12.htm</HtmlFileName>
      <LongName>2106100 - Disclosure - Note 5 Debt</LongName>
      <ReportType>Sheet</ReportType>
      <Role>http://www.sanmina.com/role/Note5Debt</Role>
      <ShortName>Note 5 Debt</ShortName>
      <MenuCategory>Notes</MenuCategory>
      <Position>12</Position>
    </Report>
    <Report instance="sanminadec28201910-q.htm">
      <IsDefault>false</IsDefault>
      <HasEmbeddedReports>false</HasEmbeddedReports>
      <HtmlFileName>R13.htm</HtmlFileName>
      <LongName>2109100 - Disclosure - Note 6 Leases</LongName>
      <ReportType>Sheet</ReportType>
      <Role>http://www.sanmina.com/role/Note6Leases</Role>
      <ShortName>Note 6 Leases</ShortName>
      <MenuCategory>Notes</MenuCategory>
      <Position>13</Position>
    </Report>
    <Report instance="sanminadec28201910-q.htm">
      <IsDefault>false</IsDefault>
      <HasEmbeddedReports>false</HasEmbeddedReports>
      <HtmlFileName>R14.htm</HtmlFileName>
      <LongName>2110100 - Disclosure - Note 7  Accounts Receivable Sale Program</LongName>
      <ReportType>Sheet</ReportType>
      <Role>http://www.sanmina.com/role/Note7AccountsReceivableSaleProgram</Role>
      <ShortName>Note 7  Accounts Receivable Sale Program</ShortName>
      <MenuCategory>Notes</MenuCategory>
      <Position>14</Position>
    </Report>
    <Report instance="sanminadec28201910-q.htm">
      <IsDefault>false</IsDefault>
      <HasEmbeddedReports>false</HasEmbeddedReports>
      <HtmlFileName>R15.htm</HtmlFileName>
      <LongName>2112100 - Disclosure - Note 8 Commitments and Contingencies</LongName>
      <ReportType>Sheet</ReportType>
      <Role>http://www.sanmina.com/role/Note8CommitmentsAndContingencies</Role>
      <ShortName>Note 8 Commitments and Contingencies</ShortName>
      <MenuCategory>Notes</MenuCategory>
      <Position>15</Position>
    </Report>
    <Report instance="sanminadec28201910-q.htm">
      <IsDefault>false</IsDefault>
      <HasEmbeddedReports>false</HasEmbeddedReports>
      <HtmlFileName>R16.htm</HtmlFileName>
      <LongName>2113100 - Disclosure - Note 9 Restructuring</LongName>
      <ReportType>Sheet</ReportType>
      <Role>http://www.sanmina.com/role/Note9Restructuring</Role>
      <ShortName>Note 9 Restructuring</ShortName>
      <MenuCategory>Notes</MenuCategory>
      <Position>16</Position>
    </Report>
    <Report instance="sanminadec28201910-q.htm">
      <IsDefault>false</IsDefault>
      <HasEmbeddedReports>false</HasEmbeddedReports>
      <HtmlFileName>R17.htm</HtmlFileName>
      <LongName>2114100 - Disclosure - Note 10 Income Tax</LongName>
      <ReportType>Sheet</ReportType>
      <Role>http://www.sanmina.com/role/Note10IncomeTax</Role>
      <ShortName>Note 10 Income Tax</ShortName>
      <MenuCategory>Notes</MenuCategory>
      <Position>17</Position>
    </Report>
    <Report instance="sanminadec28201910-q.htm">
      <IsDefault>false</IsDefault>
      <HasEmbeddedReports>false</HasEmbeddedReports>
      <HtmlFileName>R18.htm</HtmlFileName>
      <LongName>2115100 - Disclosure - Note 11 Stockholders' Equity</LongName>
      <ReportType>Sheet</ReportType>
      <Role>http://www.sanmina.com/role/Note11StockholdersEquity</Role>
      <ShortName>Note 11 Stockholders' Equity</ShortName>
      <MenuCategory>Notes</MenuCategory>
      <Position>18</Position>
    </Report>
    <Report instance="sanminadec28201910-q.htm">
      <IsDefault>false</IsDefault>
      <HasEmbeddedReports>false</HasEmbeddedReports>
      <HtmlFileName>R19.htm</HtmlFileName>
      <LongName>2116100 - Disclosure - Note 12 Business Segment, Geographic and Customer Information</LongName>
      <ReportType>Sheet</ReportType>
      <Role>http://www.sanmina.com/role/Note12BusinessSegmentGeographicAndCustomerInformation</Role>
      <ShortName>Note 12 Business Segment, Geographic and Customer Information</ShortName>
      <MenuCategory>Notes</MenuCategory>
      <Position>19</Position>
    </Report>
    <Report instance="sanminadec28201910-q.htm">
      <IsDefault>false</IsDefault>
      <HasEmbeddedReports>false</HasEmbeddedReports>
      <HtmlFileName>R20.htm</HtmlFileName>
      <LongName>2117100 - Disclosure - Note 13 Earnings Per Share</LongName>
      <ReportType>Sheet</ReportType>
      <Role>http://www.sanmina.com/role/Note13EarningsPerShare</Role>
      <ShortName>Note 13 Earnings Per Share</ShortName>
      <MenuCategory>Notes</MenuCategory>
      <Position>20</Position>
    </Report>
    <Report instance="sanminadec28201910-q.htm">
      <IsDefault>false</IsDefault>
      <HasEmbeddedReports>false</HasEmbeddedReports>
      <HtmlFileName>R21.htm</HtmlFileName>
      <LongName>2118100 - Disclosure - Note 14 Stock-Based Compensation</LongName>
      <ReportType>Sheet</ReportType>
      <Role>http://www.sanmina.com/role/Note14StockBasedCompensation</Role>
      <ShortName>Note 14 Stock-Based Compensation</ShortName>
      <MenuCategory>Notes</MenuCategory>
      <Position>21</Position>
    </Report>
    <Report instance="sanminadec28201910-q.htm">
      <IsDefault>false</IsDefault>
      <HasEmbeddedReports>false</HasEmbeddedReports>
      <HtmlFileName>R22.htm</HtmlFileName>
      <LongName>2201201 - 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="sanminadec28201910-q.htm">
      <IsDefault>false</IsDefault>
      <HasEmbeddedReports>false</HasEmbeddedReports>
      <HtmlFileName>R23.htm</HtmlFileName>
      <LongName>2302301 - Disclosure - Note 2 Inventories (Tables)</LongName>
      <ReportType>Sheet</ReportType>
      <Role>http://www.sanmina.com/role/Note2InventoriesTables</Role>
      <ShortName>Note 2 Inventories (Tables)</ShortName>
      <MenuCategory>Tables</MenuCategory>
      <ParentRole>http://www.sanmina.com/role/Note2Inventories</ParentRole>
      <Position>23</Position>
    </Report>
    <Report instance="sanminadec28201910-q.htm">
      <IsDefault>false</IsDefault>
      <HasEmbeddedReports>false</HasEmbeddedReports>
      <HtmlFileName>R24.htm</HtmlFileName>
      <LongName>2304301 - Disclosure - Note 3 Revenue Recognition (Tables)</LongName>
      <ReportType>Sheet</ReportType>
      <Role>http://www.sanmina.com/role/Note3RevenueRecognitionTables</Role>
      <ShortName>Note 3 Revenue Recognition (Tables)</ShortName>
      <MenuCategory>Tables</MenuCategory>
      <ParentRole>http://www.sanmina.com/role/Note3RevenueRecognition</ParentRole>
      <Position>24</Position>
    </Report>
    <Report instance="sanminadec28201910-q.htm">
      <IsDefault>false</IsDefault>
      <HasEmbeddedReports>false</HasEmbeddedReports>
      <HtmlFileName>R25.htm</HtmlFileName>
      <LongName>2305302 - Disclosure - Note 4 Derivative Financial Instruments (Tables)</LongName>
      <ReportType>Sheet</ReportType>
      <Role>http://www.sanmina.com/role/Note4DerivativeFinancialInstrumentsTables</Role>
      <ShortName>Note 4 Derivative Financial Instruments (Tables)</ShortName>
      <MenuCategory>Tables</MenuCategory>
      <Position>25</Position>
    </Report>
    <Report instance="sanminadec28201910-q.htm">
      <IsDefault>false</IsDefault>
      <HasEmbeddedReports>false</HasEmbeddedReports>
      <HtmlFileName>R26.htm</HtmlFileName>
      <LongName>2306301 - Disclosure - Note 5 Debt (Tables)</LongName>
      <ReportType>Sheet</ReportType>
      <Role>http://www.sanmina.com/role/Note5DebtTables</Role>
      <ShortName>Note 5 Debt (Tables)</ShortName>
      <MenuCategory>Tables</MenuCategory>
      <ParentRole>http://www.sanmina.com/role/Note5Debt</ParentRole>
      <Position>26</Position>
    </Report>
    <Report instance="sanminadec28201910-q.htm">
      <IsDefault>false</IsDefault>
      <HasEmbeddedReports>false</HasEmbeddedReports>
      <HtmlFileName>R27.htm</HtmlFileName>
      <LongName>2309301 - Disclosure - Note 6 Leases (Tables)</LongName>
      <ReportType>Sheet</ReportType>
      <Role>http://www.sanmina.com/role/Note6LeasesTables</Role>
      <ShortName>Note 6 Leases (Tables)</ShortName>
      <MenuCategory>Tables</MenuCategory>
      <ParentRole>http://www.sanmina.com/role/Note6Leases</ParentRole>
      <Position>27</Position>
    </Report>
    <Report instance="sanminadec28201910-q.htm">
      <IsDefault>false</IsDefault>
      <HasEmbeddedReports>false</HasEmbeddedReports>
      <HtmlFileName>R28.htm</HtmlFileName>
      <LongName>2313301 - Disclosure - Note 9 Restructuring and Related Activities (Tables)</LongName>
      <ReportType>Sheet</ReportType>
      <Role>http://www.sanmina.com/role/Note9RestructuringAndRelatedActivitiesTables</Role>
      <ShortName>Note 9 Restructuring and Related Activities (Tables)</ShortName>
      <MenuCategory>Tables</MenuCategory>
      <Position>28</Position>
    </Report>
    <Report instance="sanminadec28201910-q.htm">
      <IsDefault>false</IsDefault>
      <HasEmbeddedReports>false</HasEmbeddedReports>
      <HtmlFileName>R29.htm</HtmlFileName>
      <LongName>2315301 - Disclosure - Note 11 Stockholders' Equity (Tables)</LongName>
      <ReportType>Sheet</ReportType>
      <Role>http://www.sanmina.com/role/Note11StockholdersEquityTables</Role>
      <ShortName>Note 11 Stockholders' Equity (Tables)</ShortName>
      <MenuCategory>Tables</MenuCategory>
      <ParentRole>http://www.sanmina.com/role/Note11StockholdersEquity</ParentRole>
      <Position>29</Position>
    </Report>
    <Report instance="sanminadec28201910-q.htm">
      <IsDefault>false</IsDefault>
      <HasEmbeddedReports>false</HasEmbeddedReports>
      <HtmlFileName>R30.htm</HtmlFileName>
      <LongName>2316301 - Disclosure - Note 12 Business Segment, Geographic and Customer Information (Tables)</LongName>
      <ReportType>Sheet</ReportType>
      <Role>http://www.sanmina.com/role/Note12BusinessSegmentGeographicAndCustomerInformationTables</Role>
      <ShortName>Note 12 Business Segment, Geographic and Customer Information (Tables)</ShortName>
      <MenuCategory>Tables</MenuCategory>
      <ParentRole>http://www.sanmina.com/role/Note12BusinessSegmentGeographicAndCustomerInformation</ParentRole>
      <Position>30</Position>
    </Report>
    <Report instance="sanminadec28201910-q.htm">
      <IsDefault>false</IsDefault>
      <HasEmbeddedReports>false</HasEmbeddedReports>
      <HtmlFileName>R31.htm</HtmlFileName>
      <LongName>2317301 - Disclosure - Note 13 Earnings Per Share (Tables)</LongName>
      <ReportType>Sheet</ReportType>
      <Role>http://www.sanmina.com/role/Note13EarningsPerShareTables</Role>
      <ShortName>Note 13 Earnings Per Share (Tables)</ShortName>
      <MenuCategory>Tables</MenuCategory>
      <ParentRole>http://www.sanmina.com/role/Note13EarningsPerShare</ParentRole>
      <Position>31</Position>
    </Report>
    <Report instance="sanminadec28201910-q.htm">
      <IsDefault>false</IsDefault>
      <HasEmbeddedReports>false</HasEmbeddedReports>
      <HtmlFileName>R32.htm</HtmlFileName>
      <LongName>2318301 - Disclosure - Note 14 Stock-Based Compensation (Tables)</LongName>
      <ReportType>Sheet</ReportType>
      <Role>http://www.sanmina.com/role/Note14StockBasedCompensationTables</Role>
      <ShortName>Note 14 Stock-Based Compensation (Tables)</ShortName>
      <MenuCategory>Tables</MenuCategory>
      <ParentRole>http://www.sanmina.com/role/Note14StockBasedCompensation</ParentRole>
      <Position>32</Position>
    </Report>
    <Report instance="sanminadec28201910-q.htm">
      <IsDefault>false</IsDefault>
      <HasEmbeddedReports>false</HasEmbeddedReports>
      <HtmlFileName>R33.htm</HtmlFileName>
      <LongName>2401402 - Disclosure - Note 1 Basis of Presentation (Details)</LongName>
      <ReportType>Sheet</ReportType>
      <Role>http://www.sanmina.com/role/Note1BasisOfPresentationDetails</Role>
      <ShortName>Note 1 Basis of Presentation (Details)</ShortName>
      <MenuCategory>Details</MenuCategory>
      <ParentRole>http://www.sanmina.com/role/Note1BasisOfPresentation</ParentRole>
      <Position>33</Position>
    </Report>
    <Report instance="sanminadec28201910-q.htm">
      <IsDefault>false</IsDefault>
      <HasEmbeddedReports>false</HasEmbeddedReports>
      <HtmlFileName>R34.htm</HtmlFileName>
      <LongName>2402402 - Disclosure - Note 2 Inventories (Details)</LongName>
      <ReportType>Sheet</ReportType>
      <Role>http://www.sanmina.com/role/Note2InventoriesDetails</Role>
      <ShortName>Note 2 Inventories (Details)</ShortName>
      <MenuCategory>Details</MenuCategory>
      <ParentRole>http://www.sanmina.com/role/Note2InventoriesTables</ParentRole>
      <Position>34</Position>
    </Report>
    <Report instance="sanminadec28201910-q.htm">
      <IsDefault>false</IsDefault>
      <HasEmbeddedReports>false</HasEmbeddedReports>
      <HtmlFileName>R35.htm</HtmlFileName>
      <LongName>2404402 - Disclosure - Note 3 Disagregation of Revenue (Details)</LongName>
      <ReportType>Sheet</ReportType>
      <Role>http://www.sanmina.com/role/Note3DisagregationOfRevenueDetails</Role>
      <ShortName>Note 3 Disagregation of Revenue (Details)</ShortName>
      <MenuCategory>Details</MenuCategory>
      <Position>35</Position>
    </Report>
    <Report instance="sanminadec28201910-q.htm">
      <IsDefault>false</IsDefault>
      <HasEmbeddedReports>false</HasEmbeddedReports>
      <HtmlFileName>R36.htm</HtmlFileName>
      <LongName>2405401 - Disclosure - Note 4 Fair Value (Details)</LongName>
      <ReportType>Sheet</ReportType>
      <Role>http://www.sanmina.com/role/Note4FairValueDetails</Role>
      <ShortName>Note 4 Fair Value (Details)</ShortName>
      <MenuCategory>Details</MenuCategory>
      <Position>36</Position>
    </Report>
    <Report instance="sanminadec28201910-q.htm">
      <IsDefault>false</IsDefault>
      <HasEmbeddedReports>false</HasEmbeddedReports>
      <HtmlFileName>R37.htm</HtmlFileName>
      <LongName>2405403 - Disclosure - Note 4 Derivatives (Details)</LongName>
      <ReportType>Sheet</ReportType>
      <Role>http://www.sanmina.com/role/Note4DerivativesDetails</Role>
      <ShortName>Note 4 Derivatives (Details)</ShortName>
      <MenuCategory>Details</MenuCategory>
      <ParentRole>http://www.sanmina.com/role/Note4DerivativeFinancialInstrumentsTables</ParentRole>
      <Position>37</Position>
    </Report>
    <Report instance="sanminadec28201910-q.htm">
      <IsDefault>false</IsDefault>
      <HasEmbeddedReports>false</HasEmbeddedReports>
      <HtmlFileName>R38.htm</HtmlFileName>
      <LongName>2406402 - Disclosure - Note 5 Debt Schedule (Details)</LongName>
      <ReportType>Sheet</ReportType>
      <Role>http://www.sanmina.com/role/Note5DebtScheduleDetails</Role>
      <ShortName>Note 5 Debt Schedule (Details)</ShortName>
      <MenuCategory>Details</MenuCategory>
      <Position>38</Position>
    </Report>
    <Report instance="sanminadec28201910-q.htm">
      <IsDefault>false</IsDefault>
      <HasEmbeddedReports>false</HasEmbeddedReports>
      <HtmlFileName>R39.htm</HtmlFileName>
      <LongName>2406403 - Disclosure - Note 5 Line of Credit Facility (Details)</LongName>
      <ReportType>Sheet</ReportType>
      <Role>http://www.sanmina.com/role/Note5LineOfCreditFacilityDetails</Role>
      <ShortName>Note 5 Line of Credit Facility (Details)</ShortName>
      <MenuCategory>Details</MenuCategory>
      <Position>39</Position>
    </Report>
    <Report instance="sanminadec28201910-q.htm">
      <IsDefault>false</IsDefault>
      <HasEmbeddedReports>false</HasEmbeddedReports>
      <HtmlFileName>R40.htm</HtmlFileName>
      <LongName>2409402 - Disclosure - Note 6 Lessee Lease Description (Details)</LongName>
      <ReportType>Sheet</ReportType>
      <Role>http://www.sanmina.com/role/Note6LesseeLeaseDescriptionDetails</Role>
      <ShortName>Note 6 Lessee Lease Description (Details)</ShortName>
      <MenuCategory>Details</MenuCategory>
      <Position>40</Position>
    </Report>
    <Report instance="sanminadec28201910-q.htm">
      <IsDefault>false</IsDefault>
      <HasEmbeddedReports>false</HasEmbeddedReports>
      <HtmlFileName>R41.htm</HtmlFileName>
      <LongName>2409403 - Disclosure - Note 6 Lease Cost (Details)</LongName>
      <ReportType>Sheet</ReportType>
      <Role>http://www.sanmina.com/role/Note6LeaseCostDetails</Role>
      <ShortName>Note 6 Lease Cost (Details)</ShortName>
      <MenuCategory>Details</MenuCategory>
      <Position>41</Position>
    </Report>
    <Report instance="sanminadec28201910-q.htm">
      <IsDefault>false</IsDefault>
      <HasEmbeddedReports>false</HasEmbeddedReports>
      <HtmlFileName>R42.htm</HtmlFileName>
      <LongName>2409404 - Disclosure - Note 6 Leases (Detail)</LongName>
      <ReportType>Sheet</ReportType>
      <Role>http://www.sanmina.com/role/Note6LeasesDetail</Role>
      <ShortName>Note 6 Leases (Detail)</ShortName>
      <MenuCategory>Details</MenuCategory>
      <ParentRole>http://www.sanmina.com/role/Note6LeasesTables</ParentRole>
      <Position>42</Position>
    </Report>
    <Report instance="sanminadec28201910-q.htm">
      <IsDefault>false</IsDefault>
      <HasEmbeddedReports>false</HasEmbeddedReports>
      <HtmlFileName>R43.htm</HtmlFileName>
      <LongName>2409405 - Disclosure - Note 6 Future Lease Liability (Details)</LongName>
      <ReportType>Sheet</ReportType>
      <Role>http://www.sanmina.com/role/Note6FutureLeaseLiabilityDetails</Role>
      <ShortName>Note 6 Future Lease Liability (Details)</ShortName>
      <MenuCategory>Details</MenuCategory>
      <Position>43</Position>
    </Report>
    <Report instance="sanminadec28201910-q.htm">
      <IsDefault>false</IsDefault>
      <HasEmbeddedReports>false</HasEmbeddedReports>
      <HtmlFileName>R44.htm</HtmlFileName>
      <LongName>2410401 - Disclosure - Note 7 Accounts Receivable Sale Program (Details)</LongName>
      <ReportType>Sheet</ReportType>
      <Role>http://www.sanmina.com/role/Note7AccountsReceivableSaleProgramDetails</Role>
      <ShortName>Note 7 Accounts Receivable Sale Program (Details)</ShortName>
      <MenuCategory>Details</MenuCategory>
      <Position>44</Position>
    </Report>
    <Report instance="sanminadec28201910-q.htm">
      <IsDefault>false</IsDefault>
      <HasEmbeddedReports>false</HasEmbeddedReports>
      <HtmlFileName>R45.htm</HtmlFileName>
      <LongName>2412401 - Disclosure - Note 8 Contingencies (Details)</LongName>
      <ReportType>Sheet</ReportType>
      <Role>http://www.sanmina.com/role/Note8ContingenciesDetails</Role>
      <ShortName>Note 8 Contingencies (Details)</ShortName>
      <MenuCategory>Details</MenuCategory>
      <Position>45</Position>
    </Report>
    <Report instance="sanminadec28201910-q.htm">
      <IsDefault>false</IsDefault>
      <HasEmbeddedReports>false</HasEmbeddedReports>
      <HtmlFileName>R46.htm</HtmlFileName>
      <LongName>2413402 - Disclosure - Note 9 Restructuring (Details)</LongName>
      <ReportType>Sheet</ReportType>
      <Role>http://www.sanmina.com/role/Note9RestructuringDetails</Role>
      <ShortName>Note 9 Restructuring (Details)</ShortName>
      <MenuCategory>Details</MenuCategory>
      <ParentRole>http://www.sanmina.com/role/Note9RestructuringAndRelatedActivitiesTables</ParentRole>
      <Position>46</Position>
    </Report>
    <Report instance="sanminadec28201910-q.htm">
      <IsDefault>false</IsDefault>
      <HasEmbeddedReports>false</HasEmbeddedReports>
      <HtmlFileName>R47.htm</HtmlFileName>
      <LongName>2414401 - Disclosure - Note 10 Income Tax (Details)</LongName>
      <ReportType>Sheet</ReportType>
      <Role>http://www.sanmina.com/role/Note10IncomeTaxDetails</Role>
      <ShortName>Note 10 Income Tax (Details)</ShortName>
      <MenuCategory>Details</MenuCategory>
      <ParentRole>http://www.sanmina.com/role/Note10IncomeTax</ParentRole>
      <Position>47</Position>
    </Report>
    <Report instance="sanminadec28201910-q.htm">
      <IsDefault>false</IsDefault>
      <HasEmbeddedReports>false</HasEmbeddedReports>
      <HtmlFileName>R48.htm</HtmlFileName>
      <LongName>2415402 - Disclosure - Note 11 Stockholders' Equity (Details)</LongName>
      <ReportType>Sheet</ReportType>
      <Role>http://www.sanmina.com/role/Note11StockholdersEquityDetails</Role>
      <ShortName>Note 11 Stockholders' Equity (Details)</ShortName>
      <MenuCategory>Details</MenuCategory>
      <ParentRole>http://www.sanmina.com/role/Note11StockholdersEquityTables</ParentRole>
      <Position>48</Position>
    </Report>
    <Report instance="sanminadec28201910-q.htm">
      <IsDefault>false</IsDefault>
      <HasEmbeddedReports>false</HasEmbeddedReports>
      <HtmlFileName>R49.htm</HtmlFileName>
      <LongName>2415403 - Disclosure - Note 11 Derivatives (Details)</LongName>
      <ReportType>Sheet</ReportType>
      <Role>http://www.sanmina.com/role/Note11DerivativesDetails</Role>
      <ShortName>Note 11 Derivatives (Details)</ShortName>
      <MenuCategory>Details</MenuCategory>
      <Position>49</Position>
    </Report>
    <Report instance="sanminadec28201910-q.htm">
      <IsDefault>false</IsDefault>
      <HasEmbeddedReports>false</HasEmbeddedReports>
      <HtmlFileName>R50.htm</HtmlFileName>
      <LongName>2415404 - Disclosure - Note 11 Stock Repurchase (Details)</LongName>
      <ReportType>Sheet</ReportType>
      <Role>http://www.sanmina.com/role/Note11StockRepurchaseDetails</Role>
      <ShortName>Note 11 Stock Repurchase (Details)</ShortName>
      <MenuCategory>Details</MenuCategory>
      <Position>50</Position>
    </Report>
    <Report instance="sanminadec28201910-q.htm">
      <IsDefault>false</IsDefault>
      <HasEmbeddedReports>false</HasEmbeddedReports>
      <HtmlFileName>R51.htm</HtmlFileName>
      <LongName>2416402 - Disclosure - Note 12 Revenue and Gross Profit by Segment (Details)</LongName>
      <ReportType>Sheet</ReportType>
      <Role>http://www.sanmina.com/role/Note12RevenueAndGrossProfitBySegmentDetails</Role>
      <ShortName>Note 12 Revenue and Gross Profit by Segment (Details)</ShortName>
      <MenuCategory>Details</MenuCategory>
      <Position>51</Position>
    </Report>
    <Report instance="sanminadec28201910-q.htm">
      <IsDefault>false</IsDefault>
      <HasEmbeddedReports>false</HasEmbeddedReports>
      <HtmlFileName>R52.htm</HtmlFileName>
      <LongName>2416403 - Disclosure - Note 12 Segment Reporting by Geographic Segment (Details)</LongName>
      <ReportType>Sheet</ReportType>
      <Role>http://www.sanmina.com/role/Note12SegmentReportingByGeographicSegmentDetails</Role>
      <ShortName>Note 12 Segment Reporting by Geographic Segment (Details)</ShortName>
      <MenuCategory>Details</MenuCategory>
      <Position>52</Position>
    </Report>
    <Report instance="sanminadec28201910-q.htm">
      <IsDefault>false</IsDefault>
      <HasEmbeddedReports>false</HasEmbeddedReports>
      <HtmlFileName>R53.htm</HtmlFileName>
      <LongName>2417402 - Disclosure - Note 13 Earnings Per Share (Details)</LongName>
      <ReportType>Sheet</ReportType>
      <Role>http://www.sanmina.com/role/Note13EarningsPerShareDetails</Role>
      <ShortName>Note 13 Earnings Per Share (Details)</ShortName>
      <MenuCategory>Details</MenuCategory>
      <ParentRole>http://www.sanmina.com/role/Note13EarningsPerShareTables</ParentRole>
      <Position>53</Position>
    </Report>
    <Report instance="sanminadec28201910-q.htm">
      <IsDefault>false</IsDefault>
      <HasEmbeddedReports>false</HasEmbeddedReports>
      <HtmlFileName>R54.htm</HtmlFileName>
      <LongName>2418402 - Disclosure - Note 14 Share-Based Compensation Arrangements (Details)</LongName>
      <ReportType>Sheet</ReportType>
      <Role>http://www.sanmina.com/role/Note14ShareBasedCompensationArrangementsDetails</Role>
      <ShortName>Note 14 Share-Based Compensation Arrangements (Details)</ShortName>
      <MenuCategory>Details</MenuCategory>
      <Position>54</Position>
    </Report>
    <Report instance="sanminadec28201910-q.htm">
      <IsDefault>false</IsDefault>
      <HasEmbeddedReports>false</HasEmbeddedReports>
      <HtmlFileName>R55.htm</HtmlFileName>
      <LongName>2418403 - Disclosure - Note 14 Shares Authorized for Future Issuance and Available for Grant (Details)</LongName>
      <ReportType>Sheet</ReportType>
      <Role>http://www.sanmina.com/role/Note14SharesAuthorizedForFutureIssuanceAndAvailableForGrantDetails</Role>
      <ShortName>Note 14 Shares Authorized for Future Issuance and Available for Grant (Details)</ShortName>
      <MenuCategory>Details</MenuCategory>
      <Position>55</Position>
    </Report>
    <Report instance="sanminadec28201910-q.htm">
      <IsDefault>false</IsDefault>
      <HasEmbeddedReports>false</HasEmbeddedReports>
      <HtmlFileName>R56.htm</HtmlFileName>
      <LongName>2418404 - Disclosure - Note 14 Restricted Stock Rollforward (Details)</LongName>
      <ReportType>Sheet</ReportType>
      <Role>http://www.sanmina.com/role/Note14RestrictedStockRollforwardDetails</Role>
      <ShortName>Note 14 Restricted Stock Rollforward (Details)</ShortName>
      <MenuCategory>Details</MenuCategory>
      <Position>56</Position>
    </Report>
    <Report instance="sanminadec28201910-q.htm">
      <IsDefault>false</IsDefault>
      <HasEmbeddedReports>false</HasEmbeddedReports>
      <HtmlFileName>R57.htm</HtmlFileName>
      <LongName>2418405 - Disclosure - Note 14 Unrecognized Stock Based Compensation Expense (Details)</LongName>
      <ReportType>Sheet</ReportType>
      <Role>http://www.sanmina.com/role/Note14UnrecognizedStockBasedCompensationExpenseDetails</Role>
      <ShortName>Note 14 Unrecognized Stock Based Compensation Expense (Details)</ShortName>
      <MenuCategory>Details</MenuCategory>
      <Position>57</Position>
    </Report>
    <Report instance="sanminadec28201910-q.htm">
      <IsDefault>false</IsDefault>
      <HasEmbeddedReports>false</HasEmbeddedReports>
      <HtmlFileName>R58.htm</HtmlFileName>
      <LongName>2418406 - Disclosure - Note 14 Additional Information (Details)</LongName>
      <ReportType>Sheet</ReportType>
      <Role>http://www.sanmina.com/role/Note14AdditionalInformationDetails</Role>
      <ShortName>Note 14 Additional Information (Details)</ShortName>
      <MenuCategory>Details</MenuCategory>
      <Position>58</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" original="sanminadec28201910-q.htm">sanminadec28201910-q.htm</File>
    <File>sanm-20191228.xsd</File>
    <File>sanm-20191228_cal.xml</File>
    <File>sanm-20191228_def.xml</File>
    <File>sanm-20191228_lab.xml</File>
    <File>sanm-20191228_pre.xml</File>
    <File>sanminaex103520191228.htm</File>
    <File>sanminaex31120191228.htm</File>
    <File>sanminaex31220191228.htm</File>
    <File>sanminaex32120191228.htm</File>
    <File>sanminaex32220191228.htm</File>
  </InputFiles>
  <SupplementalFiles/>
  <BaseTaxonomies>
    <BaseTaxonomy>http://fasb.org/srt/2019-01-31</BaseTaxonomy>
    <BaseTaxonomy>http://xbrl.sec.gov/dei/2019-01-31</BaseTaxonomy>
    <BaseTaxonomy>http://fasb.org/us-gaap/2019-01-31</BaseTaxonomy>
    <BaseTaxonomy>http://xbrl.sec.gov/country/2017-01-31</BaseTaxonomy>
  </BaseTaxonomies>
  <HasPresentationLinkbase>true</HasPresentationLinkbase>
  <HasCalculationLinkbase>true</HasCalculationLinkbase>
</FilingSummary>
