<?xml version="1.0" encoding="utf-8"?>
<xbrl
  xmlns="http://www.xbrl.org/2003/instance"
  xmlns:dei="http://xbrl.sec.gov/dei/2026"
  xmlns:ffd="http://xbrl.sec.gov/ffd/2026"
  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"
  xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance">
    <link:schemaRef
      xlink:href="https://xbrl.sec.gov/ffd/2026/ffd-2026.xsd"
      xlink:type="simple"/>
    <context id="AsOf2026-06-02">
        <entity>
            <identifier scheme="http://www.sec.gov/CIK">0000897419</identifier>
        </entity>
        <period>
            <startDate>2026-06-02</startDate>
            <endDate>2026-06-02</endDate>
        </period>
    </context>
    <context id="From2026-06-022026-06-02_1">
        <entity>
            <identifier scheme="http://www.sec.gov/CIK">0000897419</identifier>
            <segment>
                <xbrldi:typedMember dimension="ffd:OfferingAxis">
                    <dei:lineNo>1</dei:lineNo>
                </xbrldi:typedMember>
            </segment>
        </entity>
        <period>
            <startDate>2026-06-02</startDate>
            <endDate>2026-06-02</endDate>
        </period>
    </context>
    <context id="From2026-06-022026-06-02_2">
        <entity>
            <identifier scheme="http://www.sec.gov/CIK">0000897419</identifier>
            <segment>
                <xbrldi:typedMember dimension="ffd:OfferingAxis">
                    <dei:lineNo>2</dei:lineNo>
                </xbrldi:typedMember>
            </segment>
        </entity>
        <period>
            <startDate>2026-06-02</startDate>
            <endDate>2026-06-02</endDate>
        </period>
    </context>
    <unit id="USD">
        <measure>iso4217:USD</measure>
    </unit>
    <unit id="Shares">
        <measure>shares</measure>
    </unit>
    <unit id="USDPShares">
        <divide>
            <unitNumerator>
                <measure>iso4217:USD</measure>
            </unitNumerator>
            <unitDenominator>
                <measure>shares</measure>
            </unitDenominator>
        </divide>
    </unit>
    <unit id="Ratio">
        <measure>pure</measure>
    </unit>
    <dei:EntityCentralIndexKey contextRef="AsOf2026-06-02" id="Fact000003">0000897419</dei:EntityCentralIndexKey>
    <ffd:FeeExhibitTp contextRef="AsOf2026-06-02" id="xdx2ixbrl0009">EX-FILING FEES</ffd:FeeExhibitTp>
    <ffd:SubmissnTp contextRef="AsOf2026-06-02" id="xdx2ixbrl0011">N-2/A</ffd:SubmissnTp>
    <ffd:OfferingTableNa
      contextRef="AsOf2026-06-02"
      id="xdx2ixbrl0037"
      xsi:nil="true"/>
    <ffd:FormTp contextRef="AsOf2026-06-02" id="Fact000010">N-2</ffd:FormTp>
    <dei:EntityRegistrantName contextRef="AsOf2026-06-02" id="Fact000012">Nuveen Massachusetts Quality Municipal Income Fund</dei:EntityRegistrantName>
    <ffd:PrevslyPdFlg contextRef="From2026-06-022026-06-02_1" id="Fact000013">false</ffd:PrevslyPdFlg>
    <ffd:OfferingSctyTp contextRef="From2026-06-022026-06-02_1" id="Fact000014">Equity</ffd:OfferingSctyTp>
    <ffd:OfferingSctyTitl contextRef="From2026-06-022026-06-02_1" id="Fact000015">Common Shares, $0.01 par value per share, and Preferred Shares</ffd:OfferingSctyTitl>
    <ffd:FeesOthrRuleFlg contextRef="From2026-06-022026-06-02_1" id="Fact000016">true</ffd:FeesOthrRuleFlg>
    <ffd:AmtSctiesRegd
      contextRef="From2026-06-022026-06-02_1"
      decimals="INF"
      id="Fact000017"
      unitRef="Shares">4317567</ffd:AmtSctiesRegd>
    <ffd:MaxOfferingPricPerScty
      contextRef="From2026-06-022026-06-02_1"
      decimals="INF"
      id="Fact000018"
      unitRef="USDPShares">12.66</ffd:MaxOfferingPricPerScty>
    <ffd:MaxAggtOfferingPric
      contextRef="From2026-06-022026-06-02_1"
      decimals="INF"
      id="Fact000019"
      unitRef="USD">54660398.22</ffd:MaxAggtOfferingPric>
    <ffd:FeeRate
      contextRef="From2026-06-022026-06-02_1"
      decimals="INF"
      id="Fact000020"
      unitRef="Ratio">0.00013810</ffd:FeeRate>
    <ffd:FeeAmt
      contextRef="From2026-06-022026-06-02_1"
      decimals="INF"
      id="Fact000021"
      unitRef="USD">7548.60</ffd:FeeAmt>
    <ffd:PrevslyPdFlg contextRef="From2026-06-022026-06-02_2" id="Fact000022">true</ffd:PrevslyPdFlg>
    <ffd:OfferingSctyTp contextRef="From2026-06-022026-06-02_2" id="Fact000023">Equity</ffd:OfferingSctyTp>
    <ffd:OfferingSctyTitl contextRef="From2026-06-022026-06-02_2" id="Fact000024">Common Shares, $0.01 par value per share, and Preferred Shares</ffd:OfferingSctyTitl>
    <ffd:FeesOthrRuleFlg contextRef="From2026-06-022026-06-02_2" id="Fact000025">true</ffd:FeesOthrRuleFlg>
    <ffd:AmtSctiesRegd
      contextRef="From2026-06-022026-06-02_2"
      decimals="INF"
      id="Fact000026"
      unitRef="Shares">82433</ffd:AmtSctiesRegd>
    <ffd:MaxOfferingPricPerScty
      contextRef="From2026-06-022026-06-02_2"
      decimals="INF"
      id="Fact000027"
      unitRef="USDPShares">12.21</ffd:MaxOfferingPricPerScty>
    <ffd:MaxAggtOfferingPric
      contextRef="From2026-06-022026-06-02_2"
      decimals="INF"
      id="Fact000028"
      unitRef="USD">1006506.93</ffd:MaxAggtOfferingPric>
    <ffd:FeeAmt
      contextRef="From2026-06-022026-06-02_2"
      decimals="INF"
      id="Fact000029"
      unitRef="USD">139.00</ffd:FeeAmt>
    <ffd:TtlOfferingAmt
      contextRef="AsOf2026-06-02"
      decimals="INF"
      id="Fact000030"
      unitRef="USD">55666905.15</ffd:TtlOfferingAmt>
    <ffd:TtlFeeAmt
      contextRef="AsOf2026-06-02"
      decimals="INF"
      id="Fact000031"
      unitRef="USD">7687.60</ffd:TtlFeeAmt>
    <ffd:TtlPrevslyPdAmt
      contextRef="AsOf2026-06-02"
      decimals="INF"
      id="Fact000032"
      unitRef="USD">139.00</ffd:TtlPrevslyPdAmt>
    <ffd:TtlOffsetAmt
      contextRef="AsOf2026-06-02"
      decimals="INF"
      id="Fact000033"
      unitRef="USD">0</ffd:TtlOffsetAmt>
    <ffd:NetFeeAmt
      contextRef="AsOf2026-06-02"
      decimals="INF"
      id="Fact000034"
      unitRef="USD">7548.60</ffd:NetFeeAmt>
    <ffd:OfferingNote contextRef="From2026-06-022026-06-02_1" id="Fact000035">The
                                                                                                                                                            Registrant is relying upon Rule 457(c) under the Securities Act of 1933 (&#x201c;Securities Act&#x201d;) to calculate the registration
                                                                                                                                                            fee. The maximum aggregate offering price is estimated solely for purposes of determining the registration fee based on the average
                                                                                                                                                            of the high and low sales prices of the shares of Common Shares, as reported by the New York Stock Exchange on May 27, 2026, in
                                                                                                                                                            accordance with Rule 457(c) under the Securities Act. The proposed maximum offering price per security will be determined from time
                                                                                                                                                            to time by the Registrant in connection with the sale by the Registrant of the securities registered under this Registration
                                                                                                                                                            Statement.</ffd:OfferingNote>
    <ffd:OfferingNote contextRef="From2026-06-022026-06-02_2" id="Fact000036">The Registrant previously paid $139.00 in filing fees in reliance on Rule 457(c) under the Securities Act in connection with the initial filing of this Registration Statement on April 9, 2026. The maximum aggregate offering price was estimated solely for purposes of determining the registration fee based on the average of the high and low sales prices of the shares of Common Shares, as reported by the New York Stock Exchange on April 2, 2026, in accordance with Rule 457(c) under the Securities Act.</ffd:OfferingNote>
    <ffd:OffsetTableNa contextRef="AsOf2026-06-02" id="Fact000038">N/A</ffd:OffsetTableNa>
    <ffd:CombinedProspectusTableNa contextRef="AsOf2026-06-02" id="Fact000039">N/A</ffd:CombinedProspectusTableNa>
    <ffd:RegnFileNb contextRef="AsOf2026-06-02" id="Fact000040">333-294954</ffd:RegnFileNb>
</xbrl>
