<?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-20260602.xsd" xlink:type="simple"/>
    <context id="duration_2026-06-02_to_2026-06-02">
        <entity>
            <identifier scheme="http://www.sec.gov/CIK">0000106040</identifier>
        </entity>
        <period>
            <startDate>2026-06-02</startDate>
            <endDate>2026-06-02</endDate>
        </period>
    </context>
    <dei:EntityRegistrantName
      contextRef="duration_2026-06-02_to_2026-06-02"
      id="Hidden_dei_EntityRegistrantName">WESTERN DIGITAL CORP</dei:EntityRegistrantName>
    <dei:AmendmentFlag contextRef="duration_2026-06-02_to_2026-06-02" id="ixv-273">true</dei:AmendmentFlag>
    <dei:EntityCentralIndexKey
      contextRef="duration_2026-06-02_to_2026-06-02"
      id="Hidden_dei_EntityCentralIndexKey">0000106040</dei:EntityCentralIndexKey>
    <dei:DocumentType contextRef="duration_2026-06-02_to_2026-06-02" id="ixv-284">8-K/A</dei:DocumentType>
    <dei:DocumentPeriodEndDate contextRef="duration_2026-06-02_to_2026-06-02" id="ixv-285">2026-06-02</dei:DocumentPeriodEndDate>
    <dei:EntityIncorporationStateCountryCode contextRef="duration_2026-06-02_to_2026-06-02" id="ixv-286">DE</dei:EntityIncorporationStateCountryCode>
    <dei:EntityFileNumber contextRef="duration_2026-06-02_to_2026-06-02" id="ixv-287">001-08703</dei:EntityFileNumber>
    <dei:EntityTaxIdentificationNumber contextRef="duration_2026-06-02_to_2026-06-02" id="ixv-288">33-0956711</dei:EntityTaxIdentificationNumber>
    <dei:EntityAddressAddressLine1 contextRef="duration_2026-06-02_to_2026-06-02" id="ixv-289">5601 Great Oaks Parkway</dei:EntityAddressAddressLine1>
    <dei:EntityAddressCityOrTown contextRef="duration_2026-06-02_to_2026-06-02" id="ixv-290">San Jose</dei:EntityAddressCityOrTown>
    <dei:EntityAddressStateOrProvince contextRef="duration_2026-06-02_to_2026-06-02" id="ixv-291">CA</dei:EntityAddressStateOrProvince>
    <dei:EntityAddressPostalZipCode contextRef="duration_2026-06-02_to_2026-06-02" id="ixv-292">95119</dei:EntityAddressPostalZipCode>
    <dei:CityAreaCode contextRef="duration_2026-06-02_to_2026-06-02" id="ixv-293">(408)</dei:CityAreaCode>
    <dei:LocalPhoneNumber contextRef="duration_2026-06-02_to_2026-06-02" id="ixv-294">717-6000</dei:LocalPhoneNumber>
    <dei:WrittenCommunications contextRef="duration_2026-06-02_to_2026-06-02" id="ixv-295">false</dei:WrittenCommunications>
    <dei:SolicitingMaterial contextRef="duration_2026-06-02_to_2026-06-02" id="ixv-296">false</dei:SolicitingMaterial>
    <dei:PreCommencementTenderOffer contextRef="duration_2026-06-02_to_2026-06-02" id="ixv-297">false</dei:PreCommencementTenderOffer>
    <dei:PreCommencementIssuerTenderOffer contextRef="duration_2026-06-02_to_2026-06-02" id="ixv-298">false</dei:PreCommencementIssuerTenderOffer>
    <dei:Security12bTitle contextRef="duration_2026-06-02_to_2026-06-02" id="ixv-299">Common Stock, $0.01 Par Value Per Share</dei:Security12bTitle>
    <dei:TradingSymbol contextRef="duration_2026-06-02_to_2026-06-02" id="ixv-300">WDC</dei:TradingSymbol>
    <dei:SecurityExchangeName contextRef="duration_2026-06-02_to_2026-06-02" id="ixv-301">NASDAQ</dei:SecurityExchangeName>
    <dei:EntityEmergingGrowthCompany contextRef="duration_2026-06-02_to_2026-06-02" id="ixv-302">false</dei:EntityEmergingGrowthCompany>
    <dei:AmendmentDescription contextRef="duration_2026-06-02_to_2026-06-02" id="ixv-186">As previously reported on a Current Report on Form 8-K filed on June&#160;3, 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 $858.4&#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 average price of the Company&#x2019;s common stock over a two-day measurement period on June 3-4, 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 21,289,938 shares of 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>
