v3.24.0.1

Stockholders' Equity - Schedule of Share-based Compensation Expense (Details) - USD ($) $ in Thousands | 12 Months Ended
--- | ---
Dec. 31, 2023 | Dec. 31, 2022 | Dec. 31, 2021
Employee Service Share Based Compensation Allocation Of Recognized Period Costs [Line Items] |  |  |
Total stock-based compensation | $ 370,130 | $ 359,931 | $ 187,532
Cost of revenue | Platform |  |  |
Employee Service Share Based Compensation Allocation Of Recognized Period Costs [Line Items] |  |  |
Total stock-based compensation | 1,478 | 1,229 | 827
Cost of revenue | Devices |  |  |
Employee Service Share Based Compensation Allocation Of Recognized Period Costs [Line Items] |  |  |
Total stock-based compensation | 3,761 | 2,440 | 2,035
Research and development |  |  |
Employee Service Share Based Compensation Allocation Of Recognized Period Costs [Line Items] |  |  |
Total stock-based compensation | 147,989 | 147,653 | 77,770
Sales and marketing |  |  |
Employee Service Share Based Compensation Allocation Of Recognized Period Costs [Line Items] |  |  |
Total stock-based compensation | 130,362 | 123,946 | 63,503
General and administrative |  |  |
Employee Service Share Based Compensation Allocation Of Recognized Period Costs [Line Items] |  |  |
Total stock-based compensation | $ 86,540 | $ 84,663 | $ 43,397

X
- Definition Amount of expense for award under share-based payment arrangement. Excludes amount capitalized. + References Reference 1: http://www.xbrl.org/2003/role/disclosureRef -Topic 718 -SubTopic 10 -Name Accounting Standards Codification -Section S99 -Paragraph 1 -Subparagraph (SAB Topic 14.F) -Publisher FASB -URI https://asc.fasb.org//1943274/2147479830/718-10-S99-1 Reference 2: http://www.xbrl.org/2003/role/disclosureRef -Topic 718 -SubTopic 10 -Name Accounting Standards Codification -Section 50 -Paragraph 2 -Subparagraph (h)(1)(i) -Publisher FASB -URI https://asc.fasb.org//1943274/2147480429/718-10-50-2 + Details
Name: | us-gaap_AllocatedShareBasedCompensationExpense
Namespace Prefix: | us-gaap_
Data Type: | xbrli:monetaryItemType
Balance Type: | debit
Period Type: | duration

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 No definition available. + Details
Name: | us-gaap_EmployeeServiceShareBasedCompensationAllocationOfRecognizedPeriodCostsLineItems
Namespace Prefix: | us-gaap_
Data Type: | xbrli:stringItemType
Balance Type: | na
Period Type: | duration

X
- Details
Name: | us-gaap_IncomeStatementLocationAxis=us-gaap_CostOfSalesMember
Namespace Prefix: |
Data Type: | na
Balance Type: |
Period Type: |

X
- Details
Name: | us-gaap_StatementBusinessSegmentsAxis=roku_PlatformSegmentMember
Namespace Prefix: |
Data Type: | na
Balance Type: |
Period Type: |

X
- Details
Name: | us-gaap_StatementBusinessSegmentsAxis=roku_DeviceSegmentMember
Namespace Prefix: |
Data Type: | na
Balance Type: |
Period Type: |

X
- Details
Name: | us-gaap_IncomeStatementLocationAxis=us-gaap_ResearchAndDevelopmentExpenseMember
Namespace Prefix: |
Data Type: | na
Balance Type: |
Period Type: |

X
- Details
Name: | us-gaap_IncomeStatementLocationAxis=us-gaap_SellingAndMarketingExpenseMember
Namespace Prefix: |
Data Type: | na
Balance Type: |
Period Type: |

X
- Details
Name: | us-gaap_IncomeStatementLocationAxis=us-gaap_GeneralAndAdministrativeExpenseMember
Namespace Prefix: |
Data Type: | na
Balance Type: |
Period Type: |