<?xml version="1.0" encoding="utf-8"?>
<xbrl
  xmlns="http://www.xbrl.org/2003/instance"
  xmlns:cik0000795384="http://troweprice.com/20230228"
  xmlns:dei="http://xbrl.sec.gov/dei/2022"
  xmlns:iso4217="http://www.xbrl.org/2003/iso4217"
  xmlns:link="http://www.xbrl.org/2003/linkbase"
  xmlns:rr="http://xbrl.sec.gov/rr/2022"
  xmlns:utr="http://www.xbrl.org/2009/utr"
  xmlns:xbrldi="http://xbrl.org/2006/xbrldi"
  xmlns:xlink="http://www.w3.org/1999/xlink">
    <link:schemaRef xlink:href="c497-20231002.xsd" xlink:type="simple"/>
    <context id="Context">
        <entity>
            <identifier scheme="http://www.sec.gov/CIK">0000795384</identifier>
        </entity>
        <period>
            <startDate>2023-02-28</startDate>
            <endDate>2023-02-28</endDate>
        </period>
    </context>
    <context id="Context_S000002150Member_S000002150SummaryMember">
        <entity>
            <identifier scheme="http://www.sec.gov/CIK">0000795384</identifier>
            <segment>
                <xbrldi:explicitMember dimension="dei:LegalEntityAxis">cik0000795384:S000002150Member</xbrldi:explicitMember>
            </segment>
        </entity>
        <period>
            <startDate>2023-02-28</startDate>
            <endDate>2023-02-28</endDate>
        </period>
    </context>
    <unit id="usd">
        <measure>iso4217:USD</measure>
    </unit>
    <unit id="pure">
        <measure>pure</measure>
    </unit>
    <unit id="Years">
        <measure>utr:Y</measure>
    </unit>
    <rr:SupplementToProspectusTextBlock contextRef="Context_S000002150Member_S000002150SummaryMember">&lt;p style="font-size:9.0pt; font-family:Serif; text-align:left; font-weight:normal; text-decoration:none;"&gt;The
U.S. Securities and Exchange Commission (&#x201c;SEC&#x201d;) adopted changes to the rules that govern money market
funds in July 2023 that will affect the way in which money market funds are structured and operated.
The regulatory changes have staggered compliance dates throughout 2023 and 2024, and T. Rowe Price Associates,
Inc. is evaluating the impact of these changes. In connection with these regulatory changes, the following
updates are effective immediately.&lt;/p&gt;&lt;p style="font-size:11.0pt; font-family:Serif; text-align:left; font-weight:bold; text-decoration:none;"&gt;Changes Applicable to Summary Prospectuses and Section 1 of
each Fund&#x2019;s Prospectus:&lt;/p&gt;&lt;p style="font-size:9.0pt; font-family:Serif; text-align:left; font-weight:normal; text-decoration:none;"&gt;The following paragraph under the heading &#x201c;Principal Investment Strategies&#x201d;
is removed entirely:&lt;/p&gt;&lt;p style="font-size:9.0pt; font-family:Serif; text-align:left; font-weight:normal; margin-left:36.0pt; text-decoration:none;"&gt;Pursuant to Rule 2a-7, if the fund&#x2019;s weekly liquid assets
fall below 30% of its total assets, the fund&#x2019;s Board of Directors, in its discretion, may impose liquidity
fees of up to 2% of the value of the shares redeemed or temporarily suspend redemptions from the fund
for up to 10 business days during any 90&#x2013;day period (i.e., a &#x201c;redemption gate&#x201d;). In addition, if
the fund&#x2019;s weekly liquid assets fall below 10% of its total assets at the end of any business day,
the fund must impose a 1% liquidity fee on shareholder redemptions unless the fund&#x2019;s Board of Directors
determines that not doing so is in the best interests of the fund. Pursuant to Rule 2a-7, weekly liquid
assets include cash, U.S. Treasuries, other government securities with remaining maturities of 60 days
or less, or securities that mature or are subject to a demand feature within five business days.&lt;/p&gt;&lt;p style="font-size:9.0pt; font-family:Serif; text-align:left; font-weight:normal; text-decoration:none;"&gt;The
following paragraph is added under the heading &#x201c;Principal Investment Strategies&#x201d;:&lt;/p&gt;&lt;p style="font-size:9.0pt; font-family:Serif; text-align:left; font-weight:normal; margin-left:36.0pt; text-decoration:none;"&gt;The
fund may charge a liquidity fee of up to 2% of the value of shares redeemed if the fund&#x2019;s Board of
Directors determines that doing so is in the best interests of the fund (or the Board of Director&#x2019;s
delegate, in accordance with Board-approved guidelines).&lt;/p&gt;&lt;p style="font-size:9.0pt; font-family:Serif; text-align:left; font-weight:normal; text-decoration:none;"&gt;
The first two paragraphs under the heading &#x201c;Principal Risks&#x201d; are replaced with the following:&lt;/p&gt;&lt;p style="font-size:9.0pt; font-family:Serif; text-align:left; font-weight:normal; margin-left:36.0pt; text-decoration:none;"&gt;As
with any fund, there is no guarantee that the fund will achieve its objective(s). You could lose money
by investing in the fund. Although the fund seeks to preserve the value of your investment at $1.00 per
share, it cannot guarantee it will do so. The fund may impose a fee upon sale of your shares. An investment
in the fund is not a bank account and is not insured or guaranteed by the Federal Deposit Insurance Corporation
or any other government agency. T. Rowe Price Associates, Inc. is not required to reimburse the fund
for losses, and you should not expect that T. Rowe Price Associates, Inc. will provide financial support
to the fund at any time, including during periods of market stress.&lt;/p&gt;&lt;p style="font-size:9.0pt; font-family:Serif; text-align:left; font-weight:normal; margin-left:36.0pt; text-decoration:none;"&gt;Some money market funds
have experienced significant pressures from shareholder redemptions, issuer credit downgrades, illiquid
markets, and historically low yields on the securities they can hold. There have been a very small number
of money market funds in other fund companies that have &#x201c;broken the buck,&#x201d; which means that those
funds&#x2019; investors did not receive $1.00 per share for their investment in those funds. The potential
for realizing a loss of principal in the fund could derive from:&lt;/p&gt;&lt;p style="font-size:9.0pt; font-family:Serif; text-align:left; font-weight:normal; text-decoration:none;"&gt;Under the heading &#x201c;Principal Risks,&#x201d;
the last sentence in the paragraph entitled &#x201c;Liquidity&#x201d; is replaced with the following:&lt;/p&gt;&lt;p style="font-size:9.0pt; font-family:Serif; text-align:left; font-weight:normal; margin-left:36.0pt; text-decoration:none;"&gt;In
addition, the fund&#x2019;s Board of Directors has discretion to impose a liquidity fee if it determines that
doing so is in the best interests of the fund (or the Board of Director&#x2019;s delegate, in accordance with
Board-approved guidelines).&lt;/p&gt;&lt;p style="font-size:9.0pt; font-family:Serif; text-align:left; font-weight:normal; text-decoration:none;"&gt;Under the heading &#x201c;Principal Risks,&#x201d; the last sentence in the paragraph entitled
&#x201c;Redemptions&#x201d; is removed entirely.&lt;/p&gt;&lt;p style="font-size:11.0pt; font-family:Serif; text-align:left; font-weight:bold; font-style:normal;"&gt;&lt;span style="font-size:11.0pt; font-family:Serif; font-style:normal; font-weight:bold; text-decoration:none;"&gt;Changes Applicable to Section 2&lt;/span&gt;&lt;span style="font-size:12.0pt; font-family:Serif; font-style:normal; font-weight:normal; text-decoration:none;"&gt; &lt;/span&gt;&lt;span style="font-size:11.0pt; font-family:Serif; font-style:normal; font-weight:bold; text-decoration:none;"&gt;of each Fund&#x2019;s Prospectus:
&lt;/span&gt;&lt;/p&gt;&lt;p style="font-size:9.0pt; font-family:Serif; text-align:left; font-weight:normal; text-decoration:none;"&gt;The
section entitled &#x201c;Liquidity Fees and Redemption Gates&#x201d; is replaced with the following:&lt;/p&gt;&lt;p style="font-size:11.0pt; font-family:Serif; text-align:left; font-weight:bold; margin-left:36.0pt; text-decoration:none;"&gt;Liquidity
Fees&lt;/p&gt;&lt;p style="font-size:9.0pt; font-family:Serif; text-align:left; font-weight:normal; margin-left:36.0pt; text-decoration:none;"&gt;The fund&#x2019;s Board may impose a discretionary liquidity fee of up to 2% of the
value of the shares redeemed if the fund&#x2019;s Board determines that doing so is in the fund&#x2019;s best interests
(or the Board&#x2019;s delegate, in accordance with Board-approved guidelines). The Board&#x2019;s determination
will be based on current market conditions and the specific circumstances of the fund.&lt;/p&gt;&lt;p style="font-size:9.0pt; font-family:Serif; text-align:left; font-weight:normal; margin-left:36.0pt; text-decoration:none;"&gt;Liquidity
fees will be paid to the fund and are designed to allow funds to mitigate heavy redemptions by allocating
liquidity costs to those shareholders who impose such costs on the fund through their redemptions. &lt;/p&gt;&lt;p style="font-size:9.0pt; font-family:Serif; text-align:left; font-weight:normal; margin-left:36.0pt; text-decoration:none;"&gt;Once
imposed, a liquidity fee must be applied to all shares redeemed (whether the shares are held directly
with T. Rowe Price, through a retirement plan, or indirectly through an intermediary (such as a broker,
bank, or investment adviser) or other third party) and must remain in effect until the fund&#x2019;s Board
(or its delegate) determines that imposing a liquidity fee is no longer in the best interests of the
fund.&lt;/p&gt;&lt;p style="font-size:9.0pt; font-family:Serif; text-align:left; font-weight:normal; margin-left:36.0pt; text-decoration:none;"&gt;If you write a check on the fund and the check is presented for payment to the
fund&#x2019;s transfer agent while a liquidity fee is in effect, the applicable liquidity fee will be redeemed
from your account and the face value of the check will then be paid to the payee, assuming there are
sufficient funds available in your account after the liquidity fee is redeemed and the check is otherwise
in correct form.&lt;/p&gt;&lt;p style="font-size:9.0pt; font-family:Serif; text-align:left; font-weight:normal; text-decoration:none;"&gt;Under the heading &#x201c;Principal Risks,&#x201d; the last sentence in the subsection entitled
&#x201c;Redemptions&#x201d; is removed entirely.&lt;/p&gt;&lt;p style="font-size:9.0pt; font-family:Serif; text-align:left; font-weight:normal; text-decoration:none;"&gt;Under the heading &#x201c;Principal Risks,&#x201d; the last sentence
in the subsection entitled &#x201c;Liquidity&#x201d; is replaced with the following:&lt;/p&gt;&lt;p style="font-size:9.0pt; font-family:Serif; text-align:left; font-weight:normal; margin-left:36.0pt; text-decoration:none;"&gt;The
fund is subject to the risk that a liquidity fee of up to 2% of the value of shares redeemed may be imposed
if the fund&#x2019;s Board determines that imposing a fee is in the fund&#x2019;s best interests (or the Board&#x2019;s
delegate, in accordance with Board-approved guidelines).&lt;/p&gt;&lt;p style="font-size:11.0pt; font-family:Serif; text-align:left; font-weight:bold; font-style:normal;"&gt;&lt;span style="font-size:11.0pt; font-family:Serif; font-style:normal; font-weight:bold; text-decoration:none;"&gt;Changes Applicable to Section 3&lt;/span&gt;&lt;span style="font-size:12.0pt; font-family:Serif; font-style:normal; font-weight:normal; text-decoration:none;"&gt;
&lt;/span&gt;&lt;span style="font-size:11.0pt; font-family:Serif; font-style:normal; font-weight:bold; text-decoration:none;"&gt;of
each Fund&#x2019;s Prospectus: &lt;/span&gt;&lt;/p&gt;&lt;p style="font-size:9.0pt; font-family:Serif; text-align:left; font-weight:normal; text-decoration:none;"&gt;The section entitled &#x201c;Liquidity Fees and Redemption Gates&#x2014;Retail Money Market
Funds&#x201d; is removed in its entirety, including the disclosure that appears adjacent to the sub-heading
&#x201c;Omnibus Accounts.&#x201d;&lt;/p&gt;&lt;p style="font-size:9.0pt; font-family:Serif; text-align:left; font-weight:normal; text-decoration:none;"&gt;The last paragraph under the heading &#x201c;Delays in sending redemption proceeds&#x201d;
is replaced with the following: &lt;/p&gt;&lt;p style="font-size:9.0pt; font-family:Serif; text-align:left; font-weight:normal; margin-left:36.0pt; text-decoration:none;"&gt;Under certain limited circumstances, the Board of a money
market fund may elect to permanently suspend redemptions in order to facilitate an orderly liquidation
of the fund (subject to any additional liquidation requirements).&lt;/p&gt;</rr:SupplementToProspectusTextBlock>
    <rr:ProspectusDate contextRef="Context">2023-10-02</rr:ProspectusDate>
    <dei:DocumentType contextRef="Context">497</dei:DocumentType>
    <dei:DocumentPeriodEndDate contextRef="Context">2023-02-28</dei:DocumentPeriodEndDate>
    <dei:EntityCentralIndexKey contextRef="Context">0000795384</dei:EntityCentralIndexKey>
    <dei:AmendmentFlag contextRef="Context">false</dei:AmendmentFlag>
    <dei:DocumentCreationDate contextRef="Context">2023-10-02</dei:DocumentCreationDate>
    <dei:DocumentEffectiveDate contextRef="Context">2023-10-02</dei:DocumentEffectiveDate>
    <dei:EntityInvCompanyType contextRef="Context">N-1A</dei:EntityInvCompanyType>
    <dei:EntityRegistrantName contextRef="Context">T. Rowe Price State Tax-Free Funds, Inc.</dei:EntityRegistrantName>
</xbrl>
