<?xml version="1.0"?>
<ownershipDocument>

    <schemaVersion>X0407</schemaVersion>

    <documentType>4</documentType>

    <periodOfReport>2023-05-18</periodOfReport>

    <notSubjectToSection16>0</notSubjectToSection16>

    <issuer>
        <issuerCik>0001178670</issuerCik>
        <issuerName>ALNYLAM PHARMACEUTICALS, INC.</issuerName>
        <issuerTradingSymbol>ALNY</issuerTradingSymbol>
    </issuer>

    <reportingOwner>
        <reportingOwnerId>
            <rptOwnerCik>0001661908</rptOwnerCik>
            <rptOwnerName>Sigal Charles Elliott</rptOwnerName>
        </reportingOwnerId>
        <reportingOwnerAddress>
            <rptOwnerStreet1>675 WEST KENDALL STREET</rptOwnerStreet1>
            <rptOwnerStreet2>HENRI A. TERMEER SQUARE</rptOwnerStreet2>
            <rptOwnerCity>CAMBRIDGE</rptOwnerCity>
            <rptOwnerState>MA</rptOwnerState>
            <rptOwnerZipCode>02142</rptOwnerZipCode>
            <rptOwnerStateDescription></rptOwnerStateDescription>
        </reportingOwnerAddress>
        <reportingOwnerRelationship>
            <isDirector>1</isDirector>
            <isOfficer>0</isOfficer>
            <isTenPercentOwner>0</isTenPercentOwner>
            <isOther>0</isOther>
        </reportingOwnerRelationship>
    </reportingOwner>

    <aff10b5One>0</aff10b5One>

    <derivativeTable>
        <derivativeTransaction>
            <securityTitle>
                <value>Stock Option  (right to buy)</value>
            </securityTitle>
            <conversionOrExercisePrice>
                <value>189.87</value>
            </conversionOrExercisePrice>
            <transactionDate>
                <value>2023-05-18</value>
            </transactionDate>
            <transactionCoding>
                <transactionFormType>4</transactionFormType>
                <transactionCode>A</transactionCode>
                <equitySwapInvolved>0</equitySwapInvolved>
            </transactionCoding>
            <transactionAmounts>
                <transactionShares>
                    <value>3454</value>
                </transactionShares>
                <transactionPricePerShare>
                    <value>0.0</value>
                </transactionPricePerShare>
                <transactionAcquiredDisposedCode>
                    <value>A</value>
                </transactionAcquiredDisposedCode>
            </transactionAmounts>
            <exerciseDate>
                <value>2024-05-18</value>
                <footnoteId id="F1"/>
            </exerciseDate>
            <expirationDate>
                <value>2033-05-18</value>
            </expirationDate>
            <underlyingSecurity>
                <underlyingSecurityTitle>
                    <value>Common Stock</value>
                </underlyingSecurityTitle>
                <underlyingSecurityShares>
                    <value>3454</value>
                </underlyingSecurityShares>
            </underlyingSecurity>
            <postTransactionAmounts>
                <sharesOwnedFollowingTransaction>
                    <value>3454</value>
                </sharesOwnedFollowingTransaction>
            </postTransactionAmounts>
            <ownershipNature>
                <directOrIndirectOwnership>
                    <value>D</value>
                </directOrIndirectOwnership>
            </ownershipNature>
        </derivativeTransaction>
    </derivativeTable>

    <footnotes>
        <footnote id="F1">This award vests in full upon the earlier of the first anniversary of the grant date and the date of any earlier retirement or resignation of the Reporting Person, provided such date of retirement or resignation occurs no more than 90 days prior to the first anniversary of the grant date.</footnote>
    </footnotes>

    <ownerSignature>
        <signatureName>By: /s/ Stephen Hall, Attorney-in-Fact For: Charles Elliott Sigal</signatureName>
        <signatureDate>2023-05-19</signatureDate>
    </ownerSignature>
</ownershipDocument>
