<?xml version='1.0' encoding='utf-8'?>
<FilingSummary>
  <Version>3.26.1</Version>
  <ProcessingTime/>
  <ReportFormat>html</ReportFormat>
  <ContextCount>312</ContextCount>
  <ElementCount>363</ElementCount>
  <EntityCount>1</EntityCount>
  <FootnotesReported>false</FootnotesReported>
  <SegmentCount>79</SegmentCount>
  <ScenarioCount>0</ScenarioCount>
  <TuplesReported>false</TuplesReported>
  <UnitCount>8</UnitCount>
  <MyReports>
    <Report instance="wdc-20260403.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-20260403.htm">
      <IsDefault>false</IsDefault>
      <HasEmbeddedReports>false</HasEmbeddedReports>
      <HtmlFileName>R2.htm</HtmlFileName>
      <LongName>9952151 - Statement - CONDENSED CONSOLIDATED BALANCE SHEETS</LongName>
      <ReportType>Sheet</ReportType>
      <Role>http://www.wdc.com/role/CONDENSEDCONSOLIDATEDBALANCESHEETS</Role>
      <ShortName>CONDENSED CONSOLIDATED BALANCE SHEETS</ShortName>
      <MenuCategory>Statements</MenuCategory>
      <Position>2</Position>
    </Report>
    <Report instance="wdc-20260403.htm">
      <IsDefault>false</IsDefault>
      <HasEmbeddedReports>false</HasEmbeddedReports>
      <HtmlFileName>R3.htm</HtmlFileName>
      <LongName>9952152 - Statement - CONDENSED CONSOLIDATED STATEMENTS OF OPERATIONS</LongName>
      <ReportType>Sheet</ReportType>
      <Role>http://www.wdc.com/role/CONDENSEDCONSOLIDATEDSTATEMENTSOFOPERATIONS</Role>
      <ShortName>CONDENSED CONSOLIDATED STATEMENTS OF OPERATIONS</ShortName>
      <MenuCategory>Statements</MenuCategory>
      <Position>3</Position>
    </Report>
    <Report instance="wdc-20260403.htm">
      <IsDefault>false</IsDefault>
      <HasEmbeddedReports>false</HasEmbeddedReports>
      <HtmlFileName>R4.htm</HtmlFileName>
      <LongName>9952153 - Statement - CONDENSED CONSOLIDATED STATEMENTS OF COMPREHENSIVE INCOME</LongName>
      <ReportType>Sheet</ReportType>
      <Role>http://www.wdc.com/role/CONDENSEDCONSOLIDATEDSTATEMENTSOFCOMPREHENSIVEINCOME</Role>
      <ShortName>CONDENSED CONSOLIDATED STATEMENTS OF COMPREHENSIVE INCOME</ShortName>
      <MenuCategory>Statements</MenuCategory>
      <Position>4</Position>
    </Report>
    <Report instance="wdc-20260403.htm">
      <IsDefault>false</IsDefault>
      <HasEmbeddedReports>false</HasEmbeddedReports>
      <HtmlFileName>R5.htm</HtmlFileName>
      <LongName>9952154 - Statement - CONDENSED CONSOLIDATED STATEMENTS OF CASH FLOWS</LongName>
      <ReportType>Sheet</ReportType>
      <Role>http://www.wdc.com/role/CONDENSEDCONSOLIDATEDSTATEMENTSOFCASHFLOWS</Role>
      <ShortName>CONDENSED CONSOLIDATED STATEMENTS OF CASH FLOWS</ShortName>
      <MenuCategory>Statements</MenuCategory>
      <Position>5</Position>
    </Report>
    <Report instance="wdc-20260403.htm">
      <IsDefault>false</IsDefault>
      <HasEmbeddedReports>false</HasEmbeddedReports>
      <HtmlFileName>R6.htm</HtmlFileName>
      <LongName>9952155 - Statement - CONDENSED CONSOLIDATED STATEMENTS OF CONVERTIBLE PREFERRED STOCK AND SHAREHOLDERS??? EQUITY</LongName>
      <ReportType>Sheet</ReportType>
      <Role>http://www.wdc.com/role/CONDENSEDCONSOLIDATEDSTATEMENTSOFCONVERTIBLEPREFERREDSTOCKANDSHAREHOLDERSEQUITY</Role>
      <ShortName>CONDENSED CONSOLIDATED STATEMENTS OF CONVERTIBLE PREFERRED STOCK AND SHAREHOLDERS??? EQUITY</ShortName>
      <MenuCategory>Statements</MenuCategory>
      <Position>6</Position>
    </Report>
    <Report instance="wdc-20260403.htm">
      <IsDefault>false</IsDefault>
      <HasEmbeddedReports>false</HasEmbeddedReports>
      <HtmlFileName>R7.htm</HtmlFileName>
      <LongName>9952156 - 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>7</Position>
    </Report>
    <Report instance="wdc-20260403.htm">
      <IsDefault>false</IsDefault>
      <HasEmbeddedReports>false</HasEmbeddedReports>
      <HtmlFileName>R8.htm</HtmlFileName>
      <LongName>9952157 - 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>8</Position>
    </Report>
    <Report instance="wdc-20260403.htm">
      <IsDefault>false</IsDefault>
      <HasEmbeddedReports>false</HasEmbeddedReports>
      <HtmlFileName>R9.htm</HtmlFileName>
      <LongName>9952158 - Disclosure - Disaggregated Revenue, Geographic Information, Concentrations of Risk, and Segment Reporting</LongName>
      <ReportType>Sheet</ReportType>
      <Role>http://www.wdc.com/role/DisaggregatedRevenueGeographicInformationConcentrationsofRiskandSegmentReporting</Role>
      <ShortName>Disaggregated Revenue, Geographic Information, Concentrations of Risk, and Segment Reporting</ShortName>
      <MenuCategory>Notes</MenuCategory>
      <Position>9</Position>
    </Report>
    <Report instance="wdc-20260403.htm">
      <IsDefault>false</IsDefault>
      <HasEmbeddedReports>false</HasEmbeddedReports>
      <HtmlFileName>R10.htm</HtmlFileName>
      <LongName>9952159 - Disclosure - Discontinued Operations</LongName>
      <ReportType>Sheet</ReportType>
      <Role>http://www.wdc.com/role/DiscontinuedOperations</Role>
      <ShortName>Discontinued Operations</ShortName>
      <MenuCategory>Notes</MenuCategory>
      <Position>10</Position>
    </Report>
    <Report instance="wdc-20260403.htm">
      <IsDefault>false</IsDefault>
      <HasEmbeddedReports>false</HasEmbeddedReports>
      <HtmlFileName>R11.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>11</Position>
    </Report>
    <Report instance="wdc-20260403.htm">
      <IsDefault>false</IsDefault>
      <HasEmbeddedReports>false</HasEmbeddedReports>
      <HtmlFileName>R12.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>12</Position>
    </Report>
    <Report instance="wdc-20260403.htm">
      <IsDefault>false</IsDefault>
      <HasEmbeddedReports>false</HasEmbeddedReports>
      <HtmlFileName>R13.htm</HtmlFileName>
      <LongName>9952162 - Disclosure - Debt</LongName>
      <ReportType>Sheet</ReportType>
      <Role>http://www.wdc.com/role/Debt</Role>
      <ShortName>Debt</ShortName>
      <MenuCategory>Notes</MenuCategory>
      <Position>13</Position>
    </Report>
    <Report instance="wdc-20260403.htm">
      <IsDefault>false</IsDefault>
      <HasEmbeddedReports>false</HasEmbeddedReports>
      <HtmlFileName>R14.htm</HtmlFileName>
      <LongName>9952163 - 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>14</Position>
    </Report>
    <Report instance="wdc-20260403.htm">
      <IsDefault>false</IsDefault>
      <HasEmbeddedReports>false</HasEmbeddedReports>
      <HtmlFileName>R15.htm</HtmlFileName>
      <LongName>9952164 - Disclosure - Income Taxes</LongName>
      <ReportType>Sheet</ReportType>
      <Role>http://www.wdc.com/role/IncomeTaxes</Role>
      <ShortName>Income Taxes</ShortName>
      <MenuCategory>Notes</MenuCategory>
      <Position>15</Position>
    </Report>
    <Report instance="wdc-20260403.htm">
      <IsDefault>false</IsDefault>
      <HasEmbeddedReports>false</HasEmbeddedReports>
      <HtmlFileName>R16.htm</HtmlFileName>
      <LongName>9952165 - Disclosure - Business Realignment Charges</LongName>
      <ReportType>Sheet</ReportType>
      <Role>http://www.wdc.com/role/BusinessRealignmentCharges</Role>
      <ShortName>Business Realignment Charges</ShortName>
      <MenuCategory>Notes</MenuCategory>
      <Position>16</Position>
    </Report>
    <Report instance="wdc-20260403.htm">
      <IsDefault>false</IsDefault>
      <HasEmbeddedReports>false</HasEmbeddedReports>
      <HtmlFileName>R17.htm</HtmlFileName>
      <LongName>9952166 - 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>17</Position>
    </Report>
    <Report instance="wdc-20260403.htm">
      <IsDefault>false</IsDefault>
      <HasEmbeddedReports>false</HasEmbeddedReports>
      <HtmlFileName>R18.htm</HtmlFileName>
      <LongName>9952167 - 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>18</Position>
    </Report>
    <Report instance="wdc-20260403.htm">
      <IsDefault>false</IsDefault>
      <HasEmbeddedReports>false</HasEmbeddedReports>
      <HtmlFileName>R19.htm</HtmlFileName>
      <LongName>9952168 - Disclosure - Net Income Per Common Share</LongName>
      <ReportType>Sheet</ReportType>
      <Role>http://www.wdc.com/role/NetIncomePerCommonShare</Role>
      <ShortName>Net Income Per Common Share</ShortName>
      <MenuCategory>Notes</MenuCategory>
      <Position>19</Position>
    </Report>
    <Report instance="wdc-20260403.htm">
      <IsDefault>false</IsDefault>
      <HasEmbeddedReports>false</HasEmbeddedReports>
      <HtmlFileName>R20.htm</HtmlFileName>
      <LongName>9952169 - Disclosure - Legal Proceedings</LongName>
      <ReportType>Sheet</ReportType>
      <Role>http://www.wdc.com/role/LegalProceedings</Role>
      <ShortName>Legal Proceedings</ShortName>
      <MenuCategory>Notes</MenuCategory>
      <Position>20</Position>
    </Report>
    <Report instance="wdc-20260403.htm">
      <IsDefault>false</IsDefault>
      <HasEmbeddedReports>false</HasEmbeddedReports>
      <HtmlFileName>R21.htm</HtmlFileName>
      <LongName>995445 - Disclosure - Insider Trading Arrangements</LongName>
      <ReportType>Sheet</ReportType>
      <Role>http://xbrl.sec.gov/ecd/role/InsiderTradingArrangements</Role>
      <ShortName>Insider Trading Arrangements</ShortName>
      <MenuCategory>Notes</MenuCategory>
      <Position>21</Position>
    </Report>
    <Report instance="wdc-20260403.htm">
      <IsDefault>false</IsDefault>
      <HasEmbeddedReports>false</HasEmbeddedReports>
      <HtmlFileName>R22.htm</HtmlFileName>
      <LongName>9955511 - 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>22</Position>
    </Report>
    <Report instance="wdc-20260403.htm">
      <IsDefault>false</IsDefault>
      <HasEmbeddedReports>false</HasEmbeddedReports>
      <HtmlFileName>R23.htm</HtmlFileName>
      <LongName>9955512 - Disclosure - Disaggregated Revenue, Geographic Information, Concentrations of Risk, and Segment Reporting (Tables)</LongName>
      <ReportType>Sheet</ReportType>
      <Role>http://www.wdc.com/role/DisaggregatedRevenueGeographicInformationConcentrationsofRiskandSegmentReportingTables</Role>
      <ShortName>Disaggregated Revenue, Geographic Information, Concentrations of Risk, and Segment Reporting (Tables)</ShortName>
      <MenuCategory>Tables</MenuCategory>
      <ParentRole>http://www.wdc.com/role/DisaggregatedRevenueGeographicInformationConcentrationsofRiskandSegmentReporting</ParentRole>
      <Position>23</Position>
    </Report>
    <Report instance="wdc-20260403.htm">
      <IsDefault>false</IsDefault>
      <HasEmbeddedReports>false</HasEmbeddedReports>
      <HtmlFileName>R24.htm</HtmlFileName>
      <LongName>9955513 - Disclosure - Discontinued Operations (Tables)</LongName>
      <ReportType>Sheet</ReportType>
      <Role>http://www.wdc.com/role/DiscontinuedOperationsTables</Role>
      <ShortName>Discontinued Operations (Tables)</ShortName>
      <MenuCategory>Tables</MenuCategory>
      <ParentRole>http://www.wdc.com/role/DiscontinuedOperations</ParentRole>
      <Position>24</Position>
    </Report>
    <Report instance="wdc-20260403.htm">
      <IsDefault>false</IsDefault>
      <HasEmbeddedReports>false</HasEmbeddedReports>
      <HtmlFileName>R25.htm</HtmlFileName>
      <LongName>9955514 - 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>25</Position>
    </Report>
    <Report instance="wdc-20260403.htm">
      <IsDefault>false</IsDefault>
      <HasEmbeddedReports>false</HasEmbeddedReports>
      <HtmlFileName>R26.htm</HtmlFileName>
      <LongName>9955515 - 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>26</Position>
    </Report>
    <Report instance="wdc-20260403.htm">
      <IsDefault>false</IsDefault>
      <HasEmbeddedReports>false</HasEmbeddedReports>
      <HtmlFileName>R27.htm</HtmlFileName>
      <LongName>9955516 - 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>27</Position>
    </Report>
    <Report instance="wdc-20260403.htm">
      <IsDefault>false</IsDefault>
      <HasEmbeddedReports>false</HasEmbeddedReports>
      <HtmlFileName>R28.htm</HtmlFileName>
      <LongName>9955517 - 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>28</Position>
    </Report>
    <Report instance="wdc-20260403.htm">
      <IsDefault>false</IsDefault>
      <HasEmbeddedReports>false</HasEmbeddedReports>
      <HtmlFileName>R29.htm</HtmlFileName>
      <LongName>9955518 - Disclosure - Income Taxes (Tables)</LongName>
      <ReportType>Sheet</ReportType>
      <Role>http://www.wdc.com/role/IncomeTaxesTables</Role>
      <ShortName>Income Taxes (Tables)</ShortName>
      <MenuCategory>Tables</MenuCategory>
      <ParentRole>http://www.wdc.com/role/IncomeTaxes</ParentRole>
      <Position>29</Position>
    </Report>
    <Report instance="wdc-20260403.htm">
      <IsDefault>false</IsDefault>
      <HasEmbeddedReports>false</HasEmbeddedReports>
      <HtmlFileName>R30.htm</HtmlFileName>
      <LongName>9955519 - Disclosure - Business Realignment Charges (Tables)</LongName>
      <ReportType>Sheet</ReportType>
      <Role>http://www.wdc.com/role/BusinessRealignmentChargesTables</Role>
      <ShortName>Business Realignment Charges (Tables)</ShortName>
      <MenuCategory>Tables</MenuCategory>
      <ParentRole>http://www.wdc.com/role/BusinessRealignmentCharges</ParentRole>
      <Position>30</Position>
    </Report>
    <Report instance="wdc-20260403.htm">
      <IsDefault>false</IsDefault>
      <HasEmbeddedReports>false</HasEmbeddedReports>
      <HtmlFileName>R31.htm</HtmlFileName>
      <LongName>9955520 - 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>31</Position>
    </Report>
    <Report instance="wdc-20260403.htm">
      <IsDefault>false</IsDefault>
      <HasEmbeddedReports>false</HasEmbeddedReports>
      <HtmlFileName>R32.htm</HtmlFileName>
      <LongName>9955521 - 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>32</Position>
    </Report>
    <Report instance="wdc-20260403.htm">
      <IsDefault>false</IsDefault>
      <HasEmbeddedReports>false</HasEmbeddedReports>
      <HtmlFileName>R33.htm</HtmlFileName>
      <LongName>9955522 - Disclosure - Net Income Per Common Share (Tables)</LongName>
      <ReportType>Sheet</ReportType>
      <Role>http://www.wdc.com/role/NetIncomePerCommonShareTables</Role>
      <ShortName>Net Income Per Common Share (Tables)</ShortName>
      <MenuCategory>Tables</MenuCategory>
      <ParentRole>http://www.wdc.com/role/NetIncomePerCommonShare</ParentRole>
      <Position>33</Position>
    </Report>
    <Report instance="wdc-20260403.htm">
      <IsDefault>false</IsDefault>
      <HasEmbeddedReports>false</HasEmbeddedReports>
      <HtmlFileName>R34.htm</HtmlFileName>
      <LongName>9955523 - Disclosure - Disaggregated Revenue, Geographic Information, Concentrations of Risk, and Segment Reporting - Schedule of Disaggregation of Revenue (Details)</LongName>
      <ReportType>Sheet</ReportType>
      <Role>http://www.wdc.com/role/DisaggregatedRevenueGeographicInformationConcentrationsofRiskandSegmentReportingScheduleofDisaggregationofRevenueDetails</Role>
      <ShortName>Disaggregated Revenue, Geographic Information, Concentrations of Risk, and Segment Reporting - Schedule of Disaggregation of Revenue (Details)</ShortName>
      <MenuCategory>Details</MenuCategory>
      <Position>34</Position>
    </Report>
    <Report instance="wdc-20260403.htm">
      <IsDefault>false</IsDefault>
      <HasEmbeddedReports>false</HasEmbeddedReports>
      <HtmlFileName>R35.htm</HtmlFileName>
      <LongName>9955524 - Disclosure - Disaggregated Revenue, Geographic Information, Concentrations of Risk, and Segment Reporting - Additional Information (Details)</LongName>
      <ReportType>Sheet</ReportType>
      <Role>http://www.wdc.com/role/DisaggregatedRevenueGeographicInformationConcentrationsofRiskandSegmentReportingAdditionalInformationDetails</Role>
      <ShortName>Disaggregated Revenue, Geographic Information, Concentrations of Risk, and Segment Reporting - Additional Information (Details)</ShortName>
      <MenuCategory>Details</MenuCategory>
      <Position>35</Position>
    </Report>
    <Report instance="wdc-20260403.htm">
      <IsDefault>false</IsDefault>
      <HasEmbeddedReports>false</HasEmbeddedReports>
      <HtmlFileName>R36.htm</HtmlFileName>
      <LongName>9955525 - Disclosure - Disaggregated Revenue, Geographic Information, Concentrations of Risk, and Segment Reporting - Schedule of Segment Reporting Information, by Segment (Details)</LongName>
      <ReportType>Sheet</ReportType>
      <Role>http://www.wdc.com/role/DisaggregatedRevenueGeographicInformationConcentrationsofRiskandSegmentReportingScheduleofSegmentReportingInformationbySegmentDetails</Role>
      <ShortName>Disaggregated Revenue, Geographic Information, Concentrations of Risk, and Segment Reporting - Schedule of Segment Reporting Information, by Segment (Details)</ShortName>
      <MenuCategory>Details</MenuCategory>
      <Position>36</Position>
    </Report>
    <Report instance="wdc-20260403.htm">
      <IsDefault>false</IsDefault>
      <HasEmbeddedReports>false</HasEmbeddedReports>
      <HtmlFileName>R37.htm</HtmlFileName>
      <LongName>9955526 - Disclosure - Discontinued Operations - Additional Information (Details)</LongName>
      <ReportType>Sheet</ReportType>
      <Role>http://www.wdc.com/role/DiscontinuedOperationsAdditionalInformationDetails</Role>
      <ShortName>Discontinued Operations - Additional Information (Details)</ShortName>
      <MenuCategory>Details</MenuCategory>
      <Position>37</Position>
    </Report>
    <Report instance="wdc-20260403.htm">
      <IsDefault>false</IsDefault>
      <HasEmbeddedReports>false</HasEmbeddedReports>
      <HtmlFileName>R38.htm</HtmlFileName>
      <LongName>9955527 - Disclosure - Discontinued Operations - Net Income (Loss) from Discontinued Operations, Net of Taxes (Details)</LongName>
      <ReportType>Sheet</ReportType>
      <Role>http://www.wdc.com/role/DiscontinuedOperationsNetIncomeLossfromDiscontinuedOperationsNetofTaxesDetails</Role>
      <ShortName>Discontinued Operations - Net Income (Loss) from Discontinued Operations, Net of Taxes (Details)</ShortName>
      <MenuCategory>Details</MenuCategory>
      <Position>38</Position>
    </Report>
    <Report instance="wdc-20260403.htm">
      <IsDefault>false</IsDefault>
      <HasEmbeddedReports>false</HasEmbeddedReports>
      <HtmlFileName>R39.htm</HtmlFileName>
      <LongName>9955528 - Disclosure - Discontinued Operations - Selected Cash Flow Information from Discontinued Operations (Details)</LongName>
      <ReportType>Sheet</ReportType>
      <Role>http://www.wdc.com/role/DiscontinuedOperationsSelectedCashFlowInformationfromDiscontinuedOperationsDetails</Role>
      <ShortName>Discontinued Operations - Selected Cash Flow Information from Discontinued Operations (Details)</ShortName>
      <MenuCategory>Details</MenuCategory>
      <Position>39</Position>
    </Report>
    <Report instance="wdc-20260403.htm">
      <IsDefault>false</IsDefault>
      <HasEmbeddedReports>false</HasEmbeddedReports>
      <HtmlFileName>R40.htm</HtmlFileName>
      <LongName>9955529 - Disclosure - Supplemental Financial Statement Data - Schedule of Inventories (Details)</LongName>
      <ReportType>Sheet</ReportType>
      <Role>http://www.wdc.com/role/SupplementalFinancialStatementDataScheduleofInventoriesDetails</Role>
      <ShortName>Supplemental Financial Statement Data - Schedule of Inventories (Details)</ShortName>
      <MenuCategory>Details</MenuCategory>
      <Position>40</Position>
    </Report>
    <Report instance="wdc-20260403.htm">
      <IsDefault>false</IsDefault>
      <HasEmbeddedReports>false</HasEmbeddedReports>
      <HtmlFileName>R41.htm</HtmlFileName>
      <LongName>9955530 - Disclosure - Supplemental Financial Statement Data - Schedule of Property, Plant and Equipment, Net (Details)</LongName>
      <ReportType>Sheet</ReportType>
      <Role>http://www.wdc.com/role/SupplementalFinancialStatementDataScheduleofPropertyPlantandEquipmentNetDetails</Role>
      <ShortName>Supplemental Financial Statement Data - Schedule of Property, Plant and Equipment, Net (Details)</ShortName>
      <MenuCategory>Details</MenuCategory>
      <Position>41</Position>
    </Report>
    <Report instance="wdc-20260403.htm">
      <IsDefault>false</IsDefault>
      <HasEmbeddedReports>false</HasEmbeddedReports>
      <HtmlFileName>R42.htm</HtmlFileName>
      <LongName>9955531 - Disclosure - Supplemental Financial Statement Data - Schedule of Non-current Assets (Details)</LongName>
      <ReportType>Sheet</ReportType>
      <Role>http://www.wdc.com/role/SupplementalFinancialStatementDataScheduleofNoncurrentAssetsDetails</Role>
      <ShortName>Supplemental Financial Statement Data - Schedule of Non-current Assets (Details)</ShortName>
      <MenuCategory>Details</MenuCategory>
      <Position>42</Position>
    </Report>
    <Report instance="wdc-20260403.htm">
      <IsDefault>false</IsDefault>
      <HasEmbeddedReports>false</HasEmbeddedReports>
      <HtmlFileName>R43.htm</HtmlFileName>
      <LongName>9955532 - Disclosure - Supplemental Financial Statement Data - Schedule of Product Warranty Accrual (Details)</LongName>
      <ReportType>Sheet</ReportType>
      <Role>http://www.wdc.com/role/SupplementalFinancialStatementDataScheduleofProductWarrantyAccrualDetails</Role>
      <ShortName>Supplemental Financial Statement Data - Schedule of Product Warranty Accrual (Details)</ShortName>
      <MenuCategory>Details</MenuCategory>
      <Position>43</Position>
    </Report>
    <Report instance="wdc-20260403.htm">
      <IsDefault>false</IsDefault>
      <HasEmbeddedReports>false</HasEmbeddedReports>
      <HtmlFileName>R44.htm</HtmlFileName>
      <LongName>9955533 - Disclosure - Supplemental Financial Statement Data - Schedule of Current Portion of the Warranty Accrual (Details)</LongName>
      <ReportType>Sheet</ReportType>
      <Role>http://www.wdc.com/role/SupplementalFinancialStatementDataScheduleofCurrentPortionoftheWarrantyAccrualDetails</Role>
      <ShortName>Supplemental Financial Statement Data - Schedule of Current Portion of the Warranty Accrual (Details)</ShortName>
      <MenuCategory>Details</MenuCategory>
      <Position>44</Position>
    </Report>
    <Report instance="wdc-20260403.htm">
      <IsDefault>false</IsDefault>
      <HasEmbeddedReports>false</HasEmbeddedReports>
      <HtmlFileName>R45.htm</HtmlFileName>
      <LongName>9955534 - Disclosure - Supplemental Financial Statement Data - Schedule of Other Liabilities (Details)</LongName>
      <ReportType>Sheet</ReportType>
      <Role>http://www.wdc.com/role/SupplementalFinancialStatementDataScheduleofOtherLiabilitiesDetails</Role>
      <ShortName>Supplemental Financial Statement Data - Schedule of Other Liabilities (Details)</ShortName>
      <MenuCategory>Details</MenuCategory>
      <Position>45</Position>
    </Report>
    <Report instance="wdc-20260403.htm">
      <IsDefault>false</IsDefault>
      <HasEmbeddedReports>false</HasEmbeddedReports>
      <HtmlFileName>R46.htm</HtmlFileName>
      <LongName>9955535 - Disclosure - Supplemental Financial Statement Data - Goodwill (Details)</LongName>
      <ReportType>Sheet</ReportType>
      <Role>http://www.wdc.com/role/SupplementalFinancialStatementDataGoodwillDetails</Role>
      <ShortName>Supplemental Financial Statement Data - Goodwill (Details)</ShortName>
      <MenuCategory>Details</MenuCategory>
      <Position>46</Position>
    </Report>
    <Report instance="wdc-20260403.htm">
      <IsDefault>false</IsDefault>
      <HasEmbeddedReports>false</HasEmbeddedReports>
      <HtmlFileName>R47.htm</HtmlFileName>
      <LongName>9955536 - Disclosure - Supplemental Financial Statement Data - Schedule of Accumulated Other Comprehensive Income (Details)</LongName>
      <ReportType>Sheet</ReportType>
      <Role>http://www.wdc.com/role/SupplementalFinancialStatementDataScheduleofAccumulatedOtherComprehensiveIncomeDetails</Role>
      <ShortName>Supplemental Financial Statement Data - Schedule of Accumulated Other Comprehensive Income (Details)</ShortName>
      <MenuCategory>Details</MenuCategory>
      <Position>47</Position>
    </Report>
    <Report instance="wdc-20260403.htm">
      <IsDefault>false</IsDefault>
      <HasEmbeddedReports>false</HasEmbeddedReports>
      <HtmlFileName>R48.htm</HtmlFileName>
      <LongName>9955537 - Disclosure - Fair Value Measurements and Investments - Schedule of Financial Assets and Liabilities Measured at Fair Value on Recurring Basis (Details)</LongName>
      <ReportType>Sheet</ReportType>
      <Role>http://www.wdc.com/role/FairValueMeasurementsandInvestmentsScheduleofFinancialAssetsandLiabilitiesMeasuredatFairValueonRecurringBasisDetails</Role>
      <ShortName>Fair Value Measurements and Investments - Schedule of Financial Assets and Liabilities Measured at Fair Value on Recurring Basis (Details)</ShortName>
      <MenuCategory>Details</MenuCategory>
      <Position>48</Position>
    </Report>
    <Report instance="wdc-20260403.htm">
      <IsDefault>false</IsDefault>
      <HasEmbeddedReports>false</HasEmbeddedReports>
      <HtmlFileName>R49.htm</HtmlFileName>
      <LongName>9955538 - Disclosure - Fair Value Measurements and Investments - Schedule of Related Costs and Fair Values Based on Quoted Market Prices (Details)</LongName>
      <ReportType>Sheet</ReportType>
      <Role>http://www.wdc.com/role/FairValueMeasurementsandInvestmentsScheduleofRelatedCostsandFairValuesBasedonQuotedMarketPricesDetails</Role>
      <ShortName>Fair Value Measurements and Investments - Schedule of Related Costs and Fair Values Based on Quoted Market Prices (Details)</ShortName>
      <MenuCategory>Details</MenuCategory>
      <Position>49</Position>
    </Report>
    <Report instance="wdc-20260403.htm">
      <IsDefault>false</IsDefault>
      <HasEmbeddedReports>false</HasEmbeddedReports>
      <HtmlFileName>R50.htm</HtmlFileName>
      <LongName>9955539 - 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>50</Position>
    </Report>
    <Report instance="wdc-20260403.htm">
      <IsDefault>false</IsDefault>
      <HasEmbeddedReports>false</HasEmbeddedReports>
      <HtmlFileName>R51.htm</HtmlFileName>
      <LongName>9955540 - 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>51</Position>
    </Report>
    <Report instance="wdc-20260403.htm">
      <IsDefault>false</IsDefault>
      <HasEmbeddedReports>false</HasEmbeddedReports>
      <HtmlFileName>R52.htm</HtmlFileName>
      <LongName>9955541 - Disclosure - Leases and Other Commitments - Schedule of Supplemental Balance Sheet (Details)</LongName>
      <ReportType>Sheet</ReportType>
      <Role>http://www.wdc.com/role/LeasesandOtherCommitmentsScheduleofSupplementalBalanceSheetDetails</Role>
      <ShortName>Leases and Other Commitments - Schedule of Supplemental Balance Sheet (Details)</ShortName>
      <MenuCategory>Details</MenuCategory>
      <Position>52</Position>
    </Report>
    <Report instance="wdc-20260403.htm">
      <IsDefault>false</IsDefault>
      <HasEmbeddedReports>false</HasEmbeddedReports>
      <HtmlFileName>R53.htm</HtmlFileName>
      <LongName>9955542 - Disclosure - Leases and Other Commitments - Schedule of Supplemental Cash Flow (Details)</LongName>
      <ReportType>Sheet</ReportType>
      <Role>http://www.wdc.com/role/LeasesandOtherCommitmentsScheduleofSupplementalCashFlowDetails</Role>
      <ShortName>Leases and Other Commitments - Schedule of Supplemental Cash Flow (Details)</ShortName>
      <MenuCategory>Details</MenuCategory>
      <Position>53</Position>
    </Report>
    <Report instance="wdc-20260403.htm">
      <IsDefault>false</IsDefault>
      <HasEmbeddedReports>false</HasEmbeddedReports>
      <HtmlFileName>R54.htm</HtmlFileName>
      <LongName>9955543 - Disclosure - Leases and Other Commitments - Schedule of Minimum Lease Payments (Details)</LongName>
      <ReportType>Sheet</ReportType>
      <Role>http://www.wdc.com/role/LeasesandOtherCommitmentsScheduleofMinimumLeasePaymentsDetails</Role>
      <ShortName>Leases and Other Commitments - Schedule of Minimum Lease Payments (Details)</ShortName>
      <MenuCategory>Details</MenuCategory>
      <Position>54</Position>
    </Report>
    <Report instance="wdc-20260403.htm">
      <IsDefault>false</IsDefault>
      <HasEmbeddedReports>false</HasEmbeddedReports>
      <HtmlFileName>R55.htm</HtmlFileName>
      <LongName>9955544 - Disclosure - Leases and Other Commitments - Schedule of Minimum Long-Term Commitments (Details)</LongName>
      <ReportType>Sheet</ReportType>
      <Role>http://www.wdc.com/role/LeasesandOtherCommitmentsScheduleofMinimumLongTermCommitmentsDetails</Role>
      <ShortName>Leases and Other Commitments - Schedule of Minimum Long-Term Commitments (Details)</ShortName>
      <MenuCategory>Details</MenuCategory>
      <Position>55</Position>
    </Report>
    <Report instance="wdc-20260403.htm">
      <IsDefault>false</IsDefault>
      <HasEmbeddedReports>false</HasEmbeddedReports>
      <HtmlFileName>R56.htm</HtmlFileName>
      <LongName>9955545 - Disclosure - Income Taxes - Schedule of Effective Income Tax Rate Reconciliation (Details)</LongName>
      <ReportType>Sheet</ReportType>
      <Role>http://www.wdc.com/role/IncomeTaxesScheduleofEffectiveIncomeTaxRateReconciliationDetails</Role>
      <ShortName>Income Taxes - Schedule of Effective Income Tax Rate Reconciliation (Details)</ShortName>
      <MenuCategory>Details</MenuCategory>
      <Position>56</Position>
    </Report>
    <Report instance="wdc-20260403.htm">
      <IsDefault>false</IsDefault>
      <HasEmbeddedReports>false</HasEmbeddedReports>
      <HtmlFileName>R57.htm</HtmlFileName>
      <LongName>9955546 - Disclosure - Income Taxes - Additional Information (Details)</LongName>
      <ReportType>Sheet</ReportType>
      <Role>http://www.wdc.com/role/IncomeTaxesAdditionalInformationDetails</Role>
      <ShortName>Income Taxes - Additional Information (Details)</ShortName>
      <MenuCategory>Details</MenuCategory>
      <Position>57</Position>
    </Report>
    <Report instance="wdc-20260403.htm">
      <IsDefault>false</IsDefault>
      <HasEmbeddedReports>false</HasEmbeddedReports>
      <HtmlFileName>R58.htm</HtmlFileName>
      <LongName>9955547 - Disclosure - Income Taxes - Schedule of Income Tax Contingencies (Details)</LongName>
      <ReportType>Sheet</ReportType>
      <Role>http://www.wdc.com/role/IncomeTaxesScheduleofIncomeTaxContingenciesDetails</Role>
      <ShortName>Income Taxes - Schedule of Income Tax Contingencies (Details)</ShortName>
      <MenuCategory>Details</MenuCategory>
      <Position>58</Position>
    </Report>
    <Report instance="wdc-20260403.htm">
      <IsDefault>false</IsDefault>
      <HasEmbeddedReports>false</HasEmbeddedReports>
      <HtmlFileName>R59.htm</HtmlFileName>
      <LongName>9955548 - Disclosure - Business Realignment Charges - Expense Recognition (Details)</LongName>
      <ReportType>Sheet</ReportType>
      <Role>http://www.wdc.com/role/BusinessRealignmentChargesExpenseRecognitionDetails</Role>
      <ShortName>Business Realignment Charges - Expense Recognition (Details)</ShortName>
      <MenuCategory>Details</MenuCategory>
      <Position>59</Position>
    </Report>
    <Report instance="wdc-20260403.htm">
      <IsDefault>false</IsDefault>
      <HasEmbeddedReports>false</HasEmbeddedReports>
      <HtmlFileName>R60.htm</HtmlFileName>
      <LongName>9955549 - Disclosure - Business Realignment Charges - Business Realignment Activities (Details)</LongName>
      <ReportType>Sheet</ReportType>
      <Role>http://www.wdc.com/role/BusinessRealignmentChargesBusinessRealignmentActivitiesDetails</Role>
      <ShortName>Business Realignment Charges - Business Realignment Activities (Details)</ShortName>
      <MenuCategory>Details</MenuCategory>
      <Position>60</Position>
    </Report>
    <Report instance="wdc-20260403.htm">
      <IsDefault>false</IsDefault>
      <HasEmbeddedReports>false</HasEmbeddedReports>
      <HtmlFileName>R61.htm</HtmlFileName>
      <LongName>9955550 - 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>61</Position>
    </Report>
    <Report instance="wdc-20260403.htm">
      <IsDefault>false</IsDefault>
      <HasEmbeddedReports>false</HasEmbeddedReports>
      <HtmlFileName>R62.htm</HtmlFileName>
      <LongName>9955551 - Disclosure - Pension and Other Post-Retirement Benefit Plans - Schedule of Obligations and Funded Status (Details)</LongName>
      <ReportType>Sheet</ReportType>
      <Role>http://www.wdc.com/role/PensionandOtherPostRetirementBenefitPlansScheduleofObligationsandFundedStatusDetails</Role>
      <ShortName>Pension and Other Post-Retirement Benefit Plans - Schedule of Obligations and Funded Status (Details)</ShortName>
      <MenuCategory>Details</MenuCategory>
      <Position>62</Position>
    </Report>
    <Report instance="wdc-20260403.htm">
      <IsDefault>false</IsDefault>
      <HasEmbeddedReports>false</HasEmbeddedReports>
      <HtmlFileName>R63.htm</HtmlFileName>
      <LongName>9955552 - Disclosure - Pension and Other Post-Retirement Benefit Plans - Schedule of Unfunded Amounts Recognized on Consolidated Balance Sheets (Details)</LongName>
      <ReportType>Sheet</ReportType>
      <Role>http://www.wdc.com/role/PensionandOtherPostRetirementBenefitPlansScheduleofUnfundedAmountsRecognizedonConsolidatedBalanceSheetsDetails</Role>
      <ShortName>Pension and Other Post-Retirement Benefit Plans - Schedule of Unfunded Amounts Recognized on Consolidated Balance Sheets (Details)</ShortName>
      <MenuCategory>Details</MenuCategory>
      <Position>63</Position>
    </Report>
    <Report instance="wdc-20260403.htm">
      <IsDefault>false</IsDefault>
      <HasEmbeddedReports>false</HasEmbeddedReports>
      <HtmlFileName>R64.htm</HtmlFileName>
      <LongName>9955553 - Disclosure - Shareholders' Equity and Convertible Preferred Stock - Schedule of Stock-Based Compensation Expense (Details)</LongName>
      <ReportType>Sheet</ReportType>
      <Role>http://www.wdc.com/role/ShareholdersEquityandConvertiblePreferredStockScheduleofStockBasedCompensationExpenseDetails</Role>
      <ShortName>Shareholders' Equity and Convertible Preferred Stock - Schedule of Stock-Based Compensation Expense (Details)</ShortName>
      <MenuCategory>Details</MenuCategory>
      <Position>64</Position>
    </Report>
    <Report instance="wdc-20260403.htm">
      <IsDefault>false</IsDefault>
      <HasEmbeddedReports>false</HasEmbeddedReports>
      <HtmlFileName>R65.htm</HtmlFileName>
      <LongName>9955554 - Disclosure - Shareholders' Equity and Convertible Preferred Stock - Stock-Based Compensation Expense - Additional Information (Details)</LongName>
      <ReportType>Sheet</ReportType>
      <Role>http://www.wdc.com/role/ShareholdersEquityandConvertiblePreferredStockStockBasedCompensationExpenseAdditionalInformationDetails</Role>
      <ShortName>Shareholders' Equity and Convertible Preferred Stock - Stock-Based Compensation Expense - Additional Information (Details)</ShortName>
      <MenuCategory>Details</MenuCategory>
      <Position>65</Position>
    </Report>
    <Report instance="wdc-20260403.htm">
      <IsDefault>false</IsDefault>
      <HasEmbeddedReports>false</HasEmbeddedReports>
      <HtmlFileName>R66.htm</HtmlFileName>
      <LongName>9955555 - Disclosure - Shareholders' Equity and Convertible Preferred Stock - Schedule of Employee Service Share-based Compensation, Unrecognized Costs (Details)</LongName>
      <ReportType>Sheet</ReportType>
      <Role>http://www.wdc.com/role/ShareholdersEquityandConvertiblePreferredStockScheduleofEmployeeServiceSharebasedCompensationUnrecognizedCostsDetails</Role>
      <ShortName>Shareholders' Equity and Convertible Preferred Stock - Schedule of Employee Service Share-based Compensation, Unrecognized Costs (Details)</ShortName>
      <MenuCategory>Details</MenuCategory>
      <Position>66</Position>
    </Report>
    <Report instance="wdc-20260403.htm">
      <IsDefault>false</IsDefault>
      <HasEmbeddedReports>false</HasEmbeddedReports>
      <HtmlFileName>R67.htm</HtmlFileName>
      <LongName>9955556 - Disclosure - Shareholders' Equity and Convertible Preferred Stock - Schedule of RSUs and PSUs (Details)</LongName>
      <ReportType>Sheet</ReportType>
      <Role>http://www.wdc.com/role/ShareholdersEquityandConvertiblePreferredStockScheduleofRSUsandPSUsDetails</Role>
      <ShortName>Shareholders' Equity and Convertible Preferred Stock - Schedule of RSUs and PSUs (Details)</ShortName>
      <MenuCategory>Details</MenuCategory>
      <Position>67</Position>
    </Report>
    <Report instance="wdc-20260403.htm">
      <IsDefault>false</IsDefault>
      <HasEmbeddedReports>false</HasEmbeddedReports>
      <HtmlFileName>R68.htm</HtmlFileName>
      <LongName>9955557 - Disclosure - Shareholders' Equity and Convertible Preferred Stock - Common Stock (Details)</LongName>
      <ReportType>Sheet</ReportType>
      <Role>http://www.wdc.com/role/ShareholdersEquityandConvertiblePreferredStockCommonStockDetails</Role>
      <ShortName>Shareholders' Equity and Convertible Preferred Stock - Common Stock (Details)</ShortName>
      <MenuCategory>Details</MenuCategory>
      <Position>68</Position>
    </Report>
    <Report instance="wdc-20260403.htm">
      <IsDefault>false</IsDefault>
      <HasEmbeddedReports>false</HasEmbeddedReports>
      <HtmlFileName>R69.htm</HtmlFileName>
      <LongName>9955558 - 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>69</Position>
    </Report>
    <Report instance="wdc-20260403.htm">
      <IsDefault>false</IsDefault>
      <HasEmbeddedReports>false</HasEmbeddedReports>
      <HtmlFileName>R70.htm</HtmlFileName>
      <LongName>9955559 - Disclosure - Shareholders' Equity and Convertible Preferred Stock - Share Repurchase Program (Details)</LongName>
      <ReportType>Sheet</ReportType>
      <Role>http://www.wdc.com/role/ShareholdersEquityandConvertiblePreferredStockShareRepurchaseProgramDetails</Role>
      <ShortName>Shareholders' Equity and Convertible Preferred Stock - Share Repurchase Program (Details)</ShortName>
      <MenuCategory>Details</MenuCategory>
      <Position>70</Position>
    </Report>
    <Report instance="wdc-20260403.htm">
      <IsDefault>false</IsDefault>
      <HasEmbeddedReports>false</HasEmbeddedReports>
      <HtmlFileName>R71.htm</HtmlFileName>
      <LongName>9955560 - Disclosure - Shareholders' Equity and Convertible Preferred Stock - Dividends to Common Shareholders (Details)</LongName>
      <ReportType>Sheet</ReportType>
      <Role>http://www.wdc.com/role/ShareholdersEquityandConvertiblePreferredStockDividendstoCommonShareholdersDetails</Role>
      <ShortName>Shareholders' Equity and Convertible Preferred Stock - Dividends to Common Shareholders (Details)</ShortName>
      <MenuCategory>Details</MenuCategory>
      <Position>71</Position>
    </Report>
    <Report instance="wdc-20260403.htm">
      <IsDefault>false</IsDefault>
      <HasEmbeddedReports>false</HasEmbeddedReports>
      <HtmlFileName>R72.htm</HtmlFileName>
      <LongName>9955561 - Disclosure - Net Income Per Common Share - Earnings Per Share, Basic and Diluted (Details)</LongName>
      <ReportType>Sheet</ReportType>
      <Role>http://www.wdc.com/role/NetIncomePerCommonShareEarningsPerShareBasicandDilutedDetails</Role>
      <ShortName>Net Income Per Common Share - Earnings Per Share, Basic and Diluted (Details)</ShortName>
      <MenuCategory>Details</MenuCategory>
      <Position>72</Position>
    </Report>
    <Report instance="wdc-20260403.htm">
      <IsDefault>false</IsDefault>
      <HasEmbeddedReports>false</HasEmbeddedReports>
      <HtmlFileName>R73.htm</HtmlFileName>
      <LongName>9955562 - Disclosure - Legal Proceedings (Details)</LongName>
      <ReportType>Sheet</ReportType>
      <Role>http://www.wdc.com/role/LegalProceedingsDetails</Role>
      <ShortName>Legal Proceedings (Details)</ShortName>
      <MenuCategory>Details</MenuCategory>
      <ParentRole>http://www.wdc.com/role/LegalProceedings</ParentRole>
      <Position>73</Position>
    </Report>
    <Report>
      <IsDefault>false</IsDefault>
      <HasEmbeddedReports>false</HasEmbeddedReports>
      <LongName>All Reports</LongName>
      <ReportType>Book</ReportType>
      <ShortName>All Reports</ShortName>
    </Report>
  </MyReports>
  <InputFiles>
    <File doctype="10-Q" isDefinitelyFs="true" isUsgaap="true" original="wdc-20260403.htm">wdc-20260403.htm</File>
    <File>wdc-20260403.xsd</File>
    <File>wdc-20260403_cal.xml</File>
    <File>wdc-20260403_def.xml</File>
    <File>wdc-20260403_lab.xml</File>
    <File>wdc-20260403_pre.xml</File>
  </InputFiles>
  <SupplementalFiles>
    <File>wdc-20260403_g1.jpg</File>
  </SupplementalFiles>
  <BaseTaxonomies>
    <BaseTaxonomy items="2">http://fasb.org/srt/2025</BaseTaxonomy>
    <BaseTaxonomy items="1066">http://fasb.org/us-gaap/2025</BaseTaxonomy>
    <BaseTaxonomy items="29">http://xbrl.sec.gov/dei/2025</BaseTaxonomy>
    <BaseTaxonomy items="27">http://xbrl.sec.gov/ecd/2025</BaseTaxonomy>
  </BaseTaxonomies>
  <HasPresentationLinkbase>true</HasPresentationLinkbase>
  <HasCalculationLinkbase>true</HasCalculationLinkbase>
</FilingSummary>
