v3.24.0.1

Balance Sheet Components - Schedule of Accounts Receivable, Net (Details) - USD ($) $ in Thousands | Dec. 31, 2023 | Dec. 31, 2022 | Dec. 31, 2021 | Dec. 31, 2020
--- | --- | --- | --- | ---
Valuation And Qualifying Accounts Disclosure [Line Items] |  |  |  |
Accounts receivable, gross | $ 850,464 | $ 800,984 |  |
Less: Allowances | 34,127 | 40,191 |  |
Accounts receivable, net | 816,337 | 760,793 |  |
Allowance for sales returns |  |  |  |
Valuation And Qualifying Accounts Disclosure [Line Items] |  |  |  |
Less: Allowances | 7,808 | 7,417 | $ 6,015 | $ 5,912
Allowance for sales incentives |  |  |  |
Valuation And Qualifying Accounts Disclosure [Line Items] |  |  |  |
Less: Allowances | 23,024 | 28,903 | 48,411 | 30,838
Allowance for doubtful accounts |  |  |  |
Valuation And Qualifying Accounts Disclosure [Line Items] |  |  |  |
Less: Allowances | 2,213 | 3,498 | $ 2,158 | $ 4,181
Other allowances |  |  |  |
Valuation And Qualifying Accounts Disclosure [Line Items] |  |  |  |
Less: Allowances | $ 1,082 | $ 373 |  |

X
- Definition Line items represent financial concepts included in a table. These concepts are used to disclose reportable information associated with domain members defined in one or many axes to the table. + References Reference 1: http://www.xbrl.org/2003/role/disclosureRef -Name Regulation S-X (SX) -Number 210 -Section 12 -Subsection 09 -Publisher SEC Reference 2: http://www.xbrl.org/2003/role/disclosureRef -Topic 235 -SubTopic 10 -Name Accounting Standards Codification -Section S99 -Paragraph 4 -Subparagraph (SX 210.12-09(Column B)) -Publisher FASB -URI https://asc.fasb.org//1943274/2147480678/235-10-S99-4 Reference 3: http://www.xbrl.org/2003/role/disclosureRef -Topic 235 -SubTopic 10 -Name Accounting Standards Codification -Section S99 -Paragraph 4 -Subparagraph (SX 210.12-09(Column E)) -Publisher FASB -URI https://asc.fasb.org//1943274/2147480678/235-10-S99-4 Reference 4: http://www.xbrl.org/2003/role/disclosureRef -Topic 235 -SubTopic 10 -Name Accounting Standards Codification -Section S99 -Paragraph 4 -Subparagraph (SX 210.12-09(Column D)) -Publisher FASB -URI https://asc.fasb.org//1943274/2147480678/235-10-S99-4 Reference 5: http://www.xbrl.org/2003/role/disclosureRef -Topic 235 -SubTopic 10 -Name Accounting Standards Codification -Section S99 -Paragraph 4 -Subparagraph (SX 210.12-09(Column C(1))) -Publisher FASB -URI https://asc.fasb.org//1943274/2147480678/235-10-S99-4 Reference 6: http://www.xbrl.org/2003/role/disclosureRef -Topic 235 -SubTopic 10 -Name Accounting Standards Codification -Section S99 -Paragraph 4 -Subparagraph (SX 210.12-09(Column C(2))) -Publisher FASB -URI https://asc.fasb.org//1943274/2147480678/235-10-S99-4 + Details
Name: | srt_ValuationAndQualifyingAccountsDisclosureLineItems
Namespace Prefix: | srt_
Data Type: | xbrli:stringItemType
Balance Type: | na
Period Type: | duration

X
- Definition Amount, before allowance for credit loss, of right to consideration from customer for product sold and service rendered in normal course of business, classified as current. + References Reference 1: http://www.xbrl.org/2003/role/disclosureRef -Topic 210 -SubTopic 10 -Name Accounting Standards Codification -Section S99 -Paragraph 1 -Subparagraph (SX 210.5-02(3)(a)(1)) -Publisher FASB -URI https://asc.fasb.org//1943274/2147480566/210-10-S99-1 Reference 2: http://www.xbrl.org/2003/role/exampleRef -Topic 210 -SubTopic 10 -Name Accounting Standards Codification -Section 45 -Paragraph 1 -Subparagraph (c) -Publisher FASB -URI https://asc.fasb.org//1943274/2147483467/210-10-45-1 Reference 3: http://www.xbrl.org/2003/role/disclosureRef -Topic 310 -SubTopic 10 -Name Accounting Standards Codification -Section 45 -Paragraph 2 -Publisher FASB -URI https://asc.fasb.org//1943274/2147481990/310-10-45-2 Reference 4: http://www.xbrl.org/2003/role/disclosureRef -Topic 310 -SubTopic 10 -Name Accounting Standards Codification -Section 45 -Paragraph 9 -Publisher FASB -URI https://asc.fasb.org//1943274/2147481990/310-10-45-9 + Details
Name: | us-gaap_AccountsReceivableGrossCurrent
Namespace Prefix: | us-gaap_
Data Type: | xbrli:monetaryItemType
Balance Type: | debit
Period Type: | instant

X
- Definition Amount, after allowance for credit loss, of right to consideration from customer for product sold and service rendered in normal course of business, classified as current. + References Reference 1: http://www.xbrl.org/2003/role/disclosureRef -Topic 310 -SubTopic 10 -Name Accounting Standards Codification -Section 45 -Paragraph 2 -Publisher FASB -URI https://asc.fasb.org//1943274/2147481990/310-10-45-2 Reference 2: http://www.xbrl.org/2003/role/disclosureRef -Topic 310 -SubTopic 10 -Name Accounting Standards Codification -Section 45 -Paragraph 9 -Publisher FASB -URI https://asc.fasb.org//1943274/2147481990/310-10-45-9 + Details
Name: | us-gaap_AccountsReceivableNetCurrent
Namespace Prefix: | us-gaap_
Data Type: | xbrli:monetaryItemType
Balance Type: | debit
Period Type: | instant

X
- Definition Amount of valuation and qualifying accounts and reserves. + References Reference 1: http://www.xbrl.org/2003/role/disclosureRef -Topic 235 -SubTopic 10 -Name Accounting Standards Codification -Section S99 -Paragraph 4 -Subparagraph (SX 210.12-09(Column B)) -Publisher FASB -URI https://asc.fasb.org//1943274/2147480678/235-10-S99-4 Reference 2: http://www.xbrl.org/2003/role/disclosureRef -Topic 235 -SubTopic 10 -Name Accounting Standards Codification -Section S99 -Paragraph 4 -Subparagraph (SX 210.12-09(Column E)) -Publisher FASB -URI https://asc.fasb.org//1943274/2147480678/235-10-S99-4 + Details
Name: | us-gaap_ValuationAllowancesAndReservesBalance
Namespace Prefix: | us-gaap_
Data Type: | xbrli:monetaryItemType
Balance Type: | credit
Period Type: | instant

X
- Details
Name: | us-gaap_ValuationAllowancesAndReservesTypeAxis=roku_AllowancesForSalesReturnsMember
Namespace Prefix: |
Data Type: | na
Balance Type: |
Period Type: |

X
- Details
Name: | us-gaap_ValuationAllowancesAndReservesTypeAxis=roku_AllowanceForSalesIncentivesMember
Namespace Prefix: |
Data Type: | na
Balance Type: |
Period Type: |

X
- Details
Name: | us-gaap_ValuationAllowancesAndReservesTypeAxis=us-gaap_AllowanceForCreditLossMember
Namespace Prefix: |
Data Type: | na
Balance Type: |
Period Type: |

X
- Details
Name: | us-gaap_ValuationAllowancesAndReservesTypeAxis=roku_AllowanceForOtherAccountsReceivableMember
Namespace Prefix: |
Data Type: | na
Balance Type: |
Period Type: |