v3.24.0.1

Income Taxes - Schedule of Reconciliation of Statutory Federal Income Tax Rate to Effective Tax Rate (Details) | 12 Months Ended
--- | ---
Dec. 31, 2023 | Dec. 31, 2022 | Dec. 31, 2021
Income Tax Disclosure [Abstract] |  |  |
U.S. federal income tax at statutory rate | 21.00% | 21.00% | 21.00%
U.S. state and local income taxes | (0.40%) | (0.50%) | 0.20%
Change in valuation allowance | (23.60%) | (39.10%) | 140.00%
Research and development tax credit | 6.80% | 14.60% | (30.70%)
Stock-based compensation | (2.80%) | 4.00% | (114.30%)
Discrete tax benefit due to intellectual property transfer | 0.00% | 0.00% | (19.10%)
Meals and entertainment | (0.20%) | (0.10%) | 0.10%
Foreign rate differential | 0.00% | 0.20% | 0.10%
Section 162(m) limitation | (2.10%) | (0.50%) | 1.10%
State apportionment change | 0.00% | 0.10% | 0.00%
Tax rate change | 0.00% | 0.00% | (0.70%)
Provision to return true-up | 0.10% | (0.10%) | (0.10%)
Other | (0.20%) | (0.80%) | (0.10%)
Effective tax rate | (1.40%) | (1.20%) | (2.50%)

X
- Definition Effective Income Tax Rate Reconciliation, Discrete Tax Benefit Recognized On Transfer Of Intellectual Property, Percent + References No definition available. + Details
Name: | roku_EffectiveIncomeTaxRateReconciliationDiscreteTaxBenefitRecognizedOnTransferOfIntellectualPropertyPercent
Namespace Prefix: | roku_
Data Type: | dtr-types1:percentItemType
Balance Type: | na
Period Type: | duration

X
- Definition Effective income tax rate reconciliation provision to return true-up. + References No definition available. + Details
Name: | roku_EffectiveIncomeTaxRateReconciliationProvisionToReturnTrueUp
Namespace Prefix: | roku_
Data Type: | dtr-types1:percentItemType
Balance Type: | na
Period Type: | duration

X
- Definition Percentage of current income tax expense (benefit) and deferred income tax expense (benefit) pertaining to continuing operations. + References Reference 1: http://www.xbrl.org/2003/role/disclosureRef -Topic 740 -SubTopic 10 -Name Accounting Standards Codification -Section 50 -Paragraph 12 -Publisher FASB -URI https://asc.fasb.org//1943274/2147482685/740-10-50-12 + Details
Name: | us-gaap_EffectiveIncomeTaxRateContinuingOperations
Namespace Prefix: | us-gaap_
Data Type: | dtr-types:percentItemType
Balance Type: | na
Period Type: | duration

X
- Definition Percentage of domestic federal statutory tax rate applicable to pretax income (loss). + References Reference 1: http://www.xbrl.org/2003/role/disclosureRef -Topic 235 -SubTopic 10 -Name Accounting Standards Codification -Section S99 -Paragraph 1 -Subparagraph (SX 210.4-08(h)(2)) -Publisher FASB -URI https://asc.fasb.org//1943274/2147480678/235-10-S99-1 Reference 2: http://www.xbrl.org/2003/role/disclosureRef -Topic 740 -SubTopic 10 -Name Accounting Standards Codification -Section 50 -Paragraph 12 -Publisher FASB -URI https://asc.fasb.org//1943274/2147482685/740-10-50-12 Reference 3: http://www.xbrl.org/2003/role/disclosureRef -Topic 740 -SubTopic 10 -Name Accounting Standards Codification -Section S99 -Paragraph 1 -Subparagraph (SAB Topic 6.I.Fact.4) -Publisher FASB -URI https://asc.fasb.org//1943274/2147479360/740-10-S99-1 + Details
Name: | us-gaap_EffectiveIncomeTaxRateReconciliationAtFederalStatutoryIncomeTaxRate
Namespace Prefix: | us-gaap_
Data Type: | dtr-types:percentItemType
Balance Type: | na
Period Type: | duration

X
- Definition Percentage of the difference between reported income tax expense (benefit) and expected income tax expense (benefit) computed by applying the domestic federal statutory income tax rates to pretax income (loss) from continuing operations attributable to changes in the valuation allowance for deferred tax assets. + References Reference 1: http://www.xbrl.org/2009/role/commonPracticeRef -Topic 740 -SubTopic 10 -Name Accounting Standards Codification -Section 50 -Paragraph 12 -Publisher FASB -URI https://asc.fasb.org//1943274/2147482685/740-10-50-12 Reference 2: http://www.xbrl.org/2009/role/commonPracticeRef -Topic 740 -SubTopic 10 -Name Accounting Standards Codification -Section S99 -Paragraph 1 -Subparagraph (SAB Topic 6.I.Fact.4) -Publisher FASB -URI https://asc.fasb.org//1943274/2147479360/740-10-S99-1 + Details
Name: | us-gaap_EffectiveIncomeTaxRateReconciliationChangeInDeferredTaxAssetsValuationAllowance
Namespace Prefix: | us-gaap_
Data Type: | dtr-types:percentItemType
Balance Type: | na
Period Type: | duration

X
- Definition Percentage of the difference between reported income tax expense (benefit) and expected income tax expense (benefit) computed by applying the domestic federal statutory income tax rates to pretax income (loss) from continuing operations attributable to changes in the income tax rates. + References Reference 1: http://www.xbrl.org/2009/role/commonPracticeRef -Topic 740 -SubTopic 10 -Name Accounting Standards Codification -Section 50 -Paragraph 12 -Publisher FASB -URI https://asc.fasb.org//1943274/2147482685/740-10-50-12 Reference 2: http://www.xbrl.org/2003/role/disclosureRef -Topic 740 -SubTopic 10 -Name Accounting Standards Codification -Section S99 -Paragraph 1 -Subparagraph (SAB Topic 6.I.Fact.4) -Publisher FASB -URI https://asc.fasb.org//1943274/2147479360/740-10-S99-1 + Details
Name: | us-gaap_EffectiveIncomeTaxRateReconciliationChangeInEnactedTaxRate
Namespace Prefix: | us-gaap_
Data Type: | dtr-types:percentItemType
Balance Type: | na
Period Type: | duration

X
- Definition Percentage of the difference between reported income tax expense (benefit) and expected income tax expense (benefit) computed by applying the domestic federal statutory income tax rates to pretax income (loss) from continuing operations applicable to statutory income tax expense (benefit) outside of the country of domicile. + References Reference 1: http://www.xbrl.org/2009/role/commonPracticeRef -Topic 740 -SubTopic 10 -Name Accounting Standards Codification -Section 50 -Paragraph 12 -Publisher FASB -URI https://asc.fasb.org//1943274/2147482685/740-10-50-12 Reference 2: http://www.xbrl.org/2009/role/commonPracticeRef -Topic 740 -SubTopic 10 -Name Accounting Standards Codification -Section S99 -Paragraph 1 -Subparagraph (SAB Topic 6.I.Fact.4) -Publisher FASB -URI https://asc.fasb.org//1943274/2147479360/740-10-S99-1 + Details
Name: | us-gaap_EffectiveIncomeTaxRateReconciliationForeignIncomeTaxRateDifferential
Namespace Prefix: | us-gaap_
Data Type: | dtr-types:percentItemType
Balance Type: | na
Period Type: | duration

X
- Definition Percentage of the difference between reported income tax expense (benefit) and expected income tax expense (benefit) computed by applying the domestic federal statutory income tax rates to pretax income (loss) from continuing operations attributable to meals and entertainment expense. + References Reference 1: http://www.xbrl.org/2009/role/commonPracticeRef -Topic 740 -SubTopic 10 -Name Accounting Standards Codification -Section 50 -Paragraph 12 -Publisher FASB -URI https://asc.fasb.org//1943274/2147482685/740-10-50-12 Reference 2: http://www.xbrl.org/2009/role/commonPracticeRef -Topic 740 -SubTopic 10 -Name Accounting Standards Codification -Section S99 -Paragraph 1 -Subparagraph (SAB Topic 6.I.Fact.4) -Publisher FASB -URI https://asc.fasb.org//1943274/2147479360/740-10-S99-1 + Details
Name: | us-gaap_EffectiveIncomeTaxRateReconciliationNondeductibleExpenseMealsAndEntertainment
Namespace Prefix: | us-gaap_
Data Type: | dtr-types:percentItemType
Balance Type: | na
Period Type: | duration

X
- Definition Percentage of difference between reported income tax expense (benefit) and expected income tax expense (benefit) computed by applying domestic federal statutory income tax rate to pretax income (loss) from continuing operation, attributable to nondeductible expense for share-based payment arrangement. + References Reference 1: http://www.xbrl.org/2009/role/commonPracticeRef -Topic 740 -SubTopic 10 -Name Accounting Standards Codification -Section 50 -Paragraph 12 -Publisher FASB -URI https://asc.fasb.org//1943274/2147482685/740-10-50-12 Reference 2: http://www.xbrl.org/2009/role/commonPracticeRef -Topic 740 -SubTopic 10 -Name Accounting Standards Codification -Section S99 -Paragraph 1 -Subparagraph (SAB Topic 6.I.Fact.4) -Publisher FASB -URI https://asc.fasb.org//1943274/2147479360/740-10-S99-1 + Details
Name: | us-gaap_EffectiveIncomeTaxRateReconciliationNondeductibleExpenseShareBasedCompensationCost
Namespace Prefix: | us-gaap_
Data Type: | dtr-types:percentItemType
Balance Type: | na
Period Type: | duration

X
- Definition Percentage of the difference between reported income tax expense (benefit) and expected income tax expense (benefit) computed by applying the domestic federal statutory income tax rates to pretax income (loss) from continuing operations attributable to other adjustments. + References Reference 1: http://www.xbrl.org/2009/role/commonPracticeRef -Topic 740 -SubTopic 10 -Name Accounting Standards Codification -Section 50 -Paragraph 12 -Publisher FASB -URI https://asc.fasb.org//1943274/2147482685/740-10-50-12 Reference 2: http://www.xbrl.org/2009/role/commonPracticeRef -Topic 740 -SubTopic 10 -Name Accounting Standards Codification -Section S99 -Paragraph 1 -Subparagraph (SAB Topic 6.I.Fact.4) -Publisher FASB -URI https://asc.fasb.org//1943274/2147479360/740-10-S99-1 + Details
Name: | us-gaap_EffectiveIncomeTaxRateReconciliationOtherAdjustments
Namespace Prefix: | us-gaap_
Data Type: | dtr-types:percentItemType
Balance Type: | na
Period Type: | duration

X
- Definition Percentage of difference between reported income tax expense (benefit) and expected income tax expense (benefit) computed by applying domestic federal statutory income tax rate to pretax income (loss) from continuing operation, attributable to expense for award under share-based payment arrangement. Excludes expense determined to be nondeductible upon grant or after for award under share-based payment arrangement. + References Reference 1: http://www.xbrl.org/2009/role/commonPracticeRef -Topic 740 -SubTopic 10 -Name Accounting Standards Codification -Section 50 -Paragraph 12 -Publisher FASB -URI https://asc.fasb.org//1943274/2147482685/740-10-50-12 Reference 2: http://www.xbrl.org/2009/role/commonPracticeRef -Name Accounting Standards Codification -Section 35 -Paragraph 2 -SubTopic 740 -Topic 718 -Publisher FASB -URI https://asc.fasb.org//1943274/2147480887/718-740-35-2 + Details
Name: | us-gaap_EffectiveIncomeTaxRateReconciliationShareBasedCompensationExcessTaxBenefitPercent
Namespace Prefix: | us-gaap_
Data Type: | dtr-types:percentItemType
Balance Type: | na
Period Type: | duration

X
- Definition Percentage of the difference between reported income tax expense (benefit) and expected income tax expense (benefit) computed by applying the domestic federal statutory income tax rates to pretax income (loss) from continuing operations applicable to state and local income tax expense (benefit), net of federal tax expense (benefit). + References Reference 1: http://www.xbrl.org/2009/role/commonPracticeRef -Topic 740 -SubTopic 10 -Name Accounting Standards Codification -Section 50 -Paragraph 12 -Publisher FASB -URI https://asc.fasb.org//1943274/2147482685/740-10-50-12 Reference 2: http://www.xbrl.org/2009/role/commonPracticeRef -Topic 740 -SubTopic 10 -Name Accounting Standards Codification -Section S99 -Paragraph 1 -Subparagraph (SAB Topic 6.I.Fact.4) -Publisher FASB -URI https://asc.fasb.org//1943274/2147479360/740-10-S99-1 + Details
Name: | us-gaap_EffectiveIncomeTaxRateReconciliationStateAndLocalIncomeTaxes
Namespace Prefix: | us-gaap_
Data Type: | dtr-types:percentItemType
Balance Type: | na
Period Type: | duration

X
- Definition Percentage of the difference between reported income tax expense (benefit) and expected income tax expense (benefit) computed by applying the domestic federal statutory income tax rates to pretax income (loss) from continuing operations attributable to state and local income tax contingency. + References Reference 1: http://www.xbrl.org/2009/role/commonPracticeRef -Topic 740 -SubTopic 10 -Name Accounting Standards Codification -Section 50 -Paragraph 12 -Publisher FASB -URI https://asc.fasb.org//1943274/2147482685/740-10-50-12 Reference 2: http://www.xbrl.org/2009/role/commonPracticeRef -Topic 740 -SubTopic 10 -Name Accounting Standards Codification -Section S99 -Paragraph 1 -Subparagraph (SAB Topic 6.I.Fact.4) -Publisher FASB -URI https://asc.fasb.org//1943274/2147479360/740-10-S99-1 + Details
Name: | us-gaap_EffectiveIncomeTaxRateReconciliationTaxContingenciesStateAndLocal
Namespace Prefix: | us-gaap_
Data Type: | dtr-types:percentItemType
Balance Type: | na
Period Type: | duration

X
- Definition Percentage of the difference between reported income tax expense (benefit) and expected income tax expense (benefit) computed by applying the domestic federal statutory income tax rates to pretax income (loss) from continuing operations attributable to research tax credit. + References Reference 1: http://www.xbrl.org/2009/role/commonPracticeRef -Topic 740 -SubTopic 10 -Name Accounting Standards Codification -Section 50 -Paragraph 12 -Publisher FASB -URI https://asc.fasb.org//1943274/2147482685/740-10-50-12 Reference 2: http://www.xbrl.org/2009/role/commonPracticeRef -Topic 740 -SubTopic 10 -Name Accounting Standards Codification -Section S99 -Paragraph 1 -Subparagraph (SAB Topic 6.I.Fact.4) -Publisher FASB -URI https://asc.fasb.org//1943274/2147479360/740-10-S99-1 + Details
Name: | us-gaap_EffectiveIncomeTaxRateReconciliationTaxCreditsResearch
Namespace Prefix: | us-gaap_
Data Type: | dtr-types:percentItemType
Balance Type: | na
Period Type: | duration

X
- References No definition available. + Details
Name: | us-gaap_IncomeTaxDisclosureAbstract
Namespace Prefix: | us-gaap_
Data Type: | xbrli:stringItemType
Balance Type: | na
Period Type: | duration