<?xml version="1.0" encoding="utf-8"?>
<xbrl
  xml:lang="en-US"
  xmlns="http://www.xbrl.org/2003/instance"
  xmlns:dei="http://xbrl.sec.gov/dei/2025"
  xmlns:ffd="http://xbrl.sec.gov/ffd/2025"
  xmlns:iso4217="http://www.xbrl.org/2003/iso4217"
  xmlns:link="http://www.xbrl.org/2003/linkbase"
  xmlns:xbrldi="http://xbrl.org/2006/xbrldi"
  xmlns:xlink="http://www.w3.org/1999/xlink">
    <link:schemaRef
      xlink:href="https://xbrl.sec.gov/ffd/2025/ffd-2025.xsd"
      xlink:type="simple"/>
    <context id="c-1">
        <entity>
            <identifier scheme="http://www.sec.gov/CIK">0001642896</identifier>
        </entity>
        <period>
            <startDate>2026-03-16</startDate>
            <endDate>2026-03-16</endDate>
        </period>
    </context>
    <context id="c-2">
        <entity>
            <identifier scheme="http://www.sec.gov/CIK">0001642896</identifier>
            <segment>
                <xbrldi:typedMember dimension="ffd:OfferingAxis">
                    <dei:lineNo>1</dei:lineNo>
                </xbrldi:typedMember>
            </segment>
        </entity>
        <period>
            <startDate>2026-03-16</startDate>
            <endDate>2026-03-16</endDate>
        </period>
    </context>
    <context id="c-3">
        <entity>
            <identifier scheme="http://www.sec.gov/CIK">0001642896</identifier>
            <segment>
                <xbrldi:typedMember dimension="ffd:OfferingAxis">
                    <dei:lineNo>2</dei:lineNo>
                </xbrldi:typedMember>
            </segment>
        </entity>
        <period>
            <startDate>2026-03-16</startDate>
            <endDate>2026-03-16</endDate>
        </period>
    </context>
    <unit id="shares">
        <measure>shares</measure>
    </unit>
    <unit id="usd">
        <measure>iso4217:USD</measure>
    </unit>
    <unit id="number">
        <measure>pure</measure>
    </unit>
    <dei:EntityCentralIndexKey contextRef="c-1" id="f-27">0001642896</dei:EntityCentralIndexKey>
    <ffd:SubmissnTp contextRef="c-1" id="f-28">S-8</ffd:SubmissnTp>
    <ffd:FeeExhibitTp contextRef="c-1" id="f-29">EX-FILING FEES</ffd:FeeExhibitTp>
    <ffd:OffsetTableNa contextRef="c-1" id="f-30">N/A</ffd:OffsetTableNa>
    <ffd:OfferingNote contextRef="c-2" id="f-31">&lt;span style="color:#000000;font-family:'Times New Roman',serif;font-size:10pt;font-weight:400;line-height:120%;padding-left:6.34pt"&gt;Pursuant to Rule 416(a) of the Securities Act of 1933, as amended (the &#x201c;&lt;/span&gt;&lt;span style="color:#000000;font-family:'Times New Roman',serif;font-size:10pt;font-weight:700;line-height:120%"&gt;Securities Act&lt;/span&gt;&lt;span style="color:#000000;font-family:'Times New Roman',serif;font-size:10pt;font-weight:400;line-height:120%"&gt;&#x201d;), this Registration Statement covers any additional shares of the Registrant&#x2019;s Class A common stock (&#x201c;&lt;/span&gt;&lt;span style="color:#000000;font-family:'Times New Roman',serif;font-size:10pt;font-weight:700;line-height:120%"&gt;Class A common stock&lt;/span&gt;&lt;span style="color:#000000;font-family:'Times New Roman',serif;font-size:10pt;font-weight:400;line-height:120%"&gt;&#x201d;) that become issuable under the Registrant&#x2019;s 2021 Equity Incentive Plan (the &#x201c;&lt;/span&gt;&lt;span style="color:#000000;font-family:'Times New Roman',serif;font-size:10pt;font-weight:700;line-height:120%"&gt;2021 Plan&lt;/span&gt;&lt;span style="color:#000000;font-family:'Times New Roman',serif;font-size:10pt;font-weight:400;line-height:120%"&gt;&#x201d;) and the Registrant&#x2019;s 2021 Employee Stock Purchase Plan (the &#x201c;&lt;/span&gt;&lt;span style="color:#000000;font-family:'Times New Roman',serif;font-size:10pt;font-weight:700;line-height:120%"&gt;2021 ESPP&lt;/span&gt;&lt;span style="color:#000000;font-family:'Times New Roman',serif;font-size:10pt;font-weight:400;line-height:120%"&gt;&#x201d;) by reason of any stock dividend, stock split, recapitalization or other similar transaction effected without the Registrant&#x2019;s receipt of consideration that results in an increase in the number of outstanding shares of Class A common stock.&lt;/span&gt;&lt;div style="margin-bottom:6pt;padding-left:36pt;text-align:justify;text-indent:-18pt"&gt;&lt;span style="color:#000000;font-family:'Times New Roman',serif;font-size:10pt;font-weight:400;line-height:120%"&gt;(2)&lt;/span&gt;&lt;span style="color:#000000;font-family:'Times New Roman',serif;font-size:10pt;font-weight:400;line-height:120%;padding-left:6.34pt"&gt;Represents shares of Class A common stock that were automatically added to the shares reserved for issuance under the 2021 Plan on February&#160;1, 2026 pursuant to an &#x201c;evergreen&#x201d; provision contained in the 2021 Plan. Pursuant to such provision, the number of shares reserved for issuance under the 2021 Plan automatically increases on the first day of each fiscal year beginning with the 2023 fiscal year, in the amount equal to the least of: (i) 50,600,000 shares of Class A common stock, (ii) five percent (5%) of the outstanding shares of all classes of the Registrant&#x2019;s common stock on the last day of the immediately preceding fiscal year, and (iii) such number of shares of Class A common stock determined by the administrator of the 2021 Plan.&lt;/span&gt;&lt;/div&gt;&lt;div style="margin-bottom:6pt;padding-left:36pt;text-align:justify;text-indent:-18pt"&gt;&lt;span style="color:#000000;font-family:'Times New Roman',serif;font-size:10pt;font-weight:400;line-height:120%"&gt;(4)&lt;/span&gt;&lt;span style="color:#000000;font-family:'Times New Roman',serif;font-size:10pt;font-weight:400;line-height:120%;padding-left:6.34pt"&gt;Estimated in accordance with Rule 457(c) and (h) under the Securities Act solely for the purpose of calculating the registration fee on the basis of $31.73 per share, which is the average of the high and low prices of Class A common stock on March&#160;13, 2026, as reported on the New York Stock Exchange.&lt;/span&gt;&lt;/div&gt;</ffd:OfferingNote>
    <ffd:MaxOfferingPricPerScty contextRef="c-2" decimals="2" id="f-32" unitRef="usd">31.73</ffd:MaxOfferingPricPerScty>
    <ffd:OfferingNote contextRef="c-3" id="f-33">&lt;span style="color:#000000;font-family:'Times New Roman',serif;font-size:10pt;font-weight:400;line-height:120%;padding-left:6.34pt"&gt;Pursuant to Rule 416(a) of the Securities Act of 1933, as amended (the &#x201c;&lt;/span&gt;&lt;span style="color:#000000;font-family:'Times New Roman',serif;font-size:10pt;font-weight:700;line-height:120%"&gt;Securities Act&lt;/span&gt;&lt;span style="color:#000000;font-family:'Times New Roman',serif;font-size:10pt;font-weight:400;line-height:120%"&gt;&#x201d;), this Registration Statement covers any additional shares of the Registrant&#x2019;s Class A common stock (&#x201c;&lt;/span&gt;&lt;span style="color:#000000;font-family:'Times New Roman',serif;font-size:10pt;font-weight:700;line-height:120%"&gt;Class A common stock&lt;/span&gt;&lt;span style="color:#000000;font-family:'Times New Roman',serif;font-size:10pt;font-weight:400;line-height:120%"&gt;&#x201d;) that become issuable under the Registrant&#x2019;s 2021 Equity Incentive Plan (the &#x201c;&lt;/span&gt;&lt;span style="color:#000000;font-family:'Times New Roman',serif;font-size:10pt;font-weight:700;line-height:120%"&gt;2021 Plan&lt;/span&gt;&lt;span style="color:#000000;font-family:'Times New Roman',serif;font-size:10pt;font-weight:400;line-height:120%"&gt;&#x201d;) and the Registrant&#x2019;s 2021 Employee Stock Purchase Plan (the &#x201c;&lt;/span&gt;&lt;span style="color:#000000;font-family:'Times New Roman',serif;font-size:10pt;font-weight:700;line-height:120%"&gt;2021 ESPP&lt;/span&gt;&lt;span style="color:#000000;font-family:'Times New Roman',serif;font-size:10pt;font-weight:400;line-height:120%"&gt;&#x201d;) by reason of any stock dividend, stock split, recapitalization or other similar transaction effected without the Registrant&#x2019;s receipt of consideration that results in an increase in the number of outstanding shares of Class A common stock.&lt;/span&gt;&lt;div style="margin-bottom:6pt;padding-left:36pt;text-align:justify;text-indent:-18pt"&gt;&lt;span style="color:#000000;font-family:'Times New Roman',serif;font-size:10pt;font-weight:400;line-height:120%"&gt;(3)&lt;/span&gt;&lt;span style="color:#000000;font-family:'Times New Roman',serif;font-size:10pt;font-weight:400;line-height:120%;padding-left:6.34pt"&gt;Represents shares of Class A common stock that were automatically added to the shares reserved for issuance under the 2021 ESPP on February&#160;1, 2026 pursuant to an &#x201c;evergreen&#x201d; provision contained in the 2021 ESPP. Pursuant to such provision, the number of shares reserved for issuance under the 2021 ESPP automatically increases on the first day of each fiscal year beginning with the 2023 fiscal year, in the amount equal to the least of: (i) 10,200,000 shares of Class A common stock, (ii) one percent (1%) of the outstanding shares of all classes of the Registrant&#x2019;s common stock on the last day of the immediately preceding fiscal year, or (iii) such number of shares of Class A common stock determined by the administrator of the 2021 ESPP.&lt;/span&gt;&lt;/div&gt;&lt;div style="margin-bottom:6pt;padding-left:36pt;text-align:justify;text-indent:-18pt"&gt;&lt;span style="color:#000000;font-family:'Times New Roman',serif;font-size:10pt;font-weight:400;line-height:120%"&gt;(5)&lt;/span&gt;&lt;span style="color:#000000;font-family:'Times New Roman',serif;font-size:10pt;font-weight:400;line-height:120%;padding-left:6.34pt"&gt;Estimated in accordance with Rule 457(c) and (h) solely for the purpose of calculating the registration fee on the basis of 85% of $31.73, which is the average of the high and low prices of Class A common stock on March&#160;13, 2026, as reported on the New York Stock Exchange. Pursuant to the 2021 ESPP, the purchase price of the shares of Class A common stock reserved for issuance thereunder will be at least 85% of the lower of the fair market value of Class A common stock on the Enrollment Date or the Exercise Date (as such terms are defined in the 2021 ESPP).&lt;/span&gt;&lt;/div&gt;</ffd:OfferingNote>
    <ffd:MaxOfferingPricPerScty contextRef="c-2" decimals="2" id="f-34" unitRef="usd">31.73</ffd:MaxOfferingPricPerScty>
    <ffd:FormTp contextRef="c-1" id="f-1">S-8</ffd:FormTp>
    <dei:EntityRegistrantName contextRef="c-1" id="f-2">Samsara Inc.</dei:EntityRegistrantName>
    <ffd:PrevslyPdFlg contextRef="c-2" id="f-3">false</ffd:PrevslyPdFlg>
    <ffd:OfferingSctyTp contextRef="c-2" id="f-4">Equity</ffd:OfferingSctyTp>
    <ffd:OfferingSctyTitl contextRef="c-2" id="f-5">Class A common stock, $0.0001 par value per share, reserved for issuance pursuant to the 2021 Equity Incentive Plan</ffd:OfferingSctyTitl>
    <ffd:FeesOthrRuleFlg contextRef="c-2" id="f-6">true</ffd:FeesOthrRuleFlg>
    <ffd:AmtSctiesRegd contextRef="c-2" decimals="0" id="f-7" unitRef="shares">29035779</ffd:AmtSctiesRegd>
    <ffd:MaxOfferingPricPerScty contextRef="c-2" decimals="2" id="f-8" unitRef="usd">31.73</ffd:MaxOfferingPricPerScty>
    <ffd:MaxAggtOfferingPric contextRef="c-2" decimals="2" id="f-9" unitRef="usd">921305267.67</ffd:MaxAggtOfferingPric>
    <ffd:FeeRate contextRef="c-2" decimals="7" id="f-10" unitRef="number">0.0001381</ffd:FeeRate>
    <ffd:FeeAmt contextRef="c-2" decimals="2" id="f-11" unitRef="usd">127232.26</ffd:FeeAmt>
    <ffd:PrevslyPdFlg contextRef="c-3" id="f-12">false</ffd:PrevslyPdFlg>
    <ffd:OfferingSctyTp contextRef="c-3" id="f-13">Equity</ffd:OfferingSctyTp>
    <ffd:OfferingSctyTitl contextRef="c-3" id="f-14">Class A common stock, $0.0001 par value per share, reserved for issuance pursuant to the 2021 Employee Stock Purchase Plan</ffd:OfferingSctyTitl>
    <ffd:FeesOthrRuleFlg contextRef="c-3" id="f-15">true</ffd:FeesOthrRuleFlg>
    <ffd:AmtSctiesRegd contextRef="c-3" decimals="0" id="f-16" unitRef="shares">5807155</ffd:AmtSctiesRegd>
    <ffd:MaxOfferingPricPerScty contextRef="c-3" decimals="2" id="f-17" unitRef="usd">26.98</ffd:MaxOfferingPricPerScty>
    <ffd:MaxAggtOfferingPric contextRef="c-3" decimals="2" id="f-18" unitRef="usd">156677041.9</ffd:MaxAggtOfferingPric>
    <ffd:FeeRate contextRef="c-3" decimals="7" id="f-19" unitRef="number">0.0001381</ffd:FeeRate>
    <ffd:FeeAmt contextRef="c-3" decimals="2" id="f-20" unitRef="usd">21637.1</ffd:FeeAmt>
    <ffd:TtlOfferingAmt contextRef="c-1" decimals="2" id="f-21" unitRef="usd">1077982309.57</ffd:TtlOfferingAmt>
    <ffd:TtlFeeAmt contextRef="c-1" decimals="2" id="f-22" unitRef="usd">148869.36</ffd:TtlFeeAmt>
    <ffd:TtlOffsetAmt contextRef="c-1" decimals="2" id="f-23" unitRef="usd">0</ffd:TtlOffsetAmt>
    <ffd:NetFeeAmt contextRef="c-1" decimals="2" id="f-24" unitRef="usd">148869.36</ffd:NetFeeAmt>
    <ffd:MaxOfferingPricPerScty contextRef="c-2" decimals="2" id="f-25" unitRef="usd">31.73</ffd:MaxOfferingPricPerScty>
    <ffd:MaxOfferingPricPerScty contextRef="c-2" decimals="2" id="f-26" unitRef="usd">31.73</ffd:MaxOfferingPricPerScty>
</xbrl>
