<?xml version="1.0" encoding="utf-8"?>
<xbrl
  xmlns="http://www.xbrl.org/2003/instance"
  xmlns:dei="http://xbrl.sec.gov/dei/2026"
  xmlns:fnd="http://xbrl.sec.gov/fnd/2026"
  xmlns:link="http://www.xbrl.org/2003/linkbase"
  xmlns:xlink="http://www.w3.org/1999/xlink">
    <link:schemaRef xlink:href="ft12987-20260625.xsd" xlink:type="simple"/>
    <context id="AsOf2026-06-25">
        <entity>
            <identifier scheme="http://www.sec.gov/CIK">0002119983</identifier>
        </entity>
        <period>
            <startDate>2026-06-25</startDate>
            <endDate>2026-06-25</endDate>
        </period>
    </context>
    <dei:AmendmentFlag contextRef="AsOf2026-06-25" id="Fact000003">false</dei:AmendmentFlag>
    <dei:EntityCentralIndexKey contextRef="AsOf2026-06-25" id="Fact000004">0002119983</dei:EntityCentralIndexKey>
    <dei:DocumentType contextRef="AsOf2026-06-25" id="Fact000010">S-6</dei:DocumentType>
    <dei:EntityRegistrantName contextRef="AsOf2026-06-25" id="Fact000011">FT 12987</dei:EntityRegistrantName>
    <dei:DocumentPeriodEndDate contextRef="AsOf2026-06-25" id="Fact000012">2026-06-25</dei:DocumentPeriodEndDate>
    <fnd:NmRule35d1TermDfnTextBlock contextRef="AsOf2026-06-25" id="Fact000013">

&lt;p style="font: bold 11pt/12pt Times New Roman, Times, Serif; margin: 2pt 0"&gt;Objective.&lt;/p&gt;

&lt;p style="font: 10pt/11pt Times New Roman, Times, Serif; margin: 2pt 0; text-indent: 0.25in"&gt;&lt;span style="letter-spacing: -0.05pt"&gt;The
Trust seeks to provide returns of approximately twice any positive price returns of shares of the Underlying ETF up to a predetermined
upside cap of 13.31% (before applicable sales charges and organization costs) while providing a buffer against the first 15% of Underlying
ETF losses (before applicable sales charges and organization costs) during the period from June 25, 2026 to September 16, 2027. Under
normal market conditions, the Trust will invest at least 80% of its net assets in investments that provide exposure to large capitalization
companies. The Trust is concentrated (i.e., invests 25% or more of Trust assets) in investments that provide exposure to the information
technology sector.&lt;/span&gt;&lt;/p&gt;

</fnd:NmRule35d1TermDfnTextBlock>
    <fnd:NmRule35d1TermSlctnCritTextBlock contextRef="AsOf2026-06-25" id="Fact000014">

&lt;p style="font: bold 11pt/12pt Times New Roman, Times, Serif; margin: 2pt 0"&gt;The Portfolio.&lt;/p&gt;

&lt;p style="font: 10pt/11pt Times New Roman, Times, Serif; margin: 2pt 0; text-indent: 0.25in"&gt;&lt;span style="letter-spacing: -0.05pt"&gt;The
Trust seeks to achieve its objective by investing in a portfolio consisting of purchased and written FLEX Options and cash to pay for
the annual operating expenses, creation and development fee and organization costs of the Trust. Because a portion of your investment
is held in cash to pay for these expenses, and the cap and buffer amounts are determined independent of the cash component, such expenses
will not further reduce the cap and buffer amounts disclosed in this prospectus. The FLEX Options are listed on the Chicago Board Options
Exchange (the &#x201c;CBOE&#x201d;) and are guaranteed by the Options Clearing Corporation (the &#x201c;OCC&#x201d;). The FLEX Options reference
shares of the Underlying ETF which had a share price on the NYSE of $732.94 (the &#x201c;Initial Underlying ETF Level&#x201d;) at the time
the FLEX Options were executed and entitle or obligate the holder to purchase or sell shares of the Underlying ETF at each FLEX Option&#x2019;s
strike price on September 16, 2027 (the &#x201c;FLEX Option Expiration Date&#x201d;). The FLEX Options are all European style options, which
means that they are exercisable at the strike price only on the FLEX Option Expiration Date. The FLEX Options are intended to be liquidated
on or prior to the FLEX Option Expiration Date, rather than be exercised, in order to avoid having the Trust receive shares of the Underlying
ETF or be obligated to deliver shares of the Underlying ETF.&lt;/span&gt;&lt;/p&gt;

&lt;p style="font: 10pt/11pt Times New Roman, Times, Serif; margin: 2pt 0; text-indent: 0.25in"&gt;&lt;span style="letter-spacing: -0.05pt"&gt;The
FLEX Options are intended to generate enhanced returns based on the price performance of the Underlying ETF. Please note that the Trust&#x2019;s
performance will not reflect the payment of dividends by the Underlying ETF. The Underlying ETF is an exchange-traded fund (&#x201c;ETF&#x201d;)
that seeks to track performance of the S&amp;amp;P 500&lt;sup&gt;&#xae;&lt;/sup&gt; Index (the &#x201c;Underlying Index&#x201d;). The Underlying Index is
composed of selected stocks from five hundred (500) issuers, all of which are listed on national stock exchanges and spans a broad range
of major industries. See &#x201c;The Underlying ETF and the Underlying Index&#x201d; on page 14. The Trust is designed for Unit holders
who intend to purchase Units at the Trust&#x2019;s inception, the only d&lt;/span&gt;ay Units are available for sale, and hold them until September
16, 2027&lt;span style="letter-spacing: -0.05pt"&gt;, the Trust&#x2019;s Mandatory Termination Date, and seeks a percentage total return per
Unit that increases by &lt;/span&gt;approximately twice &lt;span style="letter-spacing: -0.05pt"&gt;any percentage increase in the price of the Underlying
ETF relative to the Initial Underlying ETF Level up to a maximum total return of 13.31% (before applicable sales charges and organization
costs), 10.80% (after sales charges and organization costs for Units purchased through a traditional brokerage account) and 12.32% (after
sales charges and organization costs for Units purchased through a &#x201c;wrap fee&#x201d; account) (the &#x201c;Capped Return&#x201d;),
while also providing downside &#x201c;buffered&#x201d; protection of up to the first 15% of the decline in the Underlying ETF (before applicable
sales charges and organization costs) (&#x201c;Buffered Protection&#x201d;). Returns after application of the buffer will be reduced by
&#x2013;2.21% for Units purchased through a traditional brokerage account and &#x2013;0.86% for Units purchased through a &#x201c;wrap fee&#x201d;
account. See &#x201c;Fee Table&#x201d; in this prospectus for information regarding these fees and expenses.&lt;/span&gt;&lt;/p&gt;

&lt;p style="font: 10pt/11pt Times New Roman, Times, Serif; margin: 2pt 0; text-indent: 0.25in"&gt;&lt;span style="letter-spacing: -0.05pt"&gt;The
Capped Return and the Buffered Protection are based on the life of the Trust and are not an annualized rate of return. The percentage
increase or decrease of the Underlying ETF described above is the percentage increase or decrease of the Underlying ETF from when the
FLEX Option strike levels are set on the initial date of deposit to the close of the market on the FLEX Option Expiration Date. The Trust&#x2019;s
ability to achieve its investment objective of enhanced returns is dependent on Unit holders purchasing Units at a price equal to their
initial net asset value ($10 per Unit) and holding them until the Trust&#x2019;s Mandatory Termination Date. The price at which you will
be able to purchase Units will be based on their valuation at the Evaluation Time on the Initial Date of Deposit, which will be higher
than $10 per Unit (the Trust&#x2019;s net asset value per Unit on the Initial Date of Deposit) because of the Trust&#x2019;s sales charges
and organization costs, which will impact your potential returns.&lt;/span&gt;&lt;/p&gt;

&lt;p style="font: 10pt/11pt Times New Roman, Times, Serif; margin: 2pt 0; text-indent: 0.25in"&gt;&lt;span style="letter-spacing: -0.05pt"&gt;&lt;b&gt;The
Trust may not be able to achieve the hypothetical returns set forth in this prospectus. The Trust&#x2019;s performance may be impacted
by a variety of factors, including, but not limited to, redemption activity, a dilution of your investment, unusual economic events, market
movements and changes in the liquidity of the FLEX Options. Redemption activity could cause the Trust to recognize income that the Trust
is required to distribute to maintain the Trust&#x2019;s RIC status and avoid the excise tax. Selling Securities to make these distributions
may impact the Trust&#x2019;s performance. The Trust&#x2019;s portfolio is not managed. In the unlikely event that the FLEX Options cannot
maintain their proper ratios, there may be a significant impact to the Trust&#x2019;s ability to meet its investment objective or follow
its principal investment strategy.&lt;/b&gt;&lt;/span&gt;&lt;/p&gt;

</fnd:NmRule35d1TermSlctnCritTextBlock>
</xbrl>
