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

    <schemaVersion>X0306</schemaVersion>

    <documentType>4</documentType>

    <periodOfReport>2018-08-10</periodOfReport>

    <notSubjectToSection16>0</notSubjectToSection16>

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

    <reportingOwner>
        <reportingOwnerId>
            <rptOwnerCik>0001180432</rptOwnerCik>
            <rptOwnerName>MARAGANORE JOHN</rptOwnerName>
        </reportingOwnerId>
        <reportingOwnerAddress>
            <rptOwnerStreet1>300 THIRD STREET</rptOwnerStreet1>
            <rptOwnerStreet2>THIRD FLOOR</rptOwnerStreet2>
            <rptOwnerCity>CAMBRIDGE</rptOwnerCity>
            <rptOwnerState>MA</rptOwnerState>
            <rptOwnerZipCode>02142</rptOwnerZipCode>
            <rptOwnerStateDescription></rptOwnerStateDescription>
        </reportingOwnerAddress>
        <reportingOwnerRelationship>
            <isDirector>1</isDirector>
            <isOfficer>1</isOfficer>
            <isTenPercentOwner>0</isTenPercentOwner>
            <isOther>0</isOther>
            <officerTitle>Chief Executive Officer</officerTitle>
        </reportingOwnerRelationship>
    </reportingOwner>

    <derivativeTable>
        <derivativeTransaction>
            <securityTitle>
                <value>Performance Based Stock Option 2013 (right to buy)</value>
            </securityTitle>
            <conversionOrExercisePrice>
                <value>63</value>
            </conversionOrExercisePrice>
            <transactionDate>
                <value>2018-08-10</value>
            </transactionDate>
            <transactionCoding>
                <transactionFormType>4</transactionFormType>
                <transactionCode>A</transactionCode>
                <equitySwapInvolved>0</equitySwapInvolved>
                <footnoteId id="F1"/>
            </transactionCoding>
            <transactionTimeliness>
                <value></value>
            </transactionTimeliness>
            <transactionAmounts>
                <transactionShares>
                    <value>25000</value>
                </transactionShares>
                <transactionPricePerShare>
                    <value>0</value>
                </transactionPricePerShare>
                <transactionAcquiredDisposedCode>
                    <value>A</value>
                </transactionAcquiredDisposedCode>
            </transactionAmounts>
            <exerciseDate>
                <value>2018-08-10</value>
            </exerciseDate>
            <expirationDate>
                <value>2023-12-18</value>
            </expirationDate>
            <underlyingSecurity>
                <underlyingSecurityTitle>
                    <value>Common Stock</value>
                </underlyingSecurityTitle>
                <underlyingSecurityShares>
                    <value>15000</value>
                </underlyingSecurityShares>
            </underlyingSecurity>
            <postTransactionAmounts>
                <sharesOwnedFollowingTransaction>
                    <value>75000</value>
                </sharesOwnedFollowingTransaction>
            </postTransactionAmounts>
            <ownershipNature>
                <directOrIndirectOwnership>
                    <value>D</value>
                </directOrIndirectOwnership>
            </ownershipNature>
        </derivativeTransaction>
        <derivativeTransaction>
            <securityTitle>
                <value>Performance Based Stock Option 2014 (right to buy)</value>
            </securityTitle>
            <conversionOrExercisePrice>
                <value>96.45</value>
            </conversionOrExercisePrice>
            <transactionDate>
                <value>2018-08-10</value>
            </transactionDate>
            <transactionCoding>
                <transactionFormType>4</transactionFormType>
                <transactionCode>A</transactionCode>
                <equitySwapInvolved>0</equitySwapInvolved>
                <footnoteId id="F2"/>
            </transactionCoding>
            <transactionTimeliness>
                <value></value>
            </transactionTimeliness>
            <transactionAmounts>
                <transactionShares>
                    <value>25000</value>
                </transactionShares>
                <transactionPricePerShare>
                    <value>0</value>
                </transactionPricePerShare>
                <transactionAcquiredDisposedCode>
                    <value>A</value>
                </transactionAcquiredDisposedCode>
            </transactionAmounts>
            <exerciseDate>
                <value>2018-08-10</value>
            </exerciseDate>
            <expirationDate>
                <value>2024-12-17</value>
            </expirationDate>
            <underlyingSecurity>
                <underlyingSecurityTitle>
                    <value>Common Stock</value>
                </underlyingSecurityTitle>
                <underlyingSecurityShares>
                    <value>25000</value>
                </underlyingSecurityShares>
            </underlyingSecurity>
            <postTransactionAmounts>
                <sharesOwnedFollowingTransaction>
                    <value>75000</value>
                </sharesOwnedFollowingTransaction>
            </postTransactionAmounts>
            <ownershipNature>
                <directOrIndirectOwnership>
                    <value>D</value>
                </directOrIndirectOwnership>
            </ownershipNature>
        </derivativeTransaction>
    </derivativeTable>

    <footnotes>
        <footnote id="F1">On December 18, 2013, the reporting person was granted a performance based stock option to purchase shares of ALNY Common Stock. One-third of the shares subject to the option will vest upon the achievement of each of three specific clinical development and regulatory events, as approved by our compensation committee. Effective August 10, 2018, the compensation committee of the Company determined the final performance criteria had been met and the option will vest as to the final third of the award.</footnote>
        <footnote id="F2">On December 17, 2014, the reporting person was granted a performance based stock option to purchase shares of ALNY Common Stock. One-third of the shares subject to the option will vest upon the achievement of each of three specific clinical development and regulatory events, as approved by our compensation committee. Effective August 10, 2018, the compensation committee of the Company determined the final performance criteria had been met and the option vested as to the final third of the award.</footnote>
    </footnotes>

    <ownerSignature>
        <signatureName>/s/ Michael P. Mason, Attorney-in-Fact for John M. Maraganore</signatureName>
        <signatureDate>2018-08-14</signatureDate>
    </ownerSignature>
</ownershipDocument>
