<?xml version='1.0' encoding='utf-8'?>
<FilingSummary>
  <Version>3.24.2.u1</Version>
  <ProcessingTime/>
  <ReportFormat>html</ReportFormat>
  <ContextCount>468</ContextCount>
  <ElementCount>566</ElementCount>
  <EntityCount>1</EntityCount>
  <FootnotesReported>false</FootnotesReported>
  <SegmentCount>153</SegmentCount>
  <ScenarioCount>0</ScenarioCount>
  <TuplesReported>false</TuplesReported>
  <UnitCount>15</UnitCount>
  <MyReports>
    <Report instance="wdc-20240628.htm">
      <IsDefault>false</IsDefault>
      <HasEmbeddedReports>false</HasEmbeddedReports>
      <HtmlFileName>R1.htm</HtmlFileName>
      <LongName>0000001 - Document - Cover Page</LongName>
      <ReportType>Sheet</ReportType>
      <Role>http://www.wdc.com/role/CoverPage</Role>
      <ShortName>Cover Page</ShortName>
      <MenuCategory>Cover</MenuCategory>
      <Position>1</Position>
    </Report>
    <Report instance="wdc-20240628.htm">
      <IsDefault>false</IsDefault>
      <HasEmbeddedReports>false</HasEmbeddedReports>
      <HtmlFileName>R2.htm</HtmlFileName>
      <LongName>0000002 - Document - Audit Information</LongName>
      <ReportType>Sheet</ReportType>
      <Role>http://www.wdc.com/role/AuditInformation</Role>
      <ShortName>Audit Information</ShortName>
      <MenuCategory>Cover</MenuCategory>
      <Position>2</Position>
    </Report>
    <Report instance="wdc-20240628.htm">
      <IsDefault>false</IsDefault>
      <HasEmbeddedReports>false</HasEmbeddedReports>
      <HtmlFileName>R3.htm</HtmlFileName>
      <LongName>9952151 - Statement - Consolidated Balance Sheets</LongName>
      <ReportType>Sheet</ReportType>
      <Role>http://www.wdc.com/role/ConsolidatedBalanceSheets</Role>
      <ShortName>Consolidated Balance Sheets</ShortName>
      <MenuCategory>Statements</MenuCategory>
      <Position>3</Position>
    </Report>
    <Report instance="wdc-20240628.htm">
      <IsDefault>false</IsDefault>
      <HasEmbeddedReports>false</HasEmbeddedReports>
      <HtmlFileName>R4.htm</HtmlFileName>
      <LongName>9952152 - Statement - Consolidated Balance Sheets (Parenthetical)</LongName>
      <ReportType>Sheet</ReportType>
      <Role>http://www.wdc.com/role/ConsolidatedBalanceSheetsParenthetical</Role>
      <ShortName>Consolidated Balance Sheets (Parenthetical)</ShortName>
      <MenuCategory>Statements</MenuCategory>
      <Position>4</Position>
    </Report>
    <Report instance="wdc-20240628.htm">
      <IsDefault>false</IsDefault>
      <HasEmbeddedReports>false</HasEmbeddedReports>
      <HtmlFileName>R5.htm</HtmlFileName>
      <LongName>9952153 - Statement - Consolidated Statements of Operations</LongName>
      <ReportType>Sheet</ReportType>
      <Role>http://www.wdc.com/role/ConsolidatedStatementsofOperations</Role>
      <ShortName>Consolidated Statements of Operations</ShortName>
      <MenuCategory>Statements</MenuCategory>
      <Position>5</Position>
    </Report>
    <Report instance="wdc-20240628.htm">
      <IsDefault>false</IsDefault>
      <HasEmbeddedReports>false</HasEmbeddedReports>
      <HtmlFileName>R6.htm</HtmlFileName>
      <LongName>9952154 - Statement - Consolidated Statements of Comprehensive Income (Loss)</LongName>
      <ReportType>Sheet</ReportType>
      <Role>http://www.wdc.com/role/ConsolidatedStatementsofComprehensiveIncomeLoss</Role>
      <ShortName>Consolidated Statements of Comprehensive Income (Loss)</ShortName>
      <MenuCategory>Statements</MenuCategory>
      <Position>6</Position>
    </Report>
    <Report instance="wdc-20240628.htm">
      <IsDefault>false</IsDefault>
      <HasEmbeddedReports>false</HasEmbeddedReports>
      <HtmlFileName>R7.htm</HtmlFileName>
      <LongName>9952155 - Statement - Consolidated Statements of Cash Flows</LongName>
      <ReportType>Sheet</ReportType>
      <Role>http://www.wdc.com/role/ConsolidatedStatementsofCashFlows</Role>
      <ShortName>Consolidated Statements of Cash Flows</ShortName>
      <MenuCategory>Statements</MenuCategory>
      <Position>7</Position>
    </Report>
    <Report instance="wdc-20240628.htm">
      <IsDefault>false</IsDefault>
      <HasEmbeddedReports>false</HasEmbeddedReports>
      <HtmlFileName>R8.htm</HtmlFileName>
      <LongName>9952156 - Statement - Consolidated Statements of Convertible Preferred Stock and Shareholders' Equity</LongName>
      <ReportType>Sheet</ReportType>
      <Role>http://www.wdc.com/role/ConsolidatedStatementsofConvertiblePreferredStockandShareholdersEquity</Role>
      <ShortName>Consolidated Statements of Convertible Preferred Stock and Shareholders' Equity</ShortName>
      <MenuCategory>Statements</MenuCategory>
      <Position>8</Position>
    </Report>
    <Report instance="wdc-20240628.htm">
      <IsDefault>false</IsDefault>
      <HasEmbeddedReports>false</HasEmbeddedReports>
      <HtmlFileName>R9.htm</HtmlFileName>
      <LongName>9952157 - Disclosure - Organization and Basis of Presentation</LongName>
      <ReportType>Sheet</ReportType>
      <Role>http://www.wdc.com/role/OrganizationandBasisofPresentation</Role>
      <ShortName>Organization and Basis of Presentation</ShortName>
      <MenuCategory>Notes</MenuCategory>
      <Position>9</Position>
    </Report>
    <Report instance="wdc-20240628.htm">
      <IsDefault>false</IsDefault>
      <HasEmbeddedReports>false</HasEmbeddedReports>
      <HtmlFileName>R10.htm</HtmlFileName>
      <LongName>9952158 - Disclosure - Recent Accounting Pronouncements</LongName>
      <ReportType>Sheet</ReportType>
      <Role>http://www.wdc.com/role/RecentAccountingPronouncements</Role>
      <ShortName>Recent Accounting Pronouncements</ShortName>
      <MenuCategory>Notes</MenuCategory>
      <Position>10</Position>
    </Report>
    <Report instance="wdc-20240628.htm">
      <IsDefault>false</IsDefault>
      <HasEmbeddedReports>false</HasEmbeddedReports>
      <HtmlFileName>R11.htm</HtmlFileName>
      <LongName>9952159 - Disclosure - Business Segments, Geographic Information, and Concentrations of Risk</LongName>
      <ReportType>Sheet</ReportType>
      <Role>http://www.wdc.com/role/BusinessSegmentsGeographicInformationandConcentrationsofRisk</Role>
      <ShortName>Business Segments, Geographic Information, and Concentrations of Risk</ShortName>
      <MenuCategory>Notes</MenuCategory>
      <Position>11</Position>
    </Report>
    <Report instance="wdc-20240628.htm">
      <IsDefault>false</IsDefault>
      <HasEmbeddedReports>false</HasEmbeddedReports>
      <HtmlFileName>R12.htm</HtmlFileName>
      <LongName>9952160 - Disclosure - Supplemental Financial Statement Data</LongName>
      <ReportType>Sheet</ReportType>
      <Role>http://www.wdc.com/role/SupplementalFinancialStatementData</Role>
      <ShortName>Supplemental Financial Statement Data</ShortName>
      <MenuCategory>Notes</MenuCategory>
      <Position>12</Position>
    </Report>
    <Report instance="wdc-20240628.htm">
      <IsDefault>false</IsDefault>
      <HasEmbeddedReports>false</HasEmbeddedReports>
      <HtmlFileName>R13.htm</HtmlFileName>
      <LongName>9952161 - Disclosure - Fair Value Measurements and Investments</LongName>
      <ReportType>Sheet</ReportType>
      <Role>http://www.wdc.com/role/FairValueMeasurementsandInvestments</Role>
      <ShortName>Fair Value Measurements and Investments</ShortName>
      <MenuCategory>Notes</MenuCategory>
      <Position>13</Position>
    </Report>
    <Report instance="wdc-20240628.htm">
      <IsDefault>false</IsDefault>
      <HasEmbeddedReports>false</HasEmbeddedReports>
      <HtmlFileName>R14.htm</HtmlFileName>
      <LongName>9952162 - Disclosure - Derivative Instruments and Hedging Activities</LongName>
      <ReportType>Sheet</ReportType>
      <Role>http://www.wdc.com/role/DerivativeInstrumentsandHedgingActivities</Role>
      <ShortName>Derivative Instruments and Hedging Activities</ShortName>
      <MenuCategory>Notes</MenuCategory>
      <Position>14</Position>
    </Report>
    <Report instance="wdc-20240628.htm">
      <IsDefault>false</IsDefault>
      <HasEmbeddedReports>false</HasEmbeddedReports>
      <HtmlFileName>R15.htm</HtmlFileName>
      <LongName>9952163 - Disclosure - Debt</LongName>
      <ReportType>Sheet</ReportType>
      <Role>http://www.wdc.com/role/Debt</Role>
      <ShortName>Debt</ShortName>
      <MenuCategory>Notes</MenuCategory>
      <Position>15</Position>
    </Report>
    <Report instance="wdc-20240628.htm">
      <IsDefault>false</IsDefault>
      <HasEmbeddedReports>false</HasEmbeddedReports>
      <HtmlFileName>R16.htm</HtmlFileName>
      <LongName>9952164 - Disclosure - Pension and Other Post-Retirement Benefit Plans</LongName>
      <ReportType>Sheet</ReportType>
      <Role>http://www.wdc.com/role/PensionandOtherPostRetirementBenefitPlans</Role>
      <ShortName>Pension and Other Post-Retirement Benefit Plans</ShortName>
      <MenuCategory>Notes</MenuCategory>
      <Position>16</Position>
    </Report>
    <Report instance="wdc-20240628.htm">
      <IsDefault>false</IsDefault>
      <HasEmbeddedReports>false</HasEmbeddedReports>
      <HtmlFileName>R17.htm</HtmlFileName>
      <LongName>9952165 - Disclosure - Related Parties and Related Commitments and Contingencies</LongName>
      <ReportType>Sheet</ReportType>
      <Role>http://www.wdc.com/role/RelatedPartiesandRelatedCommitmentsandContingencies</Role>
      <ShortName>Related Parties and Related Commitments and Contingencies</ShortName>
      <MenuCategory>Notes</MenuCategory>
      <Position>17</Position>
    </Report>
    <Report instance="wdc-20240628.htm">
      <IsDefault>false</IsDefault>
      <HasEmbeddedReports>false</HasEmbeddedReports>
      <HtmlFileName>R18.htm</HtmlFileName>
      <LongName>9952166 - Disclosure - Leases and Other Commitments</LongName>
      <ReportType>Sheet</ReportType>
      <Role>http://www.wdc.com/role/LeasesandOtherCommitments</Role>
      <ShortName>Leases and Other Commitments</ShortName>
      <MenuCategory>Notes</MenuCategory>
      <Position>18</Position>
    </Report>
    <Report instance="wdc-20240628.htm">
      <IsDefault>false</IsDefault>
      <HasEmbeddedReports>false</HasEmbeddedReports>
      <HtmlFileName>R19.htm</HtmlFileName>
      <LongName>9952167 - Disclosure - Western Digital Corporation 401(k) Plan</LongName>
      <ReportType>Sheet</ReportType>
      <Role>http://www.wdc.com/role/WesternDigitalCorporation401kPlan</Role>
      <ShortName>Western Digital Corporation 401(k) Plan</ShortName>
      <MenuCategory>Notes</MenuCategory>
      <Position>19</Position>
    </Report>
    <Report instance="wdc-20240628.htm">
      <IsDefault>false</IsDefault>
      <HasEmbeddedReports>false</HasEmbeddedReports>
      <HtmlFileName>R20.htm</HtmlFileName>
      <LongName>9952168 - Disclosure - Shareholders??? Equity and Convertible Preferred Stock</LongName>
      <ReportType>Sheet</ReportType>
      <Role>http://www.wdc.com/role/ShareholdersEquityandConvertiblePreferredStock</Role>
      <ShortName>Shareholders??? Equity and Convertible Preferred Stock</ShortName>
      <MenuCategory>Notes</MenuCategory>
      <Position>20</Position>
    </Report>
    <Report instance="wdc-20240628.htm">
      <IsDefault>false</IsDefault>
      <HasEmbeddedReports>false</HasEmbeddedReports>
      <HtmlFileName>R21.htm</HtmlFileName>
      <LongName>9952169 - Disclosure - Income Tax Expense</LongName>
      <ReportType>Sheet</ReportType>
      <Role>http://www.wdc.com/role/IncomeTaxExpense</Role>
      <ShortName>Income Tax Expense</ShortName>
      <MenuCategory>Notes</MenuCategory>
      <Position>21</Position>
    </Report>
    <Report instance="wdc-20240628.htm">
      <IsDefault>false</IsDefault>
      <HasEmbeddedReports>false</HasEmbeddedReports>
      <HtmlFileName>R22.htm</HtmlFileName>
      <LongName>9952170 - Disclosure - Net Income (Loss) Per Common Share</LongName>
      <ReportType>Sheet</ReportType>
      <Role>http://www.wdc.com/role/NetIncomeLossPerCommonShare</Role>
      <ShortName>Net Income (Loss) Per Common Share</ShortName>
      <MenuCategory>Notes</MenuCategory>
      <Position>22</Position>
    </Report>
    <Report instance="wdc-20240628.htm">
      <IsDefault>false</IsDefault>
      <HasEmbeddedReports>false</HasEmbeddedReports>
      <HtmlFileName>R23.htm</HtmlFileName>
      <LongName>9952171 - Disclosure - Employee Termination, Asset Impairment and Other Charges</LongName>
      <ReportType>Sheet</ReportType>
      <Role>http://www.wdc.com/role/EmployeeTerminationAssetImpairmentandOtherCharges</Role>
      <ShortName>Employee Termination, Asset Impairment and Other Charges</ShortName>
      <MenuCategory>Notes</MenuCategory>
      <Position>23</Position>
    </Report>
    <Report instance="wdc-20240628.htm">
      <IsDefault>false</IsDefault>
      <HasEmbeddedReports>false</HasEmbeddedReports>
      <HtmlFileName>R24.htm</HtmlFileName>
      <LongName>9952172 - Disclosure - Supplier Finance Program</LongName>
      <ReportType>Sheet</ReportType>
      <Role>http://www.wdc.com/role/SupplierFinanceProgram</Role>
      <ShortName>Supplier Finance Program</ShortName>
      <MenuCategory>Notes</MenuCategory>
      <Position>24</Position>
    </Report>
    <Report instance="wdc-20240628.htm">
      <IsDefault>false</IsDefault>
      <HasEmbeddedReports>false</HasEmbeddedReports>
      <HtmlFileName>R25.htm</HtmlFileName>
      <LongName>9952173 - Disclosure - Legal Proceedings</LongName>
      <ReportType>Sheet</ReportType>
      <Role>http://www.wdc.com/role/LegalProceedings</Role>
      <ShortName>Legal Proceedings</ShortName>
      <MenuCategory>Notes</MenuCategory>
      <Position>25</Position>
    </Report>
    <Report instance="wdc-20240628.htm">
      <IsDefault>false</IsDefault>
      <HasEmbeddedReports>false</HasEmbeddedReports>
      <HtmlFileName>R26.htm</HtmlFileName>
      <LongName>9952174 - Disclosure - Revision of Previously Issued Financial Statements</LongName>
      <ReportType>Sheet</ReportType>
      <Role>http://www.wdc.com/role/RevisionofPreviouslyIssuedFinancialStatements</Role>
      <ShortName>Revision of Previously Issued Financial Statements</ShortName>
      <MenuCategory>Notes</MenuCategory>
      <Position>26</Position>
    </Report>
    <Report instance="wdc-20240628.htm">
      <IsDefault>false</IsDefault>
      <HasEmbeddedReports>false</HasEmbeddedReports>
      <HtmlFileName>R27.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>27</Position>
    </Report>
    <Report instance="wdc-20240628.htm">
      <IsDefault>false</IsDefault>
      <HasEmbeddedReports>false</HasEmbeddedReports>
      <HtmlFileName>R28.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>28</Position>
    </Report>
    <Report instance="wdc-20240628.htm">
      <IsDefault>false</IsDefault>
      <HasEmbeddedReports>false</HasEmbeddedReports>
      <HtmlFileName>R29.htm</HtmlFileName>
      <LongName>995447 - Disclosure - Insider Trading Policies and Procedures</LongName>
      <ReportType>Sheet</ReportType>
      <Role>http://xbrl.sec.gov/ecd/role/InsiderTradingPoliciesProc</Role>
      <ShortName>Insider Trading Policies and Procedures</ShortName>
      <MenuCategory>Notes</MenuCategory>
      <Position>29</Position>
    </Report>
    <Report instance="wdc-20240628.htm">
      <IsDefault>false</IsDefault>
      <HasEmbeddedReports>false</HasEmbeddedReports>
      <HtmlFileName>R30.htm</HtmlFileName>
      <LongName>9954471 - Disclosure - Organization and Basis of Presentation (Policies)</LongName>
      <ReportType>Sheet</ReportType>
      <Role>http://www.wdc.com/role/OrganizationandBasisofPresentationPolicies</Role>
      <ShortName>Organization and Basis of Presentation (Policies)</ShortName>
      <MenuCategory>Policies</MenuCategory>
      <ParentRole>http://www.wdc.com/role/RecentAccountingPronouncements</ParentRole>
      <Position>30</Position>
    </Report>
    <Report instance="wdc-20240628.htm">
      <IsDefault>false</IsDefault>
      <HasEmbeddedReports>false</HasEmbeddedReports>
      <HtmlFileName>R31.htm</HtmlFileName>
      <LongName>9954472 - Disclosure - Business Segments, Geographic Information, and Concentrations of Risk (Tables)</LongName>
      <ReportType>Sheet</ReportType>
      <Role>http://www.wdc.com/role/BusinessSegmentsGeographicInformationandConcentrationsofRiskTables</Role>
      <ShortName>Business Segments, Geographic Information, and Concentrations of Risk (Tables)</ShortName>
      <MenuCategory>Tables</MenuCategory>
      <ParentRole>http://www.wdc.com/role/BusinessSegmentsGeographicInformationandConcentrationsofRisk</ParentRole>
      <Position>31</Position>
    </Report>
    <Report instance="wdc-20240628.htm">
      <IsDefault>false</IsDefault>
      <HasEmbeddedReports>false</HasEmbeddedReports>
      <HtmlFileName>R32.htm</HtmlFileName>
      <LongName>9954473 - Disclosure - Supplemental Financial Statement Data (Tables)</LongName>
      <ReportType>Sheet</ReportType>
      <Role>http://www.wdc.com/role/SupplementalFinancialStatementDataTables</Role>
      <ShortName>Supplemental Financial Statement Data (Tables)</ShortName>
      <MenuCategory>Tables</MenuCategory>
      <ParentRole>http://www.wdc.com/role/SupplementalFinancialStatementData</ParentRole>
      <Position>32</Position>
    </Report>
    <Report instance="wdc-20240628.htm">
      <IsDefault>false</IsDefault>
      <HasEmbeddedReports>false</HasEmbeddedReports>
      <HtmlFileName>R33.htm</HtmlFileName>
      <LongName>9954474 - Disclosure - Fair Value Measurements and Investments (Tables)</LongName>
      <ReportType>Sheet</ReportType>
      <Role>http://www.wdc.com/role/FairValueMeasurementsandInvestmentsTables</Role>
      <ShortName>Fair Value Measurements and Investments (Tables)</ShortName>
      <MenuCategory>Tables</MenuCategory>
      <ParentRole>http://www.wdc.com/role/FairValueMeasurementsandInvestments</ParentRole>
      <Position>33</Position>
    </Report>
    <Report instance="wdc-20240628.htm">
      <IsDefault>false</IsDefault>
      <HasEmbeddedReports>false</HasEmbeddedReports>
      <HtmlFileName>R34.htm</HtmlFileName>
      <LongName>9954475 - Disclosure - Debt (Tables)</LongName>
      <ReportType>Sheet</ReportType>
      <Role>http://www.wdc.com/role/DebtTables</Role>
      <ShortName>Debt (Tables)</ShortName>
      <MenuCategory>Tables</MenuCategory>
      <ParentRole>http://www.wdc.com/role/Debt</ParentRole>
      <Position>34</Position>
    </Report>
    <Report instance="wdc-20240628.htm">
      <IsDefault>false</IsDefault>
      <HasEmbeddedReports>false</HasEmbeddedReports>
      <HtmlFileName>R35.htm</HtmlFileName>
      <LongName>9954476 - Disclosure - Pension and Other Post-Retirement Benefit Plans (Tables)</LongName>
      <ReportType>Sheet</ReportType>
      <Role>http://www.wdc.com/role/PensionandOtherPostRetirementBenefitPlansTables</Role>
      <ShortName>Pension and Other Post-Retirement Benefit Plans (Tables)</ShortName>
      <MenuCategory>Tables</MenuCategory>
      <ParentRole>http://www.wdc.com/role/PensionandOtherPostRetirementBenefitPlans</ParentRole>
      <Position>35</Position>
    </Report>
    <Report instance="wdc-20240628.htm">
      <IsDefault>false</IsDefault>
      <HasEmbeddedReports>false</HasEmbeddedReports>
      <HtmlFileName>R36.htm</HtmlFileName>
      <LongName>9954477 - Disclosure - Related Parties and Related Commitments and Contingencies (Tables)</LongName>
      <ReportType>Sheet</ReportType>
      <Role>http://www.wdc.com/role/RelatedPartiesandRelatedCommitmentsandContingenciesTables</Role>
      <ShortName>Related Parties and Related Commitments and Contingencies (Tables)</ShortName>
      <MenuCategory>Tables</MenuCategory>
      <ParentRole>http://www.wdc.com/role/RelatedPartiesandRelatedCommitmentsandContingencies</ParentRole>
      <Position>36</Position>
    </Report>
    <Report instance="wdc-20240628.htm">
      <IsDefault>false</IsDefault>
      <HasEmbeddedReports>false</HasEmbeddedReports>
      <HtmlFileName>R37.htm</HtmlFileName>
      <LongName>9954478 - Disclosure - Leases and Other Commitments (Tables)</LongName>
      <ReportType>Sheet</ReportType>
      <Role>http://www.wdc.com/role/LeasesandOtherCommitmentsTables</Role>
      <ShortName>Leases and Other Commitments (Tables)</ShortName>
      <MenuCategory>Tables</MenuCategory>
      <ParentRole>http://www.wdc.com/role/LeasesandOtherCommitments</ParentRole>
      <Position>37</Position>
    </Report>
    <Report instance="wdc-20240628.htm">
      <IsDefault>false</IsDefault>
      <HasEmbeddedReports>false</HasEmbeddedReports>
      <HtmlFileName>R38.htm</HtmlFileName>
      <LongName>9954479 - Disclosure - Shareholders??? Equity and Convertible Preferred Stock (Tables)</LongName>
      <ReportType>Sheet</ReportType>
      <Role>http://www.wdc.com/role/ShareholdersEquityandConvertiblePreferredStockTables</Role>
      <ShortName>Shareholders??? Equity and Convertible Preferred Stock (Tables)</ShortName>
      <MenuCategory>Tables</MenuCategory>
      <ParentRole>http://www.wdc.com/role/ShareholdersEquityandConvertiblePreferredStock</ParentRole>
      <Position>38</Position>
    </Report>
    <Report instance="wdc-20240628.htm">
      <IsDefault>false</IsDefault>
      <HasEmbeddedReports>false</HasEmbeddedReports>
      <HtmlFileName>R39.htm</HtmlFileName>
      <LongName>9954480 - Disclosure - Income Tax Expense (Tables)</LongName>
      <ReportType>Sheet</ReportType>
      <Role>http://www.wdc.com/role/IncomeTaxExpenseTables</Role>
      <ShortName>Income Tax Expense (Tables)</ShortName>
      <MenuCategory>Tables</MenuCategory>
      <ParentRole>http://www.wdc.com/role/IncomeTaxExpense</ParentRole>
      <Position>39</Position>
    </Report>
    <Report instance="wdc-20240628.htm">
      <IsDefault>false</IsDefault>
      <HasEmbeddedReports>false</HasEmbeddedReports>
      <HtmlFileName>R40.htm</HtmlFileName>
      <LongName>9954481 - Disclosure - Net Income (Loss) Per Common Share (Tables)</LongName>
      <ReportType>Sheet</ReportType>
      <Role>http://www.wdc.com/role/NetIncomeLossPerCommonShareTables</Role>
      <ShortName>Net Income (Loss) Per Common Share (Tables)</ShortName>
      <MenuCategory>Tables</MenuCategory>
      <ParentRole>http://www.wdc.com/role/NetIncomeLossPerCommonShare</ParentRole>
      <Position>40</Position>
    </Report>
    <Report instance="wdc-20240628.htm">
      <IsDefault>false</IsDefault>
      <HasEmbeddedReports>false</HasEmbeddedReports>
      <HtmlFileName>R41.htm</HtmlFileName>
      <LongName>9954482 - Disclosure - Employee Termination, Asset Impairment and Other Charges (Tables)</LongName>
      <ReportType>Sheet</ReportType>
      <Role>http://www.wdc.com/role/EmployeeTerminationAssetImpairmentandOtherChargesTables</Role>
      <ShortName>Employee Termination, Asset Impairment and Other Charges (Tables)</ShortName>
      <MenuCategory>Tables</MenuCategory>
      <ParentRole>http://www.wdc.com/role/EmployeeTerminationAssetImpairmentandOtherCharges</ParentRole>
      <Position>41</Position>
    </Report>
    <Report instance="wdc-20240628.htm">
      <IsDefault>false</IsDefault>
      <HasEmbeddedReports>false</HasEmbeddedReports>
      <HtmlFileName>R42.htm</HtmlFileName>
      <LongName>9954483 - Disclosure - Revision of Previously Issued Financial Statements (Tables)</LongName>
      <ReportType>Sheet</ReportType>
      <Role>http://www.wdc.com/role/RevisionofPreviouslyIssuedFinancialStatementsTables</Role>
      <ShortName>Revision of Previously Issued Financial Statements (Tables)</ShortName>
      <MenuCategory>Tables</MenuCategory>
      <ParentRole>http://www.wdc.com/role/RevisionofPreviouslyIssuedFinancialStatements</ParentRole>
      <Position>42</Position>
    </Report>
    <Report instance="wdc-20240628.htm">
      <IsDefault>false</IsDefault>
      <HasEmbeddedReports>false</HasEmbeddedReports>
      <HtmlFileName>R43.htm</HtmlFileName>
      <LongName>9954484 - Disclosure - Organization and Basis of Presentation - Additional Information (Details)</LongName>
      <ReportType>Sheet</ReportType>
      <Role>http://www.wdc.com/role/OrganizationandBasisofPresentationAdditionalInformationDetails</Role>
      <ShortName>Organization and Basis of Presentation - Additional Information (Details)</ShortName>
      <MenuCategory>Details</MenuCategory>
      <Position>43</Position>
    </Report>
    <Report instance="wdc-20240628.htm">
      <IsDefault>false</IsDefault>
      <HasEmbeddedReports>false</HasEmbeddedReports>
      <HtmlFileName>R44.htm</HtmlFileName>
      <LongName>9954485 - Disclosure - Organization and Basis of Presentation - Property, Plant and Equipment Useful Life (Details)</LongName>
      <ReportType>Sheet</ReportType>
      <Role>http://www.wdc.com/role/OrganizationandBasisofPresentationPropertyPlantandEquipmentUsefulLifeDetails</Role>
      <ShortName>Organization and Basis of Presentation - Property, Plant and Equipment Useful Life (Details)</ShortName>
      <MenuCategory>Details</MenuCategory>
      <Position>44</Position>
    </Report>
    <Report instance="wdc-20240628.htm">
      <IsDefault>false</IsDefault>
      <HasEmbeddedReports>false</HasEmbeddedReports>
      <HtmlFileName>R45.htm</HtmlFileName>
      <LongName>9954486 - Disclosure - Business Segments, Geographic Information, and Concentrations of Risk - Segment Reporting Information, by Segment (Details)</LongName>
      <ReportType>Sheet</ReportType>
      <Role>http://www.wdc.com/role/BusinessSegmentsGeographicInformationandConcentrationsofRiskSegmentReportingInformationbySegmentDetails</Role>
      <ShortName>Business Segments, Geographic Information, and Concentrations of Risk - Segment Reporting Information, by Segment (Details)</ShortName>
      <MenuCategory>Details</MenuCategory>
      <Position>45</Position>
    </Report>
    <Report instance="wdc-20240628.htm">
      <IsDefault>false</IsDefault>
      <HasEmbeddedReports>false</HasEmbeddedReports>
      <HtmlFileName>R46.htm</HtmlFileName>
      <LongName>9954487 - Disclosure - Business Segments, Geographic Information, and Concentrations of Risk - Disaggregation of Revenue (Details)</LongName>
      <ReportType>Sheet</ReportType>
      <Role>http://www.wdc.com/role/BusinessSegmentsGeographicInformationandConcentrationsofRiskDisaggregationofRevenueDetails</Role>
      <ShortName>Business Segments, Geographic Information, and Concentrations of Risk - Disaggregation of Revenue (Details)</ShortName>
      <MenuCategory>Details</MenuCategory>
      <Position>46</Position>
    </Report>
    <Report instance="wdc-20240628.htm">
      <IsDefault>false</IsDefault>
      <HasEmbeddedReports>false</HasEmbeddedReports>
      <HtmlFileName>R47.htm</HtmlFileName>
      <LongName>9954488 - Disclosure - Business Segments, Geographic Information, and Concentrations of Risk - Revenue by Geography (Details)</LongName>
      <ReportType>Sheet</ReportType>
      <Role>http://www.wdc.com/role/BusinessSegmentsGeographicInformationandConcentrationsofRiskRevenuebyGeographyDetails</Role>
      <ShortName>Business Segments, Geographic Information, and Concentrations of Risk - Revenue by Geography (Details)</ShortName>
      <MenuCategory>Details</MenuCategory>
      <Position>47</Position>
    </Report>
    <Report instance="wdc-20240628.htm">
      <IsDefault>false</IsDefault>
      <HasEmbeddedReports>false</HasEmbeddedReports>
      <HtmlFileName>R48.htm</HtmlFileName>
      <LongName>9954489 - Disclosure - Business Segments, Geographic Information, and Concentrations of Risk - Long-lived Assets by Geography (Details)</LongName>
      <ReportType>Sheet</ReportType>
      <Role>http://www.wdc.com/role/BusinessSegmentsGeographicInformationandConcentrationsofRiskLonglivedAssetsbyGeographyDetails</Role>
      <ShortName>Business Segments, Geographic Information, and Concentrations of Risk - Long-lived Assets by Geography (Details)</ShortName>
      <MenuCategory>Details</MenuCategory>
      <Position>48</Position>
    </Report>
    <Report instance="wdc-20240628.htm">
      <IsDefault>false</IsDefault>
      <HasEmbeddedReports>false</HasEmbeddedReports>
      <HtmlFileName>R49.htm</HtmlFileName>
      <LongName>9954490 - Disclosure - Business Segments, Geographic Information, and Concentrations of Risk - Additional Information (Details)</LongName>
      <ReportType>Sheet</ReportType>
      <Role>http://www.wdc.com/role/BusinessSegmentsGeographicInformationandConcentrationsofRiskAdditionalInformationDetails</Role>
      <ShortName>Business Segments, Geographic Information, and Concentrations of Risk - Additional Information (Details)</ShortName>
      <MenuCategory>Details</MenuCategory>
      <Position>49</Position>
    </Report>
    <Report instance="wdc-20240628.htm">
      <IsDefault>false</IsDefault>
      <HasEmbeddedReports>false</HasEmbeddedReports>
      <HtmlFileName>R50.htm</HtmlFileName>
      <LongName>9954491 - Disclosure - Business Segments, Geographic Information, and Concentrations of Risk - Goodwill Rollforward (Details)</LongName>
      <ReportType>Sheet</ReportType>
      <Role>http://www.wdc.com/role/BusinessSegmentsGeographicInformationandConcentrationsofRiskGoodwillRollforwardDetails</Role>
      <ShortName>Business Segments, Geographic Information, and Concentrations of Risk - Goodwill Rollforward (Details)</ShortName>
      <MenuCategory>Details</MenuCategory>
      <Position>50</Position>
    </Report>
    <Report instance="wdc-20240628.htm">
      <IsDefault>false</IsDefault>
      <HasEmbeddedReports>false</HasEmbeddedReports>
      <HtmlFileName>R51.htm</HtmlFileName>
      <LongName>9954492 - Disclosure - Supplemental Financial Statement Data - Additional Information (Details)</LongName>
      <ReportType>Sheet</ReportType>
      <Role>http://www.wdc.com/role/SupplementalFinancialStatementDataAdditionalInformationDetails</Role>
      <ShortName>Supplemental Financial Statement Data - Additional Information (Details)</ShortName>
      <MenuCategory>Details</MenuCategory>
      <Position>51</Position>
    </Report>
    <Report instance="wdc-20240628.htm">
      <IsDefault>false</IsDefault>
      <HasEmbeddedReports>false</HasEmbeddedReports>
      <HtmlFileName>R52.htm</HtmlFileName>
      <LongName>9954493 - Disclosure - Supplemental Financial Statement Data - Inventory (Details)</LongName>
      <ReportType>Sheet</ReportType>
      <Role>http://www.wdc.com/role/SupplementalFinancialStatementDataInventoryDetails</Role>
      <ShortName>Supplemental Financial Statement Data - Inventory (Details)</ShortName>
      <MenuCategory>Details</MenuCategory>
      <Position>52</Position>
    </Report>
    <Report instance="wdc-20240628.htm">
      <IsDefault>false</IsDefault>
      <HasEmbeddedReports>false</HasEmbeddedReports>
      <HtmlFileName>R53.htm</HtmlFileName>
      <LongName>9954494 - Disclosure - Supplemental Financial Statement Data - Property, Plant and Equipment (Details)</LongName>
      <ReportType>Sheet</ReportType>
      <Role>http://www.wdc.com/role/SupplementalFinancialStatementDataPropertyPlantandEquipmentDetails</Role>
      <ShortName>Supplemental Financial Statement Data - Property, Plant and Equipment (Details)</ShortName>
      <MenuCategory>Details</MenuCategory>
      <Position>53</Position>
    </Report>
    <Report instance="wdc-20240628.htm">
      <IsDefault>false</IsDefault>
      <HasEmbeddedReports>false</HasEmbeddedReports>
      <HtmlFileName>R54.htm</HtmlFileName>
      <LongName>9954495 - Disclosure - Supplemental Financial Statement Data - Movement in Standard Product Warranty Accrual (Details)</LongName>
      <ReportType>Sheet</ReportType>
      <Role>http://www.wdc.com/role/SupplementalFinancialStatementDataMovementinStandardProductWarrantyAccrualDetails</Role>
      <ShortName>Supplemental Financial Statement Data - Movement in Standard Product Warranty Accrual (Details)</ShortName>
      <MenuCategory>Details</MenuCategory>
      <Position>54</Position>
    </Report>
    <Report instance="wdc-20240628.htm">
      <IsDefault>false</IsDefault>
      <HasEmbeddedReports>false</HasEmbeddedReports>
      <HtmlFileName>R55.htm</HtmlFileName>
      <LongName>9954496 - Disclosure - Supplemental Financial Statement Data - Total Warranty Accrual (Details)</LongName>
      <ReportType>Sheet</ReportType>
      <Role>http://www.wdc.com/role/SupplementalFinancialStatementDataTotalWarrantyAccrualDetails</Role>
      <ShortName>Supplemental Financial Statement Data - Total Warranty Accrual (Details)</ShortName>
      <MenuCategory>Details</MenuCategory>
      <Position>55</Position>
    </Report>
    <Report instance="wdc-20240628.htm">
      <IsDefault>false</IsDefault>
      <HasEmbeddedReports>false</HasEmbeddedReports>
      <HtmlFileName>R56.htm</HtmlFileName>
      <LongName>9954497 - Disclosure - Supplemental Financial Statement Data - Other Liabilities (Details)</LongName>
      <ReportType>Sheet</ReportType>
      <Role>http://www.wdc.com/role/SupplementalFinancialStatementDataOtherLiabilitiesDetails</Role>
      <ShortName>Supplemental Financial Statement Data - Other Liabilities (Details)</ShortName>
      <MenuCategory>Details</MenuCategory>
      <Position>56</Position>
    </Report>
    <Report instance="wdc-20240628.htm">
      <IsDefault>false</IsDefault>
      <HasEmbeddedReports>false</HasEmbeddedReports>
      <HtmlFileName>R57.htm</HtmlFileName>
      <LongName>9954498 - Disclosure - Supplemental Financial Statement Data - Accumulated Other Comprehensive Loss Roll Forward (Details)</LongName>
      <ReportType>Sheet</ReportType>
      <Role>http://www.wdc.com/role/SupplementalFinancialStatementDataAccumulatedOtherComprehensiveLossRollForwardDetails</Role>
      <ShortName>Supplemental Financial Statement Data - Accumulated Other Comprehensive Loss Roll Forward (Details)</ShortName>
      <MenuCategory>Details</MenuCategory>
      <Position>57</Position>
    </Report>
    <Report instance="wdc-20240628.htm">
      <IsDefault>false</IsDefault>
      <HasEmbeddedReports>false</HasEmbeddedReports>
      <HtmlFileName>R58.htm</HtmlFileName>
      <LongName>9954499 - Disclosure - Fair Value Measurements and Investments - Financial Assets and Liabilities Measured at Fair Value on Recurring Basis (Detail)</LongName>
      <ReportType>Sheet</ReportType>
      <Role>http://www.wdc.com/role/FairValueMeasurementsandInvestmentsFinancialAssetsandLiabilitiesMeasuredatFairValueonRecurringBasisDetail</Role>
      <ShortName>Fair Value Measurements and Investments - Financial Assets and Liabilities Measured at Fair Value on Recurring Basis (Detail)</ShortName>
      <MenuCategory>Details</MenuCategory>
      <Position>58</Position>
    </Report>
    <Report instance="wdc-20240628.htm">
      <IsDefault>false</IsDefault>
      <HasEmbeddedReports>false</HasEmbeddedReports>
      <HtmlFileName>R59.htm</HtmlFileName>
      <LongName>9954500 - Disclosure - Fair Value Measurements and Investments - Debt Instrument Fair Value (Details)</LongName>
      <ReportType>Sheet</ReportType>
      <Role>http://www.wdc.com/role/FairValueMeasurementsandInvestmentsDebtInstrumentFairValueDetails</Role>
      <ShortName>Fair Value Measurements and Investments - Debt Instrument Fair Value (Details)</ShortName>
      <MenuCategory>Details</MenuCategory>
      <Position>59</Position>
    </Report>
    <Report instance="wdc-20240628.htm">
      <IsDefault>false</IsDefault>
      <HasEmbeddedReports>false</HasEmbeddedReports>
      <HtmlFileName>R60.htm</HtmlFileName>
      <LongName>9954501 - Disclosure - Derivative Instruments and Hedging Activities - Additional Information (Details)</LongName>
      <ReportType>Sheet</ReportType>
      <Role>http://www.wdc.com/role/DerivativeInstrumentsandHedgingActivitiesAdditionalInformationDetails</Role>
      <ShortName>Derivative Instruments and Hedging Activities - Additional Information (Details)</ShortName>
      <MenuCategory>Details</MenuCategory>
      <Position>60</Position>
    </Report>
    <Report instance="wdc-20240628.htm">
      <IsDefault>false</IsDefault>
      <HasEmbeddedReports>false</HasEmbeddedReports>
      <HtmlFileName>R61.htm</HtmlFileName>
      <LongName>9954502 - Disclosure - Debt - Schedule of Debt (Details)</LongName>
      <ReportType>Sheet</ReportType>
      <Role>http://www.wdc.com/role/DebtScheduleofDebtDetails</Role>
      <ShortName>Debt - Schedule of Debt (Details)</ShortName>
      <MenuCategory>Details</MenuCategory>
      <Position>61</Position>
    </Report>
    <Report instance="wdc-20240628.htm">
      <IsDefault>false</IsDefault>
      <HasEmbeddedReports>false</HasEmbeddedReports>
      <HtmlFileName>R62.htm</HtmlFileName>
      <LongName>9954503 - Disclosure - Debt - Additional Information (Details)</LongName>
      <ReportType>Sheet</ReportType>
      <Role>http://www.wdc.com/role/DebtAdditionalInformationDetails</Role>
      <ShortName>Debt - Additional Information (Details)</ShortName>
      <MenuCategory>Details</MenuCategory>
      <Position>62</Position>
    </Report>
    <Report instance="wdc-20240628.htm">
      <IsDefault>false</IsDefault>
      <HasEmbeddedReports>false</HasEmbeddedReports>
      <HtmlFileName>R63.htm</HtmlFileName>
      <LongName>9954504 - Disclosure - Debt - Schedule of Leverage Ratios (Details)</LongName>
      <ReportType>Sheet</ReportType>
      <Role>http://www.wdc.com/role/DebtScheduleofLeverageRatiosDetails</Role>
      <ShortName>Debt - Schedule of Leverage Ratios (Details)</ShortName>
      <MenuCategory>Details</MenuCategory>
      <Position>63</Position>
    </Report>
    <Report instance="wdc-20240628.htm">
      <IsDefault>false</IsDefault>
      <HasEmbeddedReports>false</HasEmbeddedReports>
      <HtmlFileName>R64.htm</HtmlFileName>
      <LongName>9954505 - Disclosure - Debt - Debt Maturities (Details)</LongName>
      <ReportType>Sheet</ReportType>
      <Role>http://www.wdc.com/role/DebtDebtMaturitiesDetails</Role>
      <ShortName>Debt - Debt Maturities (Details)</ShortName>
      <MenuCategory>Details</MenuCategory>
      <Position>64</Position>
    </Report>
    <Report instance="wdc-20240628.htm">
      <IsDefault>false</IsDefault>
      <HasEmbeddedReports>false</HasEmbeddedReports>
      <HtmlFileName>R65.htm</HtmlFileName>
      <LongName>9954506 - Disclosure - Pension and Other Post-Retirement Benefit Plans - Additional Information (Details)</LongName>
      <ReportType>Sheet</ReportType>
      <Role>http://www.wdc.com/role/PensionandOtherPostRetirementBenefitPlansAdditionalInformationDetails</Role>
      <ShortName>Pension and Other Post-Retirement Benefit Plans - Additional Information (Details)</ShortName>
      <MenuCategory>Details</MenuCategory>
      <Position>65</Position>
    </Report>
    <Report instance="wdc-20240628.htm">
      <IsDefault>false</IsDefault>
      <HasEmbeddedReports>false</HasEmbeddedReports>
      <HtmlFileName>R66.htm</HtmlFileName>
      <LongName>9954507 - Disclosure - Pension and Other Post-Retirement Benefit Plans - Obligations and Funded Status (Details)</LongName>
      <ReportType>Sheet</ReportType>
      <Role>http://www.wdc.com/role/PensionandOtherPostRetirementBenefitPlansObligationsandFundedStatusDetails</Role>
      <ShortName>Pension and Other Post-Retirement Benefit Plans - Obligations and Funded Status (Details)</ShortName>
      <MenuCategory>Details</MenuCategory>
      <Position>66</Position>
    </Report>
    <Report instance="wdc-20240628.htm">
      <IsDefault>false</IsDefault>
      <HasEmbeddedReports>false</HasEmbeddedReports>
      <HtmlFileName>R67.htm</HtmlFileName>
      <LongName>9954508 - Disclosure - Pension and Other Post-Retirement Benefit Plans - Unfunded Amounts Recognized on Consolidated Balance Sheets (Details)</LongName>
      <ReportType>Sheet</ReportType>
      <Role>http://www.wdc.com/role/PensionandOtherPostRetirementBenefitPlansUnfundedAmountsRecognizedonConsolidatedBalanceSheetsDetails</Role>
      <ShortName>Pension and Other Post-Retirement Benefit Plans - Unfunded Amounts Recognized on Consolidated Balance Sheets (Details)</ShortName>
      <MenuCategory>Details</MenuCategory>
      <Position>67</Position>
    </Report>
    <Report instance="wdc-20240628.htm">
      <IsDefault>false</IsDefault>
      <HasEmbeddedReports>false</HasEmbeddedReports>
      <HtmlFileName>R68.htm</HtmlFileName>
      <LongName>9954509 - Disclosure - Pension and Other Post-Retirement Benefit Plans - Weighted-Average Actuarial Assumptions used to Determine Benefit Obligations (Details)</LongName>
      <ReportType>Sheet</ReportType>
      <Role>http://www.wdc.com/role/PensionandOtherPostRetirementBenefitPlansWeightedAverageActuarialAssumptionsusedtoDetermineBenefitObligationsDetails</Role>
      <ShortName>Pension and Other Post-Retirement Benefit Plans - Weighted-Average Actuarial Assumptions used to Determine Benefit Obligations (Details)</ShortName>
      <MenuCategory>Details</MenuCategory>
      <Position>68</Position>
    </Report>
    <Report instance="wdc-20240628.htm">
      <IsDefault>false</IsDefault>
      <HasEmbeddedReports>false</HasEmbeddedReports>
      <HtmlFileName>R69.htm</HtmlFileName>
      <LongName>9954510 - Disclosure - Pension and Other Post-Retirement Benefit Plans - Weighted-Average Actuarial Assumptions used to Determine Benefit Costs (Details)</LongName>
      <ReportType>Sheet</ReportType>
      <Role>http://www.wdc.com/role/PensionandOtherPostRetirementBenefitPlansWeightedAverageActuarialAssumptionsusedtoDetermineBenefitCostsDetails</Role>
      <ShortName>Pension and Other Post-Retirement Benefit Plans - Weighted-Average Actuarial Assumptions used to Determine Benefit Costs (Details)</ShortName>
      <MenuCategory>Details</MenuCategory>
      <Position>69</Position>
    </Report>
    <Report instance="wdc-20240628.htm">
      <IsDefault>false</IsDefault>
      <HasEmbeddedReports>false</HasEmbeddedReports>
      <HtmlFileName>R70.htm</HtmlFileName>
      <LongName>9954511 - Disclosure - Pension and Other Post-Retirement Benefit Plans - Defined Benefit Pension Plans' Major Asset Categories and Their Associated Fair Values (Details)</LongName>
      <ReportType>Sheet</ReportType>
      <Role>http://www.wdc.com/role/PensionandOtherPostRetirementBenefitPlansDefinedBenefitPensionPlansMajorAssetCategoriesandTheirAssociatedFairValuesDetails</Role>
      <ShortName>Pension and Other Post-Retirement Benefit Plans - Defined Benefit Pension Plans' Major Asset Categories and Their Associated Fair Values (Details)</ShortName>
      <MenuCategory>Details</MenuCategory>
      <Position>70</Position>
    </Report>
    <Report instance="wdc-20240628.htm">
      <IsDefault>false</IsDefault>
      <HasEmbeddedReports>false</HasEmbeddedReports>
      <HtmlFileName>R71.htm</HtmlFileName>
      <LongName>9954512 - Disclosure - Related Parties and Related Commitments and Contingencies - Additional Information (Details)</LongName>
      <ReportType>Sheet</ReportType>
      <Role>http://www.wdc.com/role/RelatedPartiesandRelatedCommitmentsandContingenciesAdditionalInformationDetails</Role>
      <ShortName>Related Parties and Related Commitments and Contingencies - Additional Information (Details)</ShortName>
      <MenuCategory>Details</MenuCategory>
      <Position>71</Position>
    </Report>
    <Report instance="wdc-20240628.htm">
      <IsDefault>false</IsDefault>
      <HasEmbeddedReports>false</HasEmbeddedReports>
      <HtmlFileName>R72.htm</HtmlFileName>
      <LongName>9954513 - Disclosure - Related Parties and Related Commitments and Contingencies - Equity Investments (Details)</LongName>
      <ReportType>Sheet</ReportType>
      <Role>http://www.wdc.com/role/RelatedPartiesandRelatedCommitmentsandContingenciesEquityInvestmentsDetails</Role>
      <ShortName>Related Parties and Related Commitments and Contingencies - Equity Investments (Details)</ShortName>
      <MenuCategory>Details</MenuCategory>
      <Position>72</Position>
    </Report>
    <Report instance="wdc-20240628.htm">
      <IsDefault>false</IsDefault>
      <HasEmbeddedReports>false</HasEmbeddedReports>
      <HtmlFileName>R73.htm</HtmlFileName>
      <LongName>9954514 - Disclosure - Related Parties and Related Commitments and Contingencies - Maximum Loss Exposure (Details)</LongName>
      <ReportType>Sheet</ReportType>
      <Role>http://www.wdc.com/role/RelatedPartiesandRelatedCommitmentsandContingenciesMaximumLossExposureDetails</Role>
      <ShortName>Related Parties and Related Commitments and Contingencies - Maximum Loss Exposure (Details)</ShortName>
      <MenuCategory>Details</MenuCategory>
      <Position>73</Position>
    </Report>
    <Report instance="wdc-20240628.htm">
      <IsDefault>false</IsDefault>
      <HasEmbeddedReports>false</HasEmbeddedReports>
      <HtmlFileName>R74.htm</HtmlFileName>
      <LongName>9954515 - Disclosure - Related Parties and Related Commitments and Contingencies - JV Lease Guarantees (Details)</LongName>
      <ReportType>Sheet</ReportType>
      <Role>http://www.wdc.com/role/RelatedPartiesandRelatedCommitmentsandContingenciesJVLeaseGuaranteesDetails</Role>
      <ShortName>Related Parties and Related Commitments and Contingencies - JV Lease Guarantees (Details)</ShortName>
      <MenuCategory>Details</MenuCategory>
      <Position>74</Position>
    </Report>
    <Report instance="wdc-20240628.htm">
      <IsDefault>false</IsDefault>
      <HasEmbeddedReports>false</HasEmbeddedReports>
      <HtmlFileName>R75.htm</HtmlFileName>
      <LongName>9954516 - Disclosure - Related Parties and Related Commitments and Contingencies - Joint Venture Lease Amounts (Details)</LongName>
      <ReportType>Sheet</ReportType>
      <Role>http://www.wdc.com/role/RelatedPartiesandRelatedCommitmentsandContingenciesJointVentureLeaseAmountsDetails</Role>
      <ShortName>Related Parties and Related Commitments and Contingencies - Joint Venture Lease Amounts (Details)</ShortName>
      <MenuCategory>Details</MenuCategory>
      <Position>75</Position>
    </Report>
    <Report instance="wdc-20240628.htm">
      <IsDefault>false</IsDefault>
      <HasEmbeddedReports>false</HasEmbeddedReports>
      <HtmlFileName>R76.htm</HtmlFileName>
      <LongName>9954517 - Disclosure - Leases and Other Commitments - Supplemental Balance Sheet (Details)</LongName>
      <ReportType>Sheet</ReportType>
      <Role>http://www.wdc.com/role/LeasesandOtherCommitmentsSupplementalBalanceSheetDetails</Role>
      <ShortName>Leases and Other Commitments - Supplemental Balance Sheet (Details)</ShortName>
      <MenuCategory>Details</MenuCategory>
      <Position>76</Position>
    </Report>
    <Report instance="wdc-20240628.htm">
      <IsDefault>false</IsDefault>
      <HasEmbeddedReports>false</HasEmbeddedReports>
      <HtmlFileName>R77.htm</HtmlFileName>
      <LongName>9954518 - Disclosure - Leases and Other Commitments - Supplemental Cash Flow (Details)</LongName>
      <ReportType>Sheet</ReportType>
      <Role>http://www.wdc.com/role/LeasesandOtherCommitmentsSupplementalCashFlowDetails</Role>
      <ShortName>Leases and Other Commitments - Supplemental Cash Flow (Details)</ShortName>
      <MenuCategory>Details</MenuCategory>
      <Position>77</Position>
    </Report>
    <Report instance="wdc-20240628.htm">
      <IsDefault>false</IsDefault>
      <HasEmbeddedReports>false</HasEmbeddedReports>
      <HtmlFileName>R78.htm</HtmlFileName>
      <LongName>9954519 - Disclosure - Leases and Other Commitments - Minimum Lease Payments (Details)</LongName>
      <ReportType>Sheet</ReportType>
      <Role>http://www.wdc.com/role/LeasesandOtherCommitmentsMinimumLeasePaymentsDetails</Role>
      <ShortName>Leases and Other Commitments - Minimum Lease Payments (Details)</ShortName>
      <MenuCategory>Details</MenuCategory>
      <Position>78</Position>
    </Report>
    <Report instance="wdc-20240628.htm">
      <IsDefault>false</IsDefault>
      <HasEmbeddedReports>false</HasEmbeddedReports>
      <HtmlFileName>R79.htm</HtmlFileName>
      <LongName>9954520 - Disclosure - Leases and Other Commitments - Additional Information (Details)</LongName>
      <ReportType>Sheet</ReportType>
      <Role>http://www.wdc.com/role/LeasesandOtherCommitmentsAdditionalInformationDetails</Role>
      <ShortName>Leases and Other Commitments - Additional Information (Details)</ShortName>
      <MenuCategory>Details</MenuCategory>
      <Position>79</Position>
    </Report>
    <Report instance="wdc-20240628.htm">
      <IsDefault>false</IsDefault>
      <HasEmbeddedReports>false</HasEmbeddedReports>
      <HtmlFileName>R80.htm</HtmlFileName>
      <LongName>9954521 - Disclosure - Leases and Other Commitments - Long-Term Commitments (Details)</LongName>
      <ReportType>Sheet</ReportType>
      <Role>http://www.wdc.com/role/LeasesandOtherCommitmentsLongTermCommitmentsDetails</Role>
      <ShortName>Leases and Other Commitments - Long-Term Commitments (Details)</ShortName>
      <MenuCategory>Details</MenuCategory>
      <Position>80</Position>
    </Report>
    <Report instance="wdc-20240628.htm">
      <IsDefault>false</IsDefault>
      <HasEmbeddedReports>false</HasEmbeddedReports>
      <HtmlFileName>R81.htm</HtmlFileName>
      <LongName>9954522 - Disclosure - Western Digital Corporation 401(k) Plan - Additional Information (Details)</LongName>
      <ReportType>Sheet</ReportType>
      <Role>http://www.wdc.com/role/WesternDigitalCorporation401kPlanAdditionalInformationDetails</Role>
      <ShortName>Western Digital Corporation 401(k) Plan - Additional Information (Details)</ShortName>
      <MenuCategory>Details</MenuCategory>
      <Position>81</Position>
    </Report>
    <Report instance="wdc-20240628.htm">
      <IsDefault>false</IsDefault>
      <HasEmbeddedReports>false</HasEmbeddedReports>
      <HtmlFileName>R82.htm</HtmlFileName>
      <LongName>9954523 - Disclosure - Shareholders??? Equity and Convertible Preferred Stock - 2021 Long Term Incentive Plan and ESPP (Details)</LongName>
      <ReportType>Sheet</ReportType>
      <Role>http://www.wdc.com/role/ShareholdersEquityandConvertiblePreferredStock2021LongTermIncentivePlanandESPPDetails</Role>
      <ShortName>Shareholders??? Equity and Convertible Preferred Stock - 2021 Long Term Incentive Plan and ESPP (Details)</ShortName>
      <MenuCategory>Details</MenuCategory>
      <Position>82</Position>
    </Report>
    <Report instance="wdc-20240628.htm">
      <IsDefault>false</IsDefault>
      <HasEmbeddedReports>false</HasEmbeddedReports>
      <HtmlFileName>R83.htm</HtmlFileName>
      <LongName>9954524 - Disclosure - Shareholders??? Equity and Convertible Preferred Stock - Stock-Based Compensation Expense (Details)</LongName>
      <ReportType>Sheet</ReportType>
      <Role>http://www.wdc.com/role/ShareholdersEquityandConvertiblePreferredStockStockBasedCompensationExpenseDetails</Role>
      <ShortName>Shareholders??? Equity and Convertible Preferred Stock - Stock-Based Compensation Expense (Details)</ShortName>
      <MenuCategory>Details</MenuCategory>
      <Position>83</Position>
    </Report>
    <Report instance="wdc-20240628.htm">
      <IsDefault>false</IsDefault>
      <HasEmbeddedReports>false</HasEmbeddedReports>
      <HtmlFileName>R84.htm</HtmlFileName>
      <LongName>9954525 - Disclosure - Shareholders??? Equity and Convertible Preferred Stock - Unrecognized Share-based Compensation (Details)</LongName>
      <ReportType>Sheet</ReportType>
      <Role>http://www.wdc.com/role/ShareholdersEquityandConvertiblePreferredStockUnrecognizedSharebasedCompensationDetails</Role>
      <ShortName>Shareholders??? Equity and Convertible Preferred Stock - Unrecognized Share-based Compensation (Details)</ShortName>
      <MenuCategory>Details</MenuCategory>
      <Position>84</Position>
    </Report>
    <Report instance="wdc-20240628.htm">
      <IsDefault>false</IsDefault>
      <HasEmbeddedReports>false</HasEmbeddedReports>
      <HtmlFileName>R85.htm</HtmlFileName>
      <LongName>9954526 - Disclosure - Shareholders??? Equity and Convertible Preferred Stock - Stock Option Activity (Details)</LongName>
      <ReportType>Sheet</ReportType>
      <Role>http://www.wdc.com/role/ShareholdersEquityandConvertiblePreferredStockStockOptionActivityDetails</Role>
      <ShortName>Shareholders??? Equity and Convertible Preferred Stock - Stock Option Activity (Details)</ShortName>
      <MenuCategory>Details</MenuCategory>
      <Position>85</Position>
    </Report>
    <Report instance="wdc-20240628.htm">
      <IsDefault>false</IsDefault>
      <HasEmbeddedReports>false</HasEmbeddedReports>
      <HtmlFileName>R86.htm</HtmlFileName>
      <LongName>9954527 - Disclosure - Shareholders??? Equity and Convertible Preferred Stock - Restricted Stock Units And Performance Share Units (Details)</LongName>
      <ReportType>Sheet</ReportType>
      <Role>http://www.wdc.com/role/ShareholdersEquityandConvertiblePreferredStockRestrictedStockUnitsAndPerformanceShareUnitsDetails</Role>
      <ShortName>Shareholders??? Equity and Convertible Preferred Stock - Restricted Stock Units And Performance Share Units (Details)</ShortName>
      <MenuCategory>Details</MenuCategory>
      <Position>86</Position>
    </Report>
    <Report instance="wdc-20240628.htm">
      <IsDefault>false</IsDefault>
      <HasEmbeddedReports>false</HasEmbeddedReports>
      <HtmlFileName>R87.htm</HtmlFileName>
      <LongName>9954528 - Disclosure - Shareholders??? Equity and Convertible Preferred Stock - Fair Values Assumptions User For Employee Stock Purchase Plan Granted (Details)</LongName>
      <ReportType>Sheet</ReportType>
      <Role>http://www.wdc.com/role/ShareholdersEquityandConvertiblePreferredStockFairValuesAssumptionsUserForEmployeeStockPurchasePlanGrantedDetails</Role>
      <ShortName>Shareholders??? Equity and Convertible Preferred Stock - Fair Values Assumptions User For Employee Stock Purchase Plan Granted (Details)</ShortName>
      <MenuCategory>Details</MenuCategory>
      <Position>87</Position>
    </Report>
    <Report instance="wdc-20240628.htm">
      <IsDefault>false</IsDefault>
      <HasEmbeddedReports>false</HasEmbeddedReports>
      <HtmlFileName>R88.htm</HtmlFileName>
      <LongName>9954529 - Disclosure - Shareholders??? Equity and Convertible Preferred Stock - Convertible Preferred Stock (Details)</LongName>
      <ReportType>Sheet</ReportType>
      <Role>http://www.wdc.com/role/ShareholdersEquityandConvertiblePreferredStockConvertiblePreferredStockDetails</Role>
      <ShortName>Shareholders??? Equity and Convertible Preferred Stock - Convertible Preferred Stock (Details)</ShortName>
      <MenuCategory>Details</MenuCategory>
      <Position>88</Position>
    </Report>
    <Report instance="wdc-20240628.htm">
      <IsDefault>false</IsDefault>
      <HasEmbeddedReports>false</HasEmbeddedReports>
      <HtmlFileName>R89.htm</HtmlFileName>
      <LongName>9954530 - Disclosure - Shareholders??? Equity and Convertible Preferred Stock - Stock Reserved for Issuance (Details)</LongName>
      <ReportType>Sheet</ReportType>
      <Role>http://www.wdc.com/role/ShareholdersEquityandConvertiblePreferredStockStockReservedforIssuanceDetails</Role>
      <ShortName>Shareholders??? Equity and Convertible Preferred Stock - Stock Reserved for Issuance (Details)</ShortName>
      <MenuCategory>Details</MenuCategory>
      <Position>89</Position>
    </Report>
    <Report instance="wdc-20240628.htm">
      <IsDefault>false</IsDefault>
      <HasEmbeddedReports>false</HasEmbeddedReports>
      <HtmlFileName>R90.htm</HtmlFileName>
      <LongName>9954531 - Disclosure - Income Tax Expense - Domestic and Foreign Components of Income Before Income Taxes (Details)</LongName>
      <ReportType>Sheet</ReportType>
      <Role>http://www.wdc.com/role/IncomeTaxExpenseDomesticandForeignComponentsofIncomeBeforeIncomeTaxesDetails</Role>
      <ShortName>Income Tax Expense - Domestic and Foreign Components of Income Before Income Taxes (Details)</ShortName>
      <MenuCategory>Details</MenuCategory>
      <Position>90</Position>
    </Report>
    <Report instance="wdc-20240628.htm">
      <IsDefault>false</IsDefault>
      <HasEmbeddedReports>false</HasEmbeddedReports>
      <HtmlFileName>R91.htm</HtmlFileName>
      <LongName>9954532 - Disclosure - Income Tax Expense - Components of Provision for Income Taxes (Details)</LongName>
      <ReportType>Sheet</ReportType>
      <Role>http://www.wdc.com/role/IncomeTaxExpenseComponentsofProvisionforIncomeTaxesDetails</Role>
      <ShortName>Income Tax Expense - Components of Provision for Income Taxes (Details)</ShortName>
      <MenuCategory>Details</MenuCategory>
      <Position>91</Position>
    </Report>
    <Report instance="wdc-20240628.htm">
      <IsDefault>false</IsDefault>
      <HasEmbeddedReports>false</HasEmbeddedReports>
      <HtmlFileName>R92.htm</HtmlFileName>
      <LongName>9954533 - Disclosure - Income Tax Expense - Deferred Tax Assets and Liabilities (Details)</LongName>
      <ReportType>Sheet</ReportType>
      <Role>http://www.wdc.com/role/IncomeTaxExpenseDeferredTaxAssetsandLiabilitiesDetails</Role>
      <ShortName>Income Tax Expense - Deferred Tax Assets and Liabilities (Details)</ShortName>
      <MenuCategory>Details</MenuCategory>
      <Position>92</Position>
    </Report>
    <Report instance="wdc-20240628.htm">
      <IsDefault>false</IsDefault>
      <HasEmbeddedReports>false</HasEmbeddedReports>
      <HtmlFileName>R93.htm</HtmlFileName>
      <LongName>9954534 - Disclosure - Income Tax Expense - Additional Information (Details)</LongName>
      <ReportType>Sheet</ReportType>
      <Role>http://www.wdc.com/role/IncomeTaxExpenseAdditionalInformationDetails</Role>
      <ShortName>Income Tax Expense - Additional Information (Details)</ShortName>
      <MenuCategory>Details</MenuCategory>
      <Position>93</Position>
    </Report>
    <Report instance="wdc-20240628.htm">
      <IsDefault>false</IsDefault>
      <HasEmbeddedReports>false</HasEmbeddedReports>
      <HtmlFileName>R94.htm</HtmlFileName>
      <LongName>9954535 - Disclosure - Income Tax Expense - Reconciliation of the U.S. Federal statutory rate (Details)</LongName>
      <ReportType>Sheet</ReportType>
      <Role>http://www.wdc.com/role/IncomeTaxExpenseReconciliationoftheUSFederalstatutoryrateDetails</Role>
      <ShortName>Income Tax Expense - Reconciliation of the U.S. Federal statutory rate (Details)</ShortName>
      <MenuCategory>Details</MenuCategory>
      <Position>94</Position>
    </Report>
    <Report instance="wdc-20240628.htm">
      <IsDefault>false</IsDefault>
      <HasEmbeddedReports>false</HasEmbeddedReports>
      <HtmlFileName>R95.htm</HtmlFileName>
      <LongName>9954536 - Disclosure - Income Tax Expense - NOL Carryforward (Details)</LongName>
      <ReportType>Sheet</ReportType>
      <Role>http://www.wdc.com/role/IncomeTaxExpenseNOLCarryforwardDetails</Role>
      <ShortName>Income Tax Expense - NOL Carryforward (Details)</ShortName>
      <MenuCategory>Details</MenuCategory>
      <Position>95</Position>
    </Report>
    <Report instance="wdc-20240628.htm">
      <IsDefault>false</IsDefault>
      <HasEmbeddedReports>false</HasEmbeddedReports>
      <HtmlFileName>R96.htm</HtmlFileName>
      <LongName>9954537 - Disclosure - Income Tax Expense - Unrecognized Tax Benefits (Details)</LongName>
      <ReportType>Sheet</ReportType>
      <Role>http://www.wdc.com/role/IncomeTaxExpenseUnrecognizedTaxBenefitsDetails</Role>
      <ShortName>Income Tax Expense - Unrecognized Tax Benefits (Details)</ShortName>
      <MenuCategory>Details</MenuCategory>
      <Position>96</Position>
    </Report>
    <Report instance="wdc-20240628.htm">
      <IsDefault>false</IsDefault>
      <HasEmbeddedReports>false</HasEmbeddedReports>
      <HtmlFileName>R97.htm</HtmlFileName>
      <LongName>9954538 - Disclosure - Net Income (Loss) Per Common Share (Details)</LongName>
      <ReportType>Sheet</ReportType>
      <Role>http://www.wdc.com/role/NetIncomeLossPerCommonShareDetails</Role>
      <ShortName>Net Income (Loss) Per Common Share (Details)</ShortName>
      <MenuCategory>Details</MenuCategory>
      <ParentRole>http://www.wdc.com/role/NetIncomeLossPerCommonShareTables</ParentRole>
      <Position>97</Position>
    </Report>
    <Report instance="wdc-20240628.htm">
      <IsDefault>false</IsDefault>
      <HasEmbeddedReports>false</HasEmbeddedReports>
      <HtmlFileName>R98.htm</HtmlFileName>
      <LongName>9954539 - Disclosure - Employee Termination, Asset Impairment and Other Charges - Expense Recognition (Details)</LongName>
      <ReportType>Sheet</ReportType>
      <Role>http://www.wdc.com/role/EmployeeTerminationAssetImpairmentandOtherChargesExpenseRecognitionDetails</Role>
      <ShortName>Employee Termination, Asset Impairment and Other Charges - Expense Recognition (Details)</ShortName>
      <MenuCategory>Details</MenuCategory>
      <Position>98</Position>
    </Report>
    <Report instance="wdc-20240628.htm">
      <IsDefault>false</IsDefault>
      <HasEmbeddedReports>false</HasEmbeddedReports>
      <HtmlFileName>R99.htm</HtmlFileName>
      <LongName>9954540 - Disclosure - Employee Termination, Asset Impairment and Other Charges - Business Realignment Activities (Details)</LongName>
      <ReportType>Sheet</ReportType>
      <Role>http://www.wdc.com/role/EmployeeTerminationAssetImpairmentandOtherChargesBusinessRealignmentActivitiesDetails</Role>
      <ShortName>Employee Termination, Asset Impairment and Other Charges - Business Realignment Activities (Details)</ShortName>
      <MenuCategory>Details</MenuCategory>
      <Position>99</Position>
    </Report>
    <Report instance="wdc-20240628.htm">
      <IsDefault>false</IsDefault>
      <HasEmbeddedReports>false</HasEmbeddedReports>
      <HtmlFileName>R100.htm</HtmlFileName>
      <LongName>9954541 - Disclosure - Supplier Finance Program (Details)</LongName>
      <ReportType>Sheet</ReportType>
      <Role>http://www.wdc.com/role/SupplierFinanceProgramDetails</Role>
      <ShortName>Supplier Finance Program (Details)</ShortName>
      <MenuCategory>Details</MenuCategory>
      <ParentRole>http://www.wdc.com/role/SupplierFinanceProgram</ParentRole>
      <Position>100</Position>
    </Report>
    <Report instance="wdc-20240628.htm">
      <IsDefault>false</IsDefault>
      <HasEmbeddedReports>false</HasEmbeddedReports>
      <HtmlFileName>R101.htm</HtmlFileName>
      <LongName>9954542 - Disclosure - Legal Proceedings - Additional Information (Details)</LongName>
      <ReportType>Sheet</ReportType>
      <Role>http://www.wdc.com/role/LegalProceedingsAdditionalInformationDetails</Role>
      <ShortName>Legal Proceedings - Additional Information (Details)</ShortName>
      <MenuCategory>Details</MenuCategory>
      <Position>101</Position>
    </Report>
    <Report instance="wdc-20240628.htm">
      <IsDefault>false</IsDefault>
      <HasEmbeddedReports>false</HasEmbeddedReports>
      <HtmlFileName>R102.htm</HtmlFileName>
      <LongName>9954543 - Disclosure - Revision of Previously Issued Financial Statements - Condensed Consolidated Statement of Operations (Details)</LongName>
      <ReportType>Sheet</ReportType>
      <Role>http://www.wdc.com/role/RevisionofPreviouslyIssuedFinancialStatementsCondensedConsolidatedStatementofOperationsDetails</Role>
      <ShortName>Revision of Previously Issued Financial Statements - Condensed Consolidated Statement of Operations (Details)</ShortName>
      <MenuCategory>Details</MenuCategory>
      <Position>102</Position>
    </Report>
    <Report instance="wdc-20240628.htm">
      <IsDefault>false</IsDefault>
      <HasEmbeddedReports>false</HasEmbeddedReports>
      <HtmlFileName>R103.htm</HtmlFileName>
      <LongName>9954544 - Disclosure - Revision of Previously Issued Financial Statements - Condensed Consolidated Statement of Comprehensive Loss (Details)</LongName>
      <ReportType>Sheet</ReportType>
      <Role>http://www.wdc.com/role/RevisionofPreviouslyIssuedFinancialStatementsCondensedConsolidatedStatementofComprehensiveLossDetails</Role>
      <ShortName>Revision of Previously Issued Financial Statements - Condensed Consolidated Statement of Comprehensive Loss (Details)</ShortName>
      <MenuCategory>Details</MenuCategory>
      <Position>103</Position>
    </Report>
    <Report instance="wdc-20240628.htm">
      <IsDefault>false</IsDefault>
      <HasEmbeddedReports>false</HasEmbeddedReports>
      <HtmlFileName>R104.htm</HtmlFileName>
      <LongName>9954545 - Disclosure - Revision of Previously Issued Financial Statements - Condensed Consolidated Statement of Cash Flows (Details)</LongName>
      <ReportType>Sheet</ReportType>
      <Role>http://www.wdc.com/role/RevisionofPreviouslyIssuedFinancialStatementsCondensedConsolidatedStatementofCashFlowsDetails</Role>
      <ShortName>Revision of Previously Issued Financial Statements - Condensed Consolidated Statement of Cash Flows (Details)</ShortName>
      <MenuCategory>Details</MenuCategory>
      <Position>104</Position>
    </Report>
    <Report instance="wdc-20240628.htm">
      <IsDefault>false</IsDefault>
      <HasEmbeddedReports>false</HasEmbeddedReports>
      <HtmlFileName>R105.htm</HtmlFileName>
      <LongName>9954546 - Disclosure - Revision of Previously Issued Financial Statements - Condensed Consolidated Statement of Shareholders??? Equity (Details)</LongName>
      <ReportType>Sheet</ReportType>
      <Role>http://www.wdc.com/role/RevisionofPreviouslyIssuedFinancialStatementsCondensedConsolidatedStatementofShareholdersEquityDetails</Role>
      <ShortName>Revision of Previously Issued Financial Statements - Condensed Consolidated Statement of Shareholders??? Equity (Details)</ShortName>
      <MenuCategory>Details</MenuCategory>
      <Position>105</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" isDefinitelyFs="true" isUsgaap="true" original="wdc-20240628.htm">wdc-20240628.htm</File>
    <File>wdc-20240628.xsd</File>
    <File>wdc-20240628_cal.xml</File>
    <File>wdc-20240628_def.xml</File>
    <File>wdc-20240628_lab.xml</File>
    <File>wdc-20240628_pre.xml</File>
  </InputFiles>
  <SupplementalFiles>
    <File>wdc-20240628_g1.gif</File>
    <File>wdc-20240628_g2.jpg</File>
  </SupplementalFiles>
  <BaseTaxonomies>
    <BaseTaxonomy items="1">http://fasb.org/srt/2024</BaseTaxonomy>
    <BaseTaxonomy items="1534">http://fasb.org/us-gaap/2024</BaseTaxonomy>
    <BaseTaxonomy items="39">http://xbrl.sec.gov/dei/2024</BaseTaxonomy>
    <BaseTaxonomy items="28">http://xbrl.sec.gov/ecd/2024</BaseTaxonomy>
  </BaseTaxonomies>
  <HasPresentationLinkbase>true</HasPresentationLinkbase>
  <HasCalculationLinkbase>true</HasCalculationLinkbase>
</FilingSummary>
