<?xml version="1.0" encoding="utf-8"?>
<xbrl
  xmlns="http://www.xbrl.org/2003/instance"
  xmlns:dei="http://xbrl.sec.gov/dei/2025"
  xmlns:link="http://www.xbrl.org/2003/linkbase"
  xmlns:xlink="http://www.w3.org/1999/xlink">
    <link:schemaRef xlink:href="wdc-20260826.xsd" xlink:type="simple"/>
    <context id="duration_2026-08-26_to_2026-08-26">
        <entity>
            <identifier scheme="http://www.sec.gov/CIK">0000106040</identifier>
        </entity>
        <period>
            <startDate>2026-08-26</startDate>
            <endDate>2026-08-26</endDate>
        </period>
    </context>
    <dei:EntityRegistrantName
      contextRef="duration_2026-08-26_to_2026-08-26"
      id="Hidden_dei_EntityRegistrantName">WESTERN DIGITAL CORP</dei:EntityRegistrantName>
    <dei:AmendmentFlag contextRef="duration_2026-08-26_to_2026-08-26" id="ixv-257">true</dei:AmendmentFlag>
    <dei:EntityCentralIndexKey
      contextRef="duration_2026-08-26_to_2026-08-26"
      id="Hidden_dei_EntityCentralIndexKey">0000106040</dei:EntityCentralIndexKey>
    <dei:DocumentType contextRef="duration_2026-08-26_to_2026-08-26" id="ixv-268">8-K/A</dei:DocumentType>
    <dei:DocumentPeriodEndDate contextRef="duration_2026-08-26_to_2026-08-26" id="ixv-269">2026-08-26</dei:DocumentPeriodEndDate>
    <dei:EntityIncorporationStateCountryCode contextRef="duration_2026-08-26_to_2026-08-26" id="ixv-270">DE</dei:EntityIncorporationStateCountryCode>
    <dei:EntityFileNumber contextRef="duration_2026-08-26_to_2026-08-26" id="ixv-271">001-08703</dei:EntityFileNumber>
    <dei:EntityTaxIdentificationNumber contextRef="duration_2026-08-26_to_2026-08-26" id="ixv-272">33-0956711</dei:EntityTaxIdentificationNumber>
    <dei:EntityAddressAddressLine1 contextRef="duration_2026-08-26_to_2026-08-26" id="ixv-273">5601 Great Oaks Parkway</dei:EntityAddressAddressLine1>
    <dei:EntityAddressCityOrTown contextRef="duration_2026-08-26_to_2026-08-26" id="ixv-274">San Jose</dei:EntityAddressCityOrTown>
    <dei:EntityAddressStateOrProvince contextRef="duration_2026-08-26_to_2026-08-26" id="ixv-275">CA</dei:EntityAddressStateOrProvince>
    <dei:EntityAddressPostalZipCode contextRef="duration_2026-08-26_to_2026-08-26" id="ixv-276">95119</dei:EntityAddressPostalZipCode>
    <dei:CityAreaCode contextRef="duration_2026-08-26_to_2026-08-26" id="ixv-277">(408)</dei:CityAreaCode>
    <dei:LocalPhoneNumber contextRef="duration_2026-08-26_to_2026-08-26" id="ixv-278">717-6000</dei:LocalPhoneNumber>
    <dei:WrittenCommunications contextRef="duration_2026-08-26_to_2026-08-26" id="ixv-279">false</dei:WrittenCommunications>
    <dei:SolicitingMaterial contextRef="duration_2026-08-26_to_2026-08-26" id="ixv-280">false</dei:SolicitingMaterial>
    <dei:PreCommencementTenderOffer contextRef="duration_2026-08-26_to_2026-08-26" id="ixv-281">false</dei:PreCommencementTenderOffer>
    <dei:PreCommencementIssuerTenderOffer contextRef="duration_2026-08-26_to_2026-08-26" id="ixv-282">false</dei:PreCommencementIssuerTenderOffer>
    <dei:Security12bTitle contextRef="duration_2026-08-26_to_2026-08-26" id="ixv-283">Common Stock, $0.01 Par Value Per Share</dei:Security12bTitle>
    <dei:TradingSymbol contextRef="duration_2026-08-26_to_2026-08-26" id="ixv-284">WDC</dei:TradingSymbol>
    <dei:SecurityExchangeName contextRef="duration_2026-08-26_to_2026-08-26" id="ixv-285">NASDAQ</dei:SecurityExchangeName>
    <dei:EntityEmergingGrowthCompany contextRef="duration_2026-08-26_to_2026-08-26" id="ixv-286">false</dei:EntityEmergingGrowthCompany>
    <dei:AmendmentDescription contextRef="duration_2026-08-26_to_2026-08-26" id="ixv-186">As previously reported on a Current Report on Form 8-K filed the morning of August&#160;26, 2026 (the &#x201c;Original Form 8-K&#x201d;), Western Digital Corporation (the &#x201c;Company&#x201d;) entered into separate, privately negotiated exchange agreements with certain holders of its 3.00% Convertible Senior Notes due 2028 (the &#x201c;Notes&#x201d;), pursuant to which such holders have agreed to exchange approximately $191.0&#160;million aggregate principal amount of Notes for cash and shares of common stock of the Company (the &#x201c;Exchange Shares&#x201d; and such transactions, the &#x201c;Exchange Transactions&#x201d;). The exact number of the Exchange Shares to be delivered in the Exchange Transactions was not available at the time of filing of the Original Form 8-K because such number is calculated using the volume-weighted average price of the Company&#x2019;s common stock on August&#160;26, 2026. The Company is filing this Amendment No.&#160;1 to the Original Form 8-K solely for the purposes of disclosing that an aggregate of 4,653,572 Exchange Shares will be delivered in the Exchange Transactions. The Original Form 8-K is not otherwise revised or amended in any way. </dei:AmendmentDescription>
</xbrl>
