<?xml version="1.0" encoding="utf-8"?>
<xbrl
  xmlns="http://www.xbrl.org/2003/instance"
  xmlns:dei="http://xbrl.sec.gov/dei/2021"
  xmlns:link="http://www.xbrl.org/2003/linkbase"
  xmlns:xlink="http://www.w3.org/1999/xlink">
    <link:schemaRef xlink:href="dnli-20220214.xsd" xlink:type="simple"/>
    <context id="duration_2022-02-14_to_2022-02-14">
        <entity>
            <identifier scheme="http://www.sec.gov/CIK">0001714899</identifier>
        </entity>
        <period>
            <startDate>2022-02-14</startDate>
            <endDate>2022-02-14</endDate>
        </period>
    </context>
    <dei:AmendmentFlag contextRef="duration_2022-02-14_to_2022-02-14">false</dei:AmendmentFlag>
    <dei:EntityCentralIndexKey
      contextRef="duration_2022-02-14_to_2022-02-14"
      id="Hidden_dei_EntityCentralIndexKey">0001714899</dei:EntityCentralIndexKey>
    <dei:DocumentType contextRef="duration_2022-02-14_to_2022-02-14">8-K</dei:DocumentType>
    <dei:DocumentPeriodEndDate contextRef="duration_2022-02-14_to_2022-02-14">2022-02-14</dei:DocumentPeriodEndDate>
    <dei:EntityRegistrantName contextRef="duration_2022-02-14_to_2022-02-14">Denali Therapeutics Inc.</dei:EntityRegistrantName>
    <dei:EntityIncorporationStateCountryCode contextRef="duration_2022-02-14_to_2022-02-14">DE</dei:EntityIncorporationStateCountryCode>
    <dei:EntityFileNumber contextRef="duration_2022-02-14_to_2022-02-14">001-38311</dei:EntityFileNumber>
    <dei:EntityTaxIdentificationNumber contextRef="duration_2022-02-14_to_2022-02-14">46-3872213</dei:EntityTaxIdentificationNumber>
    <dei:EntityAddressAddressLine1 contextRef="duration_2022-02-14_to_2022-02-14">161 Oyster Point Blvd.</dei:EntityAddressAddressLine1>
    <dei:EntityAddressCityOrTown contextRef="duration_2022-02-14_to_2022-02-14">South San Francisco</dei:EntityAddressCityOrTown>
    <dei:EntityAddressStateOrProvince contextRef="duration_2022-02-14_to_2022-02-14">CA</dei:EntityAddressStateOrProvince>
    <dei:EntityAddressPostalZipCode contextRef="duration_2022-02-14_to_2022-02-14">94080</dei:EntityAddressPostalZipCode>
    <dei:CityAreaCode contextRef="duration_2022-02-14_to_2022-02-14">(650)</dei:CityAreaCode>
    <dei:LocalPhoneNumber contextRef="duration_2022-02-14_to_2022-02-14">866-8548</dei:LocalPhoneNumber>
    <dei:WrittenCommunications contextRef="duration_2022-02-14_to_2022-02-14">false</dei:WrittenCommunications>
    <dei:SolicitingMaterial contextRef="duration_2022-02-14_to_2022-02-14">false</dei:SolicitingMaterial>
    <dei:PreCommencementTenderOffer contextRef="duration_2022-02-14_to_2022-02-14">false</dei:PreCommencementTenderOffer>
    <dei:PreCommencementIssuerTenderOffer contextRef="duration_2022-02-14_to_2022-02-14">false</dei:PreCommencementIssuerTenderOffer>
    <dei:EntityEmergingGrowthCompany contextRef="duration_2022-02-14_to_2022-02-14">false</dei:EntityEmergingGrowthCompany>
    <dei:Security12bTitle contextRef="duration_2022-02-14_to_2022-02-14">Common Stock, par value $0.01 per share</dei:Security12bTitle>
    <dei:TradingSymbol contextRef="duration_2022-02-14_to_2022-02-14">DNLI</dei:TradingSymbol>
    <dei:SecurityExchangeName contextRef="duration_2022-02-14_to_2022-02-14">NASDAQ</dei:SecurityExchangeName>
</xbrl>
