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

    <schemaVersion>X0303</schemaVersion>

    <documentType>4</documentType>

    <periodOfReport>2009-02-12</periodOfReport>

    <issuer>
        <issuerCik>0001060391</issuerCik>
        <issuerName>REPUBLIC SERVICES, INC.</issuerName>
        <issuerTradingSymbol>RSG</issuerTradingSymbol>
    </issuer>

    <reportingOwner>
        <reportingOwnerId>
            <rptOwnerCik>0001052192</rptOwnerCik>
            <rptOwnerName>CASCADE INVESTMENT LLC</rptOwnerName>
        </reportingOwnerId>
        <reportingOwnerAddress>
            <rptOwnerStreet1>2365 CARILLON POINT</rptOwnerStreet1>
            <rptOwnerStreet2></rptOwnerStreet2>
            <rptOwnerCity>KIRKLAND</rptOwnerCity>
            <rptOwnerState>WA</rptOwnerState>
            <rptOwnerZipCode>98033</rptOwnerZipCode>
            <rptOwnerStateDescription></rptOwnerStateDescription>
        </reportingOwnerAddress>
        <reportingOwnerRelationship>
            <isDirector>0</isDirector>
            <isOfficer>0</isOfficer>
            <isTenPercentOwner>1</isTenPercentOwner>
            <isOther>0</isOther>
        </reportingOwnerRelationship>
    </reportingOwner>

    <reportingOwner>
        <reportingOwnerId>
            <rptOwnerCik>0000902012</rptOwnerCik>
            <rptOwnerName>GATES WILLIAM H III</rptOwnerName>
        </reportingOwnerId>
        <reportingOwnerAddress>
            <rptOwnerStreet1>ONE MICROSOFT WAY</rptOwnerStreet1>
            <rptOwnerStreet2></rptOwnerStreet2>
            <rptOwnerCity>REDMOND</rptOwnerCity>
            <rptOwnerState>WA</rptOwnerState>
            <rptOwnerZipCode>98052</rptOwnerZipCode>
            <rptOwnerStateDescription></rptOwnerStateDescription>
        </reportingOwnerAddress>
        <reportingOwnerRelationship>
            <isDirector>0</isDirector>
            <isOfficer>0</isOfficer>
            <isTenPercentOwner>1</isTenPercentOwner>
            <isOther>0</isOther>
        </reportingOwnerRelationship>
    </reportingOwner>

    <nonDerivativeTable>
        <nonDerivativeTransaction>
            <securityTitle>
                <value>Common Stock</value>
            </securityTitle>
            <transactionDate>
                <value>2009-02-12</value>
            </transactionDate>
            <transactionCoding>
                <transactionFormType>4</transactionFormType>
                <transactionCode>P</transactionCode>
                <equitySwapInvolved>0</equitySwapInvolved>
            </transactionCoding>
            <transactionAmounts>
                <transactionShares>
                    <value>235471</value>
                </transactionShares>
                <transactionPricePerShare>
                    <value>23.4824</value>
                    <footnoteId id="F1"/>
                </transactionPricePerShare>
                <transactionAcquiredDisposedCode>
                    <value>A</value>
                </transactionAcquiredDisposedCode>
            </transactionAmounts>
            <postTransactionAmounts>
                <sharesOwnedFollowingTransaction>
                    <value>48665040</value>
                </sharesOwnedFollowingTransaction>
            </postTransactionAmounts>
            <ownershipNature>
                <directOrIndirectOwnership>
                    <value>D</value>
                </directOrIndirectOwnership>
                <natureOfOwnership>
                    <value></value>
                </natureOfOwnership>
            </ownershipNature>
        </nonDerivativeTransaction>
        <nonDerivativeTransaction>
            <securityTitle>
                <value>Common Stock</value>
            </securityTitle>
            <transactionDate>
                <value>2009-02-12</value>
            </transactionDate>
            <transactionCoding>
                <transactionFormType>4</transactionFormType>
                <transactionCode>P</transactionCode>
                <equitySwapInvolved>0</equitySwapInvolved>
            </transactionCoding>
            <transactionAmounts>
                <transactionShares>
                    <value>264529</value>
                </transactionShares>
                <transactionPricePerShare>
                    <value>24.2026</value>
                    <footnoteId id="F2"/>
                </transactionPricePerShare>
                <transactionAcquiredDisposedCode>
                    <value>A</value>
                </transactionAcquiredDisposedCode>
            </transactionAmounts>
            <postTransactionAmounts>
                <sharesOwnedFollowingTransaction>
                    <value>48929569</value>
                </sharesOwnedFollowingTransaction>
            </postTransactionAmounts>
            <ownershipNature>
                <directOrIndirectOwnership>
                    <value>D</value>
                </directOrIndirectOwnership>
                <natureOfOwnership>
                    <value></value>
                </natureOfOwnership>
            </ownershipNature>
        </nonDerivativeTransaction>
    </nonDerivativeTable>

    <footnotes>
        <footnote id="F1">This transaction was executed in multiple trades at prices ranging from $22.87 to $23.865. The price reported above reflects the weighted average purchase price. The reporting person hereby undertakes to provide upon request to the SEC staff, the issuer or a security holder of the issuer full information regarding the number of shares and prices at which the transactions were effected.</footnote>
        <footnote id="F2">This transaction was executed in multiple trades at prices ranging from $23.87 to $24.66. The price reported above reflects the weighted average purchase price. The reporting person hereby undertakes to provide upon request to the SEC staff, the issuer or a security holder of the issuer full information regarding the number of shares and prices at which the transactions were effected.</footnote>
    </footnotes>

    <remarks>(a) Duly authorized under Special Limited Power of Attorney appointing Alan D. Heuberger attorney-in-fact, dated August 12, 2008, on behalf of Michael Larson, filed as Exhibit 24.1 to Cascade Investment, L.L.C.'s amended Form 4 with respect to Republic Services, Inc. on February 17, 2009, and incorporated herein by reference.

(b) Duly authorized under Special Limited Power of Attorney appointing Alan D. Heuberger attorney-in-fact, dated August 12, 2008, on behalf of William H. Gates III, filed as Exhibit 24.2 to Cascade Investment, L.L.C.'s amended Form 4 with respect to Republic Services, Inc. on February 17, 2009, and incorporated herein by reference.</remarks>

    <ownerSignature>
        <signatureName>Cascade Investment, L.L.C. By: /s/ Alan D. Heuberger, Attorney-In-Fact for Michael Larson, Business Manager (a)</signatureName>
        <signatureDate>2009-02-17</signatureDate>
    </ownerSignature>

    <ownerSignature>
        <signatureName>/s/ Alan D. Heuberger, Attorney-In-Fact for William H Gates III (b)</signatureName>
        <signatureDate>2009-02-17</signatureDate>
    </ownerSignature>
</ownershipDocument>
