<?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">
    <link:schemaRef
      xlink:href="https://xbrl.sec.gov/ffd/2026/ffd-2026.xsd"
      xlink:type="simple"/>
    <context id="c0">
        <entity>
            <identifier scheme="http://www.sec.gov/CIK">0000744187</identifier>
        </entity>
        <period>
            <startDate>2026-06-05</startDate>
            <endDate>2026-06-05</endDate>
        </period>
    </context>
    <context id="c1">
        <entity>
            <identifier scheme="http://www.sec.gov/CIK">0000744187</identifier>
            <segment>
                <xbrldi:typedMember dimension="ffd:OfferingAxis">
                    <dei:lineNo>1</dei:lineNo>
                </xbrldi:typedMember>
            </segment>
        </entity>
        <period>
            <startDate>2026-06-05</startDate>
            <endDate>2026-06-05</endDate>
        </period>
    </context>
    <unit id="shares">
        <measure>shares</measure>
    </unit>
    <unit id="usd">
        <measure>iso4217:USD</measure>
    </unit>
    <unit id="pure">
        <measure>pure</measure>
    </unit>
    <ffd:SubmissnTp contextRef="c0" id="ixv-235">S-8</ffd:SubmissnTp>
    <ffd:FormTp contextRef="c0" id="ixv-236">S-8</ffd:FormTp>
    <dei:EntityRegistrantName contextRef="c0" id="ixv-27">REX AMERICAN RESOURCES CORPORATION</dei:EntityRegistrantName>
    <ffd:OfferingSctyTp contextRef="c1" id="ixv-237">Equity</ffd:OfferingSctyTp>
    <ffd:OfferingSctyTitl contextRef="c1" id="ixv-238">Common Stock, par value $.01 per share</ffd:OfferingSctyTitl>
    <ffd:FeesOthrRuleFlg contextRef="c1" id="ix_0_fact">true</ffd:FeesOthrRuleFlg>
    <ffd:AmtSctiesRegd
      contextRef="c1"
      decimals="0"
      id="ix_2_fact"
      unitRef="shares">1500000</ffd:AmtSctiesRegd>
    <ffd:MaxOfferingPricPerScty
      contextRef="c1"
      decimals="2"
      id="ix_3_fact"
      unitRef="shares">48.71</ffd:MaxOfferingPricPerScty>
    <ffd:MaxAggtOfferingPric contextRef="c1" decimals="0" id="ix_1_fact" unitRef="usd">73065000</ffd:MaxAggtOfferingPric>
    <ffd:FeeRate contextRef="c1" decimals="8" id="ixv-243" unitRef="pure">0.0001381</ffd:FeeRate>
    <ffd:FeeAmt contextRef="c1" decimals="2" id="ixv-244" unitRef="usd">10090.28</ffd:FeeAmt>
    <ffd:TtlOfferingAmt contextRef="c0" decimals="0" id="ixv-245" unitRef="usd">73065000</ffd:TtlOfferingAmt>
    <ffd:TtlFeeAmt contextRef="c0" decimals="2" id="ixv-246" unitRef="usd">10090.28</ffd:TtlFeeAmt>
    <ffd:PrevslyPdFlg contextRef="c1" id="ixv-247">false</ffd:PrevslyPdFlg>
    <ffd:TtlOffsetAmt contextRef="c0" decimals="2" id="ixv-248" unitRef="usd">0</ffd:TtlOffsetAmt>
    <ffd:NetFeeAmt contextRef="c0" decimals="2" id="ixv-249" unitRef="usd">10090.28</ffd:NetFeeAmt>
    <ffd:OfferingNote contextRef="c1" id="ixv-106">&lt;table cellpadding="0" style="width: 100%; border-collapse: collapse; font: 8pt Times New Roman, Times, Serif; border-spacing: 0px;"&gt;
&lt;tr style="vertical-align: top"&gt; &lt;td style="width: 18pt"&gt;(1)&lt;/td&gt; &lt;td style="text-align: justify"&gt;Amount to be registered consists of 1,500,000 shares of Common Stock, par value $0.01 per share, of REX American Resources Corporation (the &#x201c;Company&#x201d;) which may be issued or sold pursuant to the REX American Resources Corporation 2026 Incentive Plan. Pursuant to Rule 416(a) under the Securities Act of 1933, as amended (the &#x201c;Securities Act&#x201d;), this registration statement also covers an indeterminate number of shares of Common Stock that may be offered or issued as a result of any adjustment to prevent dilution by reason of any stock dividend, stock split, recapitalization or other similar transaction.&lt;/td&gt;&lt;/tr&gt;
&lt;tr style="vertical-align: top"&gt; &lt;td&gt;&#160;&lt;/td&gt; &lt;td style="text-align: justify"&gt;&#160;&lt;/td&gt;&lt;/tr&gt;
&lt;tr style="vertical-align: top"&gt; &lt;td&gt;(2)&lt;/td&gt; &lt;td style="text-align: justify"&gt;Estimated in accordance with paragraphs (c) and (h) of Rule 457 under the Securities Act, solely for purposes of calculating the registration fee. The fee with respect to the shares registered herein is based on the average of the high and low sale prices of a share as reported on the New York Stock Exchange on June 1, 2026.&lt;/td&gt;&lt;/tr&gt;
&lt;/table&gt;</ffd:OfferingNote>
    <ffd:FeeExhibitTp contextRef="c0" id="hidden-fact-0">EX-FILING FEES</ffd:FeeExhibitTp>
    <dei:EntityCentralIndexKey contextRef="c0" id="ixv-255">0000744187</dei:EntityCentralIndexKey>
    <ffd:OffsetTableNa contextRef="c0" id="ixv-256">N/A</ffd:OffsetTableNa>
    <link:footnoteLink
      xlink:role="http://www.xbrl.org/2003/role/link"
      xlink:type="extended">
        <link:loc
          xlink:href="#ix_0_fact"
          xlink:label="ix_0_fact"
          xlink:type="locator"/>
        <link:loc
          xlink:href="#ix_3_fact"
          xlink:label="ix_3_fact"
          xlink:type="locator"/>
        <link:loc
          xlink:href="#ix_1_fact"
          xlink:label="ix_1_fact"
          xlink:type="locator"/>
        <link:footnote id="ix_1_footnote" xlink:label="ix_1_footnote" xlink:role="http://www.xbrl.org/2003/role/footnote" xlink:type="resource" xml:lang="en-US">Estimated in accordance with paragraphs (c) and (h) of Rule 457 under the Securities Act, solely for purposes of calculating the registration fee. The fee with respect to the shares registered herein is based on the average of the high and low sale prices of a share as reported on the New York Stock Exchange on June 1, 2026.</link:footnote>
        <link:footnoteArc
          xlink:arcrole="http://www.xbrl.org/2003/arcrole/fact-footnote"
          xlink:from="ix_0_fact"
          xlink:to="ix_1_footnote"
          xlink:type="arc"/>
        <link:footnoteArc
          xlink:arcrole="http://www.xbrl.org/2003/arcrole/fact-footnote"
          xlink:from="ix_3_fact"
          xlink:to="ix_1_footnote"
          xlink:type="arc"/>
        <link:footnoteArc
          xlink:arcrole="http://www.xbrl.org/2003/arcrole/fact-footnote"
          xlink:from="ix_1_fact"
          xlink:to="ix_1_footnote"
          xlink:type="arc"/>
        <link:loc
          xlink:href="#ix_2_fact"
          xlink:label="ix_2_fact"
          xlink:type="locator"/>
        <link:footnote id="ix_0_footnote" xlink:label="ix_0_footnote" xlink:role="http://www.xbrl.org/2003/role/footnote" xlink:type="resource" xml:lang="en-US">Amount to be registered consists of 1,500,000 shares of Common Stock, par value $0.01 per share, of REX American Resources Corporation (the &#x201c;Company&#x201d;) which may be issued or sold pursuant to the REX American Resources Corporation 2026 Incentive Plan. Pursuant to Rule 416(a) under the Securities Act of 1933, as amended (the &#x201c;Securities Act&#x201d;), this registration statement also covers an indeterminate number of shares of Common Stock that may be offered or issued as a result of any adjustment to prevent dilution by reason of any stock dividend, stock split, recapitalization or other similar transaction.</link:footnote>
        <link:footnoteArc
          xlink:arcrole="http://www.xbrl.org/2003/arcrole/fact-footnote"
          xlink:from="ix_2_fact"
          xlink:to="ix_0_footnote"
          xlink:type="arc"/>
    </link:footnoteLink>
</xbrl>
