<?xml version='1.0' encoding='utf-8'?>
<FilingSummary>
  <Version>3.20.1</Version>
  <ProcessingTime/>
  <ReportFormat>html</ReportFormat>
  <ContextCount>333</ContextCount>
  <ElementCount>552</ElementCount>
  <EntityCount>1</EntityCount>
  <FootnotesReported>true</FootnotesReported>
  <SegmentCount>127</SegmentCount>
  <ScenarioCount>0</ScenarioCount>
  <TuplesReported>false</TuplesReported>
  <UnitCount>6</UnitCount>
  <MyReports>
    <Report instance="peix-20191231.xml">
      <IsDefault>false</IsDefault>
      <HasEmbeddedReports>false</HasEmbeddedReports>
      <HtmlFileName>R1.htm</HtmlFileName>
      <LongName>00000001 - Document - Document and Entity Information</LongName>
      <ReportType>Sheet</ReportType>
      <Role>http://pacificethanol.net/role/DocumentAndEntityInformation</Role>
      <ShortName>Document and Entity Information</ShortName>
      <MenuCategory>Cover</MenuCategory>
      <Position>1</Position>
    </Report>
    <Report instance="peix-20191231.xml">
      <IsDefault>false</IsDefault>
      <HasEmbeddedReports>false</HasEmbeddedReports>
      <HtmlFileName>R2.htm</HtmlFileName>
      <LongName>00000002 - Statement -  CONSOLIDATED BALANCE SHEETS</LongName>
      <ReportType>Sheet</ReportType>
      <Role>http://pacificethanol.net/role/ConsolidatedBalanceSheets</Role>
      <ShortName>CONSOLIDATED BALANCE SHEETS</ShortName>
      <MenuCategory>Statements</MenuCategory>
      <Position>2</Position>
    </Report>
    <Report instance="peix-20191231.xml">
      <IsDefault>false</IsDefault>
      <HasEmbeddedReports>false</HasEmbeddedReports>
      <HtmlFileName>R3.htm</HtmlFileName>
      <LongName>00000003 - Statement -  CONSOLIDATED BALANCE SHEETS (Parenthetical)</LongName>
      <ReportType>Sheet</ReportType>
      <Role>http://pacificethanol.net/role/ConsolidatedBalanceSheetsParenthetical</Role>
      <ShortName>CONSOLIDATED BALANCE SHEETS (Parenthetical)</ShortName>
      <MenuCategory>Statements</MenuCategory>
      <Position>3</Position>
    </Report>
    <Report instance="peix-20191231.xml">
      <IsDefault>false</IsDefault>
      <HasEmbeddedReports>false</HasEmbeddedReports>
      <HtmlFileName>R4.htm</HtmlFileName>
      <LongName>00000004 - Statement - CONSOLIDATED STATEMENTS OF OPERATIONS</LongName>
      <ReportType>Sheet</ReportType>
      <Role>http://pacificethanol.net/role/ConsolidatedStatementsOfOperations</Role>
      <ShortName>CONSOLIDATED STATEMENTS OF OPERATIONS</ShortName>
      <MenuCategory>Statements</MenuCategory>
      <Position>4</Position>
    </Report>
    <Report instance="peix-20191231.xml">
      <IsDefault>false</IsDefault>
      <HasEmbeddedReports>false</HasEmbeddedReports>
      <HtmlFileName>R5.htm</HtmlFileName>
      <LongName>00000005 - Statement - CONSOLIDATED STATEMENTS OF COMPREHENSIVE LOSS</LongName>
      <ReportType>Sheet</ReportType>
      <Role>http://pacificethanol.net/role/ConsolidatedStatementsOfComprehensiveLoss</Role>
      <ShortName>CONSOLIDATED STATEMENTS OF COMPREHENSIVE LOSS</ShortName>
      <MenuCategory>Statements</MenuCategory>
      <Position>5</Position>
    </Report>
    <Report instance="peix-20191231.xml">
      <IsDefault>false</IsDefault>
      <HasEmbeddedReports>false</HasEmbeddedReports>
      <HtmlFileName>R6.htm</HtmlFileName>
      <LongName>00000006 - Statement - CONSOLIDATED STATEMENTS OF STOCKHOLDERS' EQUITY</LongName>
      <ReportType>Sheet</ReportType>
      <Role>http://pacificethanol.net/role/ConsolidatedStatementsOfStockholdersEquity</Role>
      <ShortName>CONSOLIDATED STATEMENTS OF STOCKHOLDERS' EQUITY</ShortName>
      <MenuCategory>Statements</MenuCategory>
      <Position>6</Position>
    </Report>
    <Report instance="peix-20191231.xml">
      <IsDefault>false</IsDefault>
      <HasEmbeddedReports>false</HasEmbeddedReports>
      <HtmlFileName>R7.htm</HtmlFileName>
      <LongName>00000007 - Statement - CONSOLIDATED STATEMENTS OF CASH FLOWS</LongName>
      <ReportType>Sheet</ReportType>
      <Role>http://pacificethanol.net/role/ConsolidatedStatementsOfCashFlows</Role>
      <ShortName>CONSOLIDATED STATEMENTS OF CASH FLOWS</ShortName>
      <MenuCategory>Statements</MenuCategory>
      <Position>7</Position>
    </Report>
    <Report instance="peix-20191231.xml">
      <IsDefault>false</IsDefault>
      <HasEmbeddedReports>false</HasEmbeddedReports>
      <HtmlFileName>R8.htm</HtmlFileName>
      <LongName>00000008 - Disclosure - ORGANIZATION AND SIGNIFICANT ACCOUNTING POLICIES.</LongName>
      <ReportType>Sheet</ReportType>
      <Role>http://pacificethanol.net/role/OrganizationAndSignificantAccountingPolicies.</Role>
      <ShortName>ORGANIZATION AND SIGNIFICANT ACCOUNTING POLICIES.</ShortName>
      <MenuCategory>Notes</MenuCategory>
      <Position>8</Position>
    </Report>
    <Report instance="peix-20191231.xml">
      <IsDefault>false</IsDefault>
      <HasEmbeddedReports>false</HasEmbeddedReports>
      <HtmlFileName>R9.htm</HtmlFileName>
      <LongName>00000009 - Disclosure - PACIFIC ETHANOL PLANTS.</LongName>
      <ReportType>Sheet</ReportType>
      <Role>http://pacificethanol.net/role/PacificEthanolPlants.</Role>
      <ShortName>PACIFIC ETHANOL PLANTS.</ShortName>
      <MenuCategory>Notes</MenuCategory>
      <Position>9</Position>
    </Report>
    <Report instance="peix-20191231.xml">
      <IsDefault>false</IsDefault>
      <HasEmbeddedReports>false</HasEmbeddedReports>
      <HtmlFileName>R10.htm</HtmlFileName>
      <LongName>00000010 - Disclosure - INTERCOMPANY AGREEMENTS.</LongName>
      <ReportType>Sheet</ReportType>
      <Role>http://pacificethanol.net/role/IntercompanyAgreements.</Role>
      <ShortName>INTERCOMPANY AGREEMENTS.</ShortName>
      <MenuCategory>Notes</MenuCategory>
      <Position>10</Position>
    </Report>
    <Report instance="peix-20191231.xml">
      <IsDefault>false</IsDefault>
      <HasEmbeddedReports>false</HasEmbeddedReports>
      <HtmlFileName>R11.htm</HtmlFileName>
      <LongName>00000011 - Disclosure - SEGMENTS.</LongName>
      <ReportType>Sheet</ReportType>
      <Role>http://pacificethanol.net/role/Segments.</Role>
      <ShortName>SEGMENTS.</ShortName>
      <MenuCategory>Notes</MenuCategory>
      <Position>11</Position>
    </Report>
    <Report instance="peix-20191231.xml">
      <IsDefault>false</IsDefault>
      <HasEmbeddedReports>false</HasEmbeddedReports>
      <HtmlFileName>R12.htm</HtmlFileName>
      <LongName>00000012 - Disclosure - PROPERTY AND EQUIPMENT.</LongName>
      <ReportType>Sheet</ReportType>
      <Role>http://pacificethanol.net/role/PropertyAndEquipment.</Role>
      <ShortName>PROPERTY AND EQUIPMENT.</ShortName>
      <MenuCategory>Notes</MenuCategory>
      <Position>12</Position>
    </Report>
    <Report instance="peix-20191231.xml">
      <IsDefault>false</IsDefault>
      <HasEmbeddedReports>false</HasEmbeddedReports>
      <HtmlFileName>R13.htm</HtmlFileName>
      <LongName>00000013 - Disclosure - INTANGIBLE ASSET.</LongName>
      <ReportType>Sheet</ReportType>
      <Role>http://pacificethanol.net/role/IntangibleAsset.</Role>
      <ShortName>INTANGIBLE ASSET.</ShortName>
      <MenuCategory>Notes</MenuCategory>
      <Position>13</Position>
    </Report>
    <Report instance="peix-20191231.xml">
      <IsDefault>false</IsDefault>
      <HasEmbeddedReports>false</HasEmbeddedReports>
      <HtmlFileName>R14.htm</HtmlFileName>
      <LongName>00000014 - Disclosure - DERIVATIVES.</LongName>
      <ReportType>Sheet</ReportType>
      <Role>http://pacificethanol.net/role/Derivatives.</Role>
      <ShortName>DERIVATIVES.</ShortName>
      <MenuCategory>Notes</MenuCategory>
      <Position>14</Position>
    </Report>
    <Report instance="peix-20191231.xml">
      <IsDefault>false</IsDefault>
      <HasEmbeddedReports>false</HasEmbeddedReports>
      <HtmlFileName>R15.htm</HtmlFileName>
      <LongName>00000015 - Disclosure - DEBT.</LongName>
      <ReportType>Sheet</ReportType>
      <Role>http://pacificethanol.net/role/Debt.</Role>
      <ShortName>DEBT.</ShortName>
      <MenuCategory>Notes</MenuCategory>
      <Position>15</Position>
    </Report>
    <Report instance="peix-20191231.xml">
      <IsDefault>false</IsDefault>
      <HasEmbeddedReports>false</HasEmbeddedReports>
      <HtmlFileName>R16.htm</HtmlFileName>
      <LongName>00000016 - Disclosure - LEASES.</LongName>
      <ReportType>Sheet</ReportType>
      <Role>http://pacificethanol.net/role/Leases.</Role>
      <ShortName>LEASES.</ShortName>
      <MenuCategory>Notes</MenuCategory>
      <Position>16</Position>
    </Report>
    <Report instance="peix-20191231.xml">
      <IsDefault>false</IsDefault>
      <HasEmbeddedReports>false</HasEmbeddedReports>
      <HtmlFileName>R17.htm</HtmlFileName>
      <LongName>00000017 - Disclosure - PENSION PLANS.</LongName>
      <ReportType>Sheet</ReportType>
      <Role>http://pacificethanol.net/role/PensionPlans.</Role>
      <ShortName>PENSION PLANS.</ShortName>
      <MenuCategory>Notes</MenuCategory>
      <Position>17</Position>
    </Report>
    <Report instance="peix-20191231.xml">
      <IsDefault>false</IsDefault>
      <HasEmbeddedReports>false</HasEmbeddedReports>
      <HtmlFileName>R18.htm</HtmlFileName>
      <LongName>00000018 - Disclosure - INCOME TAXES.</LongName>
      <ReportType>Sheet</ReportType>
      <Role>http://pacificethanol.net/role/IncomeTaxes.</Role>
      <ShortName>INCOME TAXES.</ShortName>
      <MenuCategory>Notes</MenuCategory>
      <Position>18</Position>
    </Report>
    <Report instance="peix-20191231.xml">
      <IsDefault>false</IsDefault>
      <HasEmbeddedReports>false</HasEmbeddedReports>
      <HtmlFileName>R19.htm</HtmlFileName>
      <LongName>00000019 - Disclosure - PREFERRED STOCK.</LongName>
      <ReportType>Sheet</ReportType>
      <Role>http://pacificethanol.net/role/PreferredStock.</Role>
      <ShortName>PREFERRED STOCK.</ShortName>
      <MenuCategory>Notes</MenuCategory>
      <Position>19</Position>
    </Report>
    <Report instance="peix-20191231.xml">
      <IsDefault>false</IsDefault>
      <HasEmbeddedReports>false</HasEmbeddedReports>
      <HtmlFileName>R20.htm</HtmlFileName>
      <LongName>00000020 - Disclosure - COMMON STOCK AND WARRANTS.</LongName>
      <ReportType>Sheet</ReportType>
      <Role>http://pacificethanol.net/role/CommonStockAndWarrants.</Role>
      <ShortName>COMMON STOCK AND WARRANTS.</ShortName>
      <MenuCategory>Notes</MenuCategory>
      <Position>20</Position>
    </Report>
    <Report instance="peix-20191231.xml">
      <IsDefault>false</IsDefault>
      <HasEmbeddedReports>false</HasEmbeddedReports>
      <HtmlFileName>R21.htm</HtmlFileName>
      <LongName>00000021 - Disclosure - STOCK-BASED COMPENSATION.</LongName>
      <ReportType>Sheet</ReportType>
      <Role>http://pacificethanol.net/role/Stock-basedCompensation.</Role>
      <ShortName>STOCK-BASED COMPENSATION.</ShortName>
      <MenuCategory>Notes</MenuCategory>
      <Position>21</Position>
    </Report>
    <Report instance="peix-20191231.xml">
      <IsDefault>false</IsDefault>
      <HasEmbeddedReports>false</HasEmbeddedReports>
      <HtmlFileName>R22.htm</HtmlFileName>
      <LongName>00000022 - Disclosure - COMMITMENTS AND CONTINGENCIES.</LongName>
      <ReportType>Sheet</ReportType>
      <Role>http://pacificethanol.net/role/CommitmentsAndContingencies.</Role>
      <ShortName>COMMITMENTS AND CONTINGENCIES.</ShortName>
      <MenuCategory>Notes</MenuCategory>
      <Position>22</Position>
    </Report>
    <Report instance="peix-20191231.xml">
      <IsDefault>false</IsDefault>
      <HasEmbeddedReports>false</HasEmbeddedReports>
      <HtmlFileName>R23.htm</HtmlFileName>
      <LongName>00000023 - Disclosure - FAIR VALUE MEASUREMENTS.</LongName>
      <ReportType>Sheet</ReportType>
      <Role>http://pacificethanol.net/role/FairValueMeasurements.</Role>
      <ShortName>FAIR VALUE MEASUREMENTS.</ShortName>
      <MenuCategory>Notes</MenuCategory>
      <Position>23</Position>
    </Report>
    <Report instance="peix-20191231.xml">
      <IsDefault>false</IsDefault>
      <HasEmbeddedReports>false</HasEmbeddedReports>
      <HtmlFileName>R24.htm</HtmlFileName>
      <LongName>00000024 - Disclosure - PARENT COMPANY FINANCIALS.</LongName>
      <ReportType>Sheet</ReportType>
      <Role>http://pacificethanol.net/role/ParentCompanyFinancials.</Role>
      <ShortName>PARENT COMPANY FINANCIALS.</ShortName>
      <MenuCategory>Notes</MenuCategory>
      <Position>24</Position>
    </Report>
    <Report instance="peix-20191231.xml">
      <IsDefault>false</IsDefault>
      <HasEmbeddedReports>false</HasEmbeddedReports>
      <HtmlFileName>R25.htm</HtmlFileName>
      <LongName>00000025 - Disclosure - QUARTERLY FINANCIAL DATA (UNAUDITED).</LongName>
      <ReportType>Sheet</ReportType>
      <Role>http://pacificethanol.net/role/QuarterlyFinancialDataUnaudited.</Role>
      <ShortName>QUARTERLY FINANCIAL DATA (UNAUDITED).</ShortName>
      <MenuCategory>Notes</MenuCategory>
      <Position>25</Position>
    </Report>
    <Report instance="peix-20191231.xml">
      <IsDefault>false</IsDefault>
      <HasEmbeddedReports>false</HasEmbeddedReports>
      <HtmlFileName>R26.htm</HtmlFileName>
      <LongName>00000026 - Disclosure - SUBSEQUENT EVENT.</LongName>
      <ReportType>Sheet</ReportType>
      <Role>http://pacificethanol.net/role/SubsequentEvent.</Role>
      <ShortName>SUBSEQUENT EVENT.</ShortName>
      <MenuCategory>Notes</MenuCategory>
      <Position>26</Position>
    </Report>
    <Report instance="peix-20191231.xml">
      <IsDefault>false</IsDefault>
      <HasEmbeddedReports>false</HasEmbeddedReports>
      <HtmlFileName>R27.htm</HtmlFileName>
      <LongName>00000027 - Disclosure - ORGANIZATION AND SIGNIFICANT ACCOUNTING POLICIES. (Policies)</LongName>
      <ReportType>Sheet</ReportType>
      <Role>http://pacificethanol.net/role/OrganizationAndSignificantAccountingPolicies.Policies</Role>
      <ShortName>ORGANIZATION AND SIGNIFICANT ACCOUNTING POLICIES. (Policies)</ShortName>
      <MenuCategory>Policies</MenuCategory>
      <Position>27</Position>
    </Report>
    <Report instance="peix-20191231.xml">
      <IsDefault>false</IsDefault>
      <HasEmbeddedReports>false</HasEmbeddedReports>
      <HtmlFileName>R28.htm</HtmlFileName>
      <LongName>00000028 - Disclosure - ORGANIZATION AND SIGNIFICANT ACCOUNTING POLICIES. (Tables)</LongName>
      <ReportType>Sheet</ReportType>
      <Role>http://pacificethanol.net/role/OrganizationAndSignificantAccountingPolicies.Tables</Role>
      <ShortName>ORGANIZATION AND SIGNIFICANT ACCOUNTING POLICIES. (Tables)</ShortName>
      <MenuCategory>Tables</MenuCategory>
      <ParentRole>http://pacificethanol.net/role/OrganizationAndSignificantAccountingPolicies.</ParentRole>
      <Position>28</Position>
    </Report>
    <Report instance="peix-20191231.xml">
      <IsDefault>false</IsDefault>
      <HasEmbeddedReports>false</HasEmbeddedReports>
      <HtmlFileName>R29.htm</HtmlFileName>
      <LongName>00000029 - Disclosure - PACIFIC ETHANOL PLANTS. (Tables)</LongName>
      <ReportType>Sheet</ReportType>
      <Role>http://pacificethanol.net/role/PacificEthanolPlants.Tables</Role>
      <ShortName>PACIFIC ETHANOL PLANTS. (Tables)</ShortName>
      <MenuCategory>Tables</MenuCategory>
      <ParentRole>http://pacificethanol.net/role/PacificEthanolPlants.</ParentRole>
      <Position>29</Position>
    </Report>
    <Report instance="peix-20191231.xml">
      <IsDefault>false</IsDefault>
      <HasEmbeddedReports>false</HasEmbeddedReports>
      <HtmlFileName>R30.htm</HtmlFileName>
      <LongName>00000030 - Disclosure - SEGMENTS. (Tables)</LongName>
      <ReportType>Sheet</ReportType>
      <Role>http://pacificethanol.net/role/Segments.Tables</Role>
      <ShortName>SEGMENTS. (Tables)</ShortName>
      <MenuCategory>Tables</MenuCategory>
      <ParentRole>http://pacificethanol.net/role/Segments.</ParentRole>
      <Position>30</Position>
    </Report>
    <Report instance="peix-20191231.xml">
      <IsDefault>false</IsDefault>
      <HasEmbeddedReports>false</HasEmbeddedReports>
      <HtmlFileName>R31.htm</HtmlFileName>
      <LongName>00000031 - Disclosure - PROPERTY AND EQUIPMENT. (Tables)</LongName>
      <ReportType>Sheet</ReportType>
      <Role>http://pacificethanol.net/role/PropertyAndEquipment.Tables</Role>
      <ShortName>PROPERTY AND EQUIPMENT. (Tables)</ShortName>
      <MenuCategory>Tables</MenuCategory>
      <ParentRole>http://pacificethanol.net/role/PropertyAndEquipment.</ParentRole>
      <Position>31</Position>
    </Report>
    <Report instance="peix-20191231.xml">
      <IsDefault>false</IsDefault>
      <HasEmbeddedReports>false</HasEmbeddedReports>
      <HtmlFileName>R32.htm</HtmlFileName>
      <LongName>00000032 - Disclosure - DERIVATIVES. (Tables)</LongName>
      <ReportType>Sheet</ReportType>
      <Role>http://pacificethanol.net/role/Derivatives.Tables</Role>
      <ShortName>DERIVATIVES. (Tables)</ShortName>
      <MenuCategory>Tables</MenuCategory>
      <ParentRole>http://pacificethanol.net/role/Derivatives.</ParentRole>
      <Position>32</Position>
    </Report>
    <Report instance="peix-20191231.xml">
      <IsDefault>false</IsDefault>
      <HasEmbeddedReports>false</HasEmbeddedReports>
      <HtmlFileName>R33.htm</HtmlFileName>
      <LongName>00000033 - Disclosure - DEBT. (Tables)</LongName>
      <ReportType>Sheet</ReportType>
      <Role>http://pacificethanol.net/role/Debt.Tables</Role>
      <ShortName>DEBT. (Tables)</ShortName>
      <MenuCategory>Tables</MenuCategory>
      <ParentRole>http://pacificethanol.net/role/Debt.</ParentRole>
      <Position>33</Position>
    </Report>
    <Report instance="peix-20191231.xml">
      <IsDefault>false</IsDefault>
      <HasEmbeddedReports>false</HasEmbeddedReports>
      <HtmlFileName>R34.htm</HtmlFileName>
      <LongName>00000034 - Disclosure - LEASES. (Tables)</LongName>
      <ReportType>Sheet</ReportType>
      <Role>http://pacificethanol.net/role/Leases.Tables</Role>
      <ShortName>LEASES. (Tables)</ShortName>
      <MenuCategory>Tables</MenuCategory>
      <ParentRole>http://pacificethanol.net/role/Leases.</ParentRole>
      <Position>34</Position>
    </Report>
    <Report instance="peix-20191231.xml">
      <IsDefault>false</IsDefault>
      <HasEmbeddedReports>false</HasEmbeddedReports>
      <HtmlFileName>R35.htm</HtmlFileName>
      <LongName>00000035 - Disclosure - PENSION PLANS. (Tables)</LongName>
      <ReportType>Sheet</ReportType>
      <Role>http://pacificethanol.net/role/PensionPlans.Tables</Role>
      <ShortName>PENSION PLANS. (Tables)</ShortName>
      <MenuCategory>Tables</MenuCategory>
      <ParentRole>http://pacificethanol.net/role/PensionPlans.</ParentRole>
      <Position>35</Position>
    </Report>
    <Report instance="peix-20191231.xml">
      <IsDefault>false</IsDefault>
      <HasEmbeddedReports>false</HasEmbeddedReports>
      <HtmlFileName>R36.htm</HtmlFileName>
      <LongName>00000036 - Disclosure - INCOME TAXES. (Tables)</LongName>
      <ReportType>Sheet</ReportType>
      <Role>http://pacificethanol.net/role/IncomeTaxes.Tables</Role>
      <ShortName>INCOME TAXES. (Tables)</ShortName>
      <MenuCategory>Tables</MenuCategory>
      <ParentRole>http://pacificethanol.net/role/IncomeTaxes.</ParentRole>
      <Position>36</Position>
    </Report>
    <Report instance="peix-20191231.xml">
      <IsDefault>false</IsDefault>
      <HasEmbeddedReports>false</HasEmbeddedReports>
      <HtmlFileName>R37.htm</HtmlFileName>
      <LongName>00000037 - Disclosure - COMMON STOCK AND WARRANTS. (Tables)</LongName>
      <ReportType>Sheet</ReportType>
      <Role>http://pacificethanol.net/role/CommonStockAndWarrants.Tables</Role>
      <ShortName>COMMON STOCK AND WARRANTS. (Tables)</ShortName>
      <MenuCategory>Tables</MenuCategory>
      <ParentRole>http://pacificethanol.net/role/CommonStockAndWarrants.</ParentRole>
      <Position>37</Position>
    </Report>
    <Report instance="peix-20191231.xml">
      <IsDefault>false</IsDefault>
      <HasEmbeddedReports>false</HasEmbeddedReports>
      <HtmlFileName>R38.htm</HtmlFileName>
      <LongName>00000038 - Disclosure - STOCK-BASED COMPENSATION. (Tables)</LongName>
      <ReportType>Sheet</ReportType>
      <Role>http://pacificethanol.net/role/Stock-basedCompensation.Tables</Role>
      <ShortName>STOCK-BASED COMPENSATION. (Tables)</ShortName>
      <MenuCategory>Tables</MenuCategory>
      <ParentRole>http://pacificethanol.net/role/Stock-basedCompensation.</ParentRole>
      <Position>38</Position>
    </Report>
    <Report instance="peix-20191231.xml">
      <IsDefault>false</IsDefault>
      <HasEmbeddedReports>false</HasEmbeddedReports>
      <HtmlFileName>R39.htm</HtmlFileName>
      <LongName>00000039 - Disclosure - FAIR VALUE MEASUREMENTS. (Tables)</LongName>
      <ReportType>Sheet</ReportType>
      <Role>http://pacificethanol.net/role/FairValueMeasurements.Tables</Role>
      <ShortName>FAIR VALUE MEASUREMENTS. (Tables)</ShortName>
      <MenuCategory>Tables</MenuCategory>
      <ParentRole>http://pacificethanol.net/role/FairValueMeasurements.</ParentRole>
      <Position>39</Position>
    </Report>
    <Report instance="peix-20191231.xml">
      <IsDefault>false</IsDefault>
      <HasEmbeddedReports>false</HasEmbeddedReports>
      <HtmlFileName>R40.htm</HtmlFileName>
      <LongName>00000040 - Disclosure - PARENT COMPANY FINANCIALS. (Tables)</LongName>
      <ReportType>Sheet</ReportType>
      <Role>http://pacificethanol.net/role/ParentCompanyFinancials.Tables</Role>
      <ShortName>PARENT COMPANY FINANCIALS. (Tables)</ShortName>
      <MenuCategory>Tables</MenuCategory>
      <ParentRole>http://pacificethanol.net/role/ParentCompanyFinancials.</ParentRole>
      <Position>40</Position>
    </Report>
    <Report instance="peix-20191231.xml">
      <IsDefault>false</IsDefault>
      <HasEmbeddedReports>false</HasEmbeddedReports>
      <HtmlFileName>R41.htm</HtmlFileName>
      <LongName>00000041 - Disclosure - QUARTERLY FINANCIAL DATA (UNAUDITED). (Tables)</LongName>
      <ReportType>Sheet</ReportType>
      <Role>http://pacificethanol.net/role/QuarterlyFinancialDataUnaudited.Tables</Role>
      <ShortName>QUARTERLY FINANCIAL DATA (UNAUDITED). (Tables)</ShortName>
      <MenuCategory>Tables</MenuCategory>
      <ParentRole>http://pacificethanol.net/role/QuarterlyFinancialDataUnaudited.</ParentRole>
      <Position>41</Position>
    </Report>
    <Report instance="peix-20191231.xml">
      <IsDefault>false</IsDefault>
      <HasEmbeddedReports>false</HasEmbeddedReports>
      <HtmlFileName>R42.htm</HtmlFileName>
      <LongName>00000042 - Disclosure - ORGANIZATION AND SIGNIFICANT ACCOUNTING POLICIES. (Details)</LongName>
      <ReportType>Sheet</ReportType>
      <Role>http://pacificethanol.net/role/OrganizationAndSignificantAccountingPolicies.Details</Role>
      <ShortName>ORGANIZATION AND SIGNIFICANT ACCOUNTING POLICIES. (Details)</ShortName>
      <MenuCategory>Details</MenuCategory>
      <ParentRole>http://pacificethanol.net/role/OrganizationAndSignificantAccountingPolicies.Tables</ParentRole>
      <Position>42</Position>
    </Report>
    <Report instance="peix-20191231.xml">
      <IsDefault>false</IsDefault>
      <HasEmbeddedReports>false</HasEmbeddedReports>
      <HtmlFileName>R43.htm</HtmlFileName>
      <LongName>00000043 - Disclosure - ORGANIZATION AND SIGNIFICANT ACCOUNTING POLICIES. (Details 1)</LongName>
      <ReportType>Sheet</ReportType>
      <Role>http://pacificethanol.net/role/OrganizationAndSignificantAccountingPolicies.Details1</Role>
      <ShortName>ORGANIZATION AND SIGNIFICANT ACCOUNTING POLICIES. (Details 1)</ShortName>
      <MenuCategory>Details</MenuCategory>
      <ParentRole>http://pacificethanol.net/role/OrganizationAndSignificantAccountingPolicies.Tables</ParentRole>
      <Position>43</Position>
    </Report>
    <Report instance="peix-20191231.xml">
      <IsDefault>false</IsDefault>
      <HasEmbeddedReports>false</HasEmbeddedReports>
      <HtmlFileName>R44.htm</HtmlFileName>
      <LongName>00000044 - Disclosure - ORGANIZATION AND SIGNIFICANT ACCOUNTING POLICIES. (Details 2)</LongName>
      <ReportType>Sheet</ReportType>
      <Role>http://pacificethanol.net/role/OrganizationAndSignificantAccountingPolicies.Details2</Role>
      <ShortName>ORGANIZATION AND SIGNIFICANT ACCOUNTING POLICIES. (Details 2)</ShortName>
      <MenuCategory>Details</MenuCategory>
      <ParentRole>http://pacificethanol.net/role/OrganizationAndSignificantAccountingPolicies.Tables</ParentRole>
      <Position>44</Position>
    </Report>
    <Report instance="peix-20191231.xml">
      <IsDefault>false</IsDefault>
      <HasEmbeddedReports>false</HasEmbeddedReports>
      <HtmlFileName>R45.htm</HtmlFileName>
      <LongName>00000045 - Disclosure - ORGANIZATION AND SIGNIFICANT ACCOUNTING POLICIES. (Details 3)</LongName>
      <ReportType>Sheet</ReportType>
      <Role>http://pacificethanol.net/role/OrganizationAndSignificantAccountingPolicies.Details3</Role>
      <ShortName>ORGANIZATION AND SIGNIFICANT ACCOUNTING POLICIES. (Details 3)</ShortName>
      <MenuCategory>Details</MenuCategory>
      <ParentRole>http://pacificethanol.net/role/OrganizationAndSignificantAccountingPolicies.Tables</ParentRole>
      <Position>45</Position>
    </Report>
    <Report instance="peix-20191231.xml">
      <IsDefault>false</IsDefault>
      <HasEmbeddedReports>false</HasEmbeddedReports>
      <HtmlFileName>R46.htm</HtmlFileName>
      <LongName>00000046 - Disclosure - ORGANIZATION AND SIGNIFICANT ACCOUNTING POLICIES. (Details 4)</LongName>
      <ReportType>Sheet</ReportType>
      <Role>http://pacificethanol.net/role/OrganizationAndSignificantAccountingPolicies.Details4</Role>
      <ShortName>ORGANIZATION AND SIGNIFICANT ACCOUNTING POLICIES. (Details 4)</ShortName>
      <MenuCategory>Details</MenuCategory>
      <ParentRole>http://pacificethanol.net/role/OrganizationAndSignificantAccountingPolicies.Tables</ParentRole>
      <Position>46</Position>
    </Report>
    <Report instance="peix-20191231.xml">
      <IsDefault>false</IsDefault>
      <HasEmbeddedReports>false</HasEmbeddedReports>
      <HtmlFileName>R47.htm</HtmlFileName>
      <LongName>00000047 - Disclosure - ORGANIZATION AND SIGNIFICANT ACCOUNTING POLICIES. (Details Narrative)</LongName>
      <ReportType>Sheet</ReportType>
      <Role>http://pacificethanol.net/role/OrganizationAndSignificantAccountingPolicies.DetailsNarrative</Role>
      <ShortName>ORGANIZATION AND SIGNIFICANT ACCOUNTING POLICIES. (Details Narrative)</ShortName>
      <MenuCategory>Details</MenuCategory>
      <ParentRole>http://pacificethanol.net/role/OrganizationAndSignificantAccountingPolicies.Tables</ParentRole>
      <Position>47</Position>
    </Report>
    <Report instance="peix-20191231.xml">
      <IsDefault>false</IsDefault>
      <HasEmbeddedReports>false</HasEmbeddedReports>
      <HtmlFileName>R48.htm</HtmlFileName>
      <LongName>00000048 - Disclosure - PACIFIC ETHANOL PLANTS. (Details)</LongName>
      <ReportType>Sheet</ReportType>
      <Role>http://pacificethanol.net/role/PacificEthanolPlants.Details</Role>
      <ShortName>PACIFIC ETHANOL PLANTS. (Details)</ShortName>
      <MenuCategory>Details</MenuCategory>
      <ParentRole>http://pacificethanol.net/role/PacificEthanolPlants.Tables</ParentRole>
      <Position>48</Position>
    </Report>
    <Report instance="peix-20191231.xml">
      <IsDefault>false</IsDefault>
      <HasEmbeddedReports>false</HasEmbeddedReports>
      <HtmlFileName>R49.htm</HtmlFileName>
      <LongName>00000049 - Disclosure - PACIFIC ETHANOL PLANTS. (Details Narrative)</LongName>
      <ReportType>Sheet</ReportType>
      <Role>http://pacificethanol.net/role/PacificEthanolPlants.DetailsNarrative</Role>
      <ShortName>PACIFIC ETHANOL PLANTS. (Details Narrative)</ShortName>
      <MenuCategory>Details</MenuCategory>
      <ParentRole>http://pacificethanol.net/role/PacificEthanolPlants.Tables</ParentRole>
      <Position>49</Position>
    </Report>
    <Report instance="peix-20191231.xml">
      <IsDefault>false</IsDefault>
      <HasEmbeddedReports>false</HasEmbeddedReports>
      <HtmlFileName>R50.htm</HtmlFileName>
      <LongName>00000050 - Disclosure - INTERCOMPANY AGREEMENTS. (Details Narrative)</LongName>
      <ReportType>Sheet</ReportType>
      <Role>http://pacificethanol.net/role/IntercompanyAgreements.DetailsNarrative</Role>
      <ShortName>INTERCOMPANY AGREEMENTS. (Details Narrative)</ShortName>
      <MenuCategory>Details</MenuCategory>
      <ParentRole>http://pacificethanol.net/role/IntercompanyAgreements.</ParentRole>
      <Position>50</Position>
    </Report>
    <Report instance="peix-20191231.xml">
      <IsDefault>false</IsDefault>
      <HasEmbeddedReports>false</HasEmbeddedReports>
      <HtmlFileName>R51.htm</HtmlFileName>
      <LongName>00000051 - Disclosure - SEGMENTS. (Details)</LongName>
      <ReportType>Sheet</ReportType>
      <Role>http://pacificethanol.net/role/Segments.Details</Role>
      <ShortName>SEGMENTS. (Details)</ShortName>
      <MenuCategory>Details</MenuCategory>
      <ParentRole>http://pacificethanol.net/role/Segments.Tables</ParentRole>
      <Position>51</Position>
    </Report>
    <Report instance="peix-20191231.xml">
      <IsDefault>false</IsDefault>
      <HasEmbeddedReports>false</HasEmbeddedReports>
      <HtmlFileName>R52.htm</HtmlFileName>
      <LongName>00000052 - Disclosure - SEGMENTS. (Details 1)</LongName>
      <ReportType>Sheet</ReportType>
      <Role>http://pacificethanol.net/role/Segments.Details1</Role>
      <ShortName>SEGMENTS. (Details 1)</ShortName>
      <MenuCategory>Details</MenuCategory>
      <ParentRole>http://pacificethanol.net/role/Segments.Tables</ParentRole>
      <Position>52</Position>
    </Report>
    <Report instance="peix-20191231.xml">
      <IsDefault>false</IsDefault>
      <HasEmbeddedReports>false</HasEmbeddedReports>
      <HtmlFileName>R53.htm</HtmlFileName>
      <LongName>00000053 - Disclosure - SEGMENTS. (Details Narrative)</LongName>
      <ReportType>Sheet</ReportType>
      <Role>http://pacificethanol.net/role/Segments.DetailsNarrative</Role>
      <ShortName>SEGMENTS. (Details Narrative)</ShortName>
      <MenuCategory>Details</MenuCategory>
      <ParentRole>http://pacificethanol.net/role/Segments.Tables</ParentRole>
      <Position>53</Position>
    </Report>
    <Report instance="peix-20191231.xml">
      <IsDefault>false</IsDefault>
      <HasEmbeddedReports>false</HasEmbeddedReports>
      <HtmlFileName>R54.htm</HtmlFileName>
      <LongName>00000054 - Disclosure - PROPERTY AND EQUIPMENT. (Details)</LongName>
      <ReportType>Sheet</ReportType>
      <Role>http://pacificethanol.net/role/PropertyAndEquipment.Details</Role>
      <ShortName>PROPERTY AND EQUIPMENT. (Details)</ShortName>
      <MenuCategory>Details</MenuCategory>
      <ParentRole>http://pacificethanol.net/role/PropertyAndEquipment.Tables</ParentRole>
      <Position>54</Position>
    </Report>
    <Report instance="peix-20191231.xml">
      <IsDefault>false</IsDefault>
      <HasEmbeddedReports>false</HasEmbeddedReports>
      <HtmlFileName>R55.htm</HtmlFileName>
      <LongName>00000055 - Disclosure - PROPERTY AND EQUIPMENT. (Details Narrative)</LongName>
      <ReportType>Sheet</ReportType>
      <Role>http://pacificethanol.net/role/PropertyAndEquipment.DetailsNarrative</Role>
      <ShortName>PROPERTY AND EQUIPMENT. (Details Narrative)</ShortName>
      <MenuCategory>Details</MenuCategory>
      <ParentRole>http://pacificethanol.net/role/PropertyAndEquipment.Tables</ParentRole>
      <Position>55</Position>
    </Report>
    <Report instance="peix-20191231.xml">
      <IsDefault>false</IsDefault>
      <HasEmbeddedReports>false</HasEmbeddedReports>
      <HtmlFileName>R56.htm</HtmlFileName>
      <LongName>00000056 - Disclosure - INTANGIBLE ASSET. (Details Narrative)</LongName>
      <ReportType>Sheet</ReportType>
      <Role>http://pacificethanol.net/role/IntangibleAsset.DetailsNarrative</Role>
      <ShortName>INTANGIBLE ASSET. (Details Narrative)</ShortName>
      <MenuCategory>Details</MenuCategory>
      <ParentRole>http://pacificethanol.net/role/IntangibleAsset.</ParentRole>
      <Position>56</Position>
    </Report>
    <Report instance="peix-20191231.xml">
      <IsDefault>false</IsDefault>
      <HasEmbeddedReports>false</HasEmbeddedReports>
      <HtmlFileName>R57.htm</HtmlFileName>
      <LongName>00000057 - Disclosure - DERIVATIVES. (Details)</LongName>
      <ReportType>Sheet</ReportType>
      <Role>http://pacificethanol.net/role/Derivatives.Details</Role>
      <ShortName>DERIVATIVES. (Details)</ShortName>
      <MenuCategory>Details</MenuCategory>
      <ParentRole>http://pacificethanol.net/role/Derivatives.Tables</ParentRole>
      <Position>57</Position>
    </Report>
    <Report instance="peix-20191231.xml">
      <IsDefault>false</IsDefault>
      <HasEmbeddedReports>false</HasEmbeddedReports>
      <HtmlFileName>R58.htm</HtmlFileName>
      <LongName>00000058 - Disclosure - DERIVATIVES. (Details 1)</LongName>
      <ReportType>Sheet</ReportType>
      <Role>http://pacificethanol.net/role/Derivatives.Details1</Role>
      <ShortName>DERIVATIVES. (Details 1)</ShortName>
      <MenuCategory>Details</MenuCategory>
      <ParentRole>http://pacificethanol.net/role/Derivatives.Tables</ParentRole>
      <Position>58</Position>
    </Report>
    <Report instance="peix-20191231.xml">
      <IsDefault>false</IsDefault>
      <HasEmbeddedReports>false</HasEmbeddedReports>
      <HtmlFileName>R59.htm</HtmlFileName>
      <LongName>00000059 - Disclosure - DERIVATIVES. (Details Narrative)</LongName>
      <ReportType>Sheet</ReportType>
      <Role>http://pacificethanol.net/role/Derivatives.DetailsNarrative</Role>
      <ShortName>DERIVATIVES. (Details Narrative)</ShortName>
      <MenuCategory>Details</MenuCategory>
      <ParentRole>http://pacificethanol.net/role/Derivatives.Tables</ParentRole>
      <Position>59</Position>
    </Report>
    <Report instance="peix-20191231.xml">
      <IsDefault>false</IsDefault>
      <HasEmbeddedReports>false</HasEmbeddedReports>
      <HtmlFileName>R60.htm</HtmlFileName>
      <LongName>00000060 - Disclosure - DEBT. (Details)</LongName>
      <ReportType>Sheet</ReportType>
      <Role>http://pacificethanol.net/role/Debt.Details</Role>
      <ShortName>DEBT. (Details)</ShortName>
      <MenuCategory>Details</MenuCategory>
      <ParentRole>http://pacificethanol.net/role/Debt.Tables</ParentRole>
      <Position>60</Position>
    </Report>
    <Report instance="peix-20191231.xml">
      <IsDefault>false</IsDefault>
      <HasEmbeddedReports>false</HasEmbeddedReports>
      <HtmlFileName>R61.htm</HtmlFileName>
      <LongName>00000061 - Disclosure - DEBT. (Details 1)</LongName>
      <ReportType>Sheet</ReportType>
      <Role>http://pacificethanol.net/role/Debt.Details1</Role>
      <ShortName>DEBT. (Details 1)</ShortName>
      <MenuCategory>Details</MenuCategory>
      <ParentRole>http://pacificethanol.net/role/Debt.Tables</ParentRole>
      <Position>61</Position>
    </Report>
    <Report instance="peix-20191231.xml">
      <IsDefault>false</IsDefault>
      <HasEmbeddedReports>false</HasEmbeddedReports>
      <HtmlFileName>R62.htm</HtmlFileName>
      <LongName>00000062 - Disclosure - DEBT. (Details Narrative)</LongName>
      <ReportType>Sheet</ReportType>
      <Role>http://pacificethanol.net/role/Debt.DetailsNarrative</Role>
      <ShortName>DEBT. (Details Narrative)</ShortName>
      <MenuCategory>Details</MenuCategory>
      <ParentRole>http://pacificethanol.net/role/Debt.Tables</ParentRole>
      <Position>62</Position>
    </Report>
    <Report instance="peix-20191231.xml">
      <IsDefault>false</IsDefault>
      <HasEmbeddedReports>false</HasEmbeddedReports>
      <HtmlFileName>R63.htm</HtmlFileName>
      <LongName>00000063 - Disclosure - LEASES. (Details)</LongName>
      <ReportType>Sheet</ReportType>
      <Role>http://pacificethanol.net/role/Leases.Details</Role>
      <ShortName>LEASES. (Details)</ShortName>
      <MenuCategory>Details</MenuCategory>
      <ParentRole>http://pacificethanol.net/role/Leases.Tables</ParentRole>
      <Position>63</Position>
    </Report>
    <Report instance="peix-20191231.xml">
      <IsDefault>false</IsDefault>
      <HasEmbeddedReports>false</HasEmbeddedReports>
      <HtmlFileName>R64.htm</HtmlFileName>
      <LongName>00000064 - Disclosure - LEASES. (Details Narrative)</LongName>
      <ReportType>Sheet</ReportType>
      <Role>http://pacificethanol.net/role/Leases.DetailsNarrative</Role>
      <ShortName>LEASES. (Details Narrative)</ShortName>
      <MenuCategory>Details</MenuCategory>
      <ParentRole>http://pacificethanol.net/role/Leases.Tables</ParentRole>
      <Position>64</Position>
    </Report>
    <Report instance="peix-20191231.xml">
      <IsDefault>false</IsDefault>
      <HasEmbeddedReports>false</HasEmbeddedReports>
      <HtmlFileName>R65.htm</HtmlFileName>
      <LongName>00000065 - Disclosure -  PENSION PLANS. (Details)</LongName>
      <ReportType>Sheet</ReportType>
      <Role>http://pacificethanol.net/role/PensionPlans.Details</Role>
      <ShortName>PENSION PLANS. (Details)</ShortName>
      <MenuCategory>Details</MenuCategory>
      <ParentRole>http://pacificethanol.net/role/PensionPlans.Tables</ParentRole>
      <Position>65</Position>
    </Report>
    <Report instance="peix-20191231.xml">
      <IsDefault>false</IsDefault>
      <HasEmbeddedReports>false</HasEmbeddedReports>
      <HtmlFileName>R66.htm</HtmlFileName>
      <LongName>00000066 - Disclosure - PENSION PLANS. (Details 1)</LongName>
      <ReportType>Sheet</ReportType>
      <Role>http://pacificethanol.net/role/PensionPlans.Details1</Role>
      <ShortName>PENSION PLANS. (Details 1)</ShortName>
      <MenuCategory>Details</MenuCategory>
      <ParentRole>http://pacificethanol.net/role/PensionPlans.Tables</ParentRole>
      <Position>66</Position>
    </Report>
    <Report instance="peix-20191231.xml">
      <IsDefault>false</IsDefault>
      <HasEmbeddedReports>false</HasEmbeddedReports>
      <HtmlFileName>R67.htm</HtmlFileName>
      <LongName>00000067 - Disclosure - PENSION PLANS. (Details 2)</LongName>
      <ReportType>Sheet</ReportType>
      <Role>http://pacificethanol.net/role/PensionPlans.Details2</Role>
      <ShortName>PENSION PLANS. (Details 2)</ShortName>
      <MenuCategory>Details</MenuCategory>
      <ParentRole>http://pacificethanol.net/role/PensionPlans.Tables</ParentRole>
      <Position>67</Position>
    </Report>
    <Report instance="peix-20191231.xml">
      <IsDefault>false</IsDefault>
      <HasEmbeddedReports>false</HasEmbeddedReports>
      <HtmlFileName>R68.htm</HtmlFileName>
      <LongName>00000068 - Disclosure - PENSION PLANS. (Details 3)</LongName>
      <ReportType>Sheet</ReportType>
      <Role>http://pacificethanol.net/role/PensionPlans.Details3</Role>
      <ShortName>PENSION PLANS. (Details 3)</ShortName>
      <MenuCategory>Details</MenuCategory>
      <ParentRole>http://pacificethanol.net/role/PensionPlans.Tables</ParentRole>
      <Position>68</Position>
    </Report>
    <Report instance="peix-20191231.xml">
      <IsDefault>false</IsDefault>
      <HasEmbeddedReports>false</HasEmbeddedReports>
      <HtmlFileName>R69.htm</HtmlFileName>
      <LongName>00000069 - Disclosure - PENSION PLANS. (Details 4)</LongName>
      <ReportType>Sheet</ReportType>
      <Role>http://pacificethanol.net/role/PensionPlans.Details4</Role>
      <ShortName>PENSION PLANS. (Details 4)</ShortName>
      <MenuCategory>Details</MenuCategory>
      <ParentRole>http://pacificethanol.net/role/PensionPlans.Tables</ParentRole>
      <Position>69</Position>
    </Report>
    <Report instance="peix-20191231.xml">
      <IsDefault>false</IsDefault>
      <HasEmbeddedReports>false</HasEmbeddedReports>
      <HtmlFileName>R70.htm</HtmlFileName>
      <LongName>00000070 - Disclosure - PENSION PLANS. (Details Narrative)</LongName>
      <ReportType>Sheet</ReportType>
      <Role>http://pacificethanol.net/role/PensionPlans.DetailsNarrative</Role>
      <ShortName>PENSION PLANS. (Details Narrative)</ShortName>
      <MenuCategory>Details</MenuCategory>
      <ParentRole>http://pacificethanol.net/role/PensionPlans.Tables</ParentRole>
      <Position>70</Position>
    </Report>
    <Report instance="peix-20191231.xml">
      <IsDefault>false</IsDefault>
      <HasEmbeddedReports>false</HasEmbeddedReports>
      <HtmlFileName>R71.htm</HtmlFileName>
      <LongName>00000071 - Disclosure - INCOME TAXES. (Details)</LongName>
      <ReportType>Sheet</ReportType>
      <Role>http://pacificethanol.net/role/IncomeTaxes.Details</Role>
      <ShortName>INCOME TAXES. (Details)</ShortName>
      <MenuCategory>Details</MenuCategory>
      <ParentRole>http://pacificethanol.net/role/IncomeTaxes.Tables</ParentRole>
      <Position>71</Position>
    </Report>
    <Report instance="peix-20191231.xml">
      <IsDefault>false</IsDefault>
      <HasEmbeddedReports>false</HasEmbeddedReports>
      <HtmlFileName>R72.htm</HtmlFileName>
      <LongName>00000072 - Disclosure - INCOME TAXES. (Details 1)</LongName>
      <ReportType>Sheet</ReportType>
      <Role>http://pacificethanol.net/role/IncomeTaxes.Details1</Role>
      <ShortName>INCOME TAXES. (Details 1)</ShortName>
      <MenuCategory>Details</MenuCategory>
      <ParentRole>http://pacificethanol.net/role/IncomeTaxes.Tables</ParentRole>
      <Position>72</Position>
    </Report>
    <Report instance="peix-20191231.xml">
      <IsDefault>false</IsDefault>
      <HasEmbeddedReports>false</HasEmbeddedReports>
      <HtmlFileName>R73.htm</HtmlFileName>
      <LongName>00000073 - Disclosure - INCOME TAXES. (Details 2)</LongName>
      <ReportType>Sheet</ReportType>
      <Role>http://pacificethanol.net/role/IncomeTaxes.Details2</Role>
      <ShortName>INCOME TAXES. (Details 2)</ShortName>
      <MenuCategory>Details</MenuCategory>
      <ParentRole>http://pacificethanol.net/role/IncomeTaxes.Tables</ParentRole>
      <Position>73</Position>
    </Report>
    <Report instance="peix-20191231.xml">
      <IsDefault>false</IsDefault>
      <HasEmbeddedReports>false</HasEmbeddedReports>
      <HtmlFileName>R74.htm</HtmlFileName>
      <LongName>00000074 - Disclosure - INCOME TAXES. (Details 3)</LongName>
      <ReportType>Sheet</ReportType>
      <Role>http://pacificethanol.net/role/IncomeTaxes.Details3</Role>
      <ShortName>INCOME TAXES. (Details 3)</ShortName>
      <MenuCategory>Details</MenuCategory>
      <ParentRole>http://pacificethanol.net/role/IncomeTaxes.Tables</ParentRole>
      <Position>74</Position>
    </Report>
    <Report instance="peix-20191231.xml">
      <IsDefault>false</IsDefault>
      <HasEmbeddedReports>false</HasEmbeddedReports>
      <HtmlFileName>R75.htm</HtmlFileName>
      <LongName>00000075 - Disclosure - INCOME TAXES. (Details 4)</LongName>
      <ReportType>Sheet</ReportType>
      <Role>http://pacificethanol.net/role/IncomeTaxes.Details4</Role>
      <ShortName>INCOME TAXES. (Details 4)</ShortName>
      <MenuCategory>Details</MenuCategory>
      <ParentRole>http://pacificethanol.net/role/IncomeTaxes.Tables</ParentRole>
      <Position>75</Position>
    </Report>
    <Report instance="peix-20191231.xml">
      <IsDefault>false</IsDefault>
      <HasEmbeddedReports>false</HasEmbeddedReports>
      <HtmlFileName>R76.htm</HtmlFileName>
      <LongName>00000076 - Disclosure - INCOME TAXES. (Details 5)</LongName>
      <ReportType>Sheet</ReportType>
      <Role>http://pacificethanol.net/role/IncomeTaxes.Details5</Role>
      <ShortName>INCOME TAXES. (Details 5)</ShortName>
      <MenuCategory>Details</MenuCategory>
      <ParentRole>http://pacificethanol.net/role/IncomeTaxes.Tables</ParentRole>
      <Position>76</Position>
    </Report>
    <Report instance="peix-20191231.xml">
      <IsDefault>false</IsDefault>
      <HasEmbeddedReports>false</HasEmbeddedReports>
      <HtmlFileName>R77.htm</HtmlFileName>
      <LongName>00000077 - Disclosure - INCOME TAXES. (Details Narrative)</LongName>
      <ReportType>Sheet</ReportType>
      <Role>http://pacificethanol.net/role/IncomeTaxes.DetailsNarrative</Role>
      <ShortName>INCOME TAXES. (Details Narrative)</ShortName>
      <MenuCategory>Details</MenuCategory>
      <ParentRole>http://pacificethanol.net/role/IncomeTaxes.Tables</ParentRole>
      <Position>77</Position>
    </Report>
    <Report instance="peix-20191231.xml">
      <IsDefault>false</IsDefault>
      <HasEmbeddedReports>false</HasEmbeddedReports>
      <HtmlFileName>R78.htm</HtmlFileName>
      <LongName>00000078 - Disclosure - PREFERRED STOCK. (Details Narrative)</LongName>
      <ReportType>Sheet</ReportType>
      <Role>http://pacificethanol.net/role/PreferredStock.DetailsNarrative</Role>
      <ShortName>PREFERRED STOCK. (Details Narrative)</ShortName>
      <MenuCategory>Details</MenuCategory>
      <ParentRole>http://pacificethanol.net/role/PreferredStock.</ParentRole>
      <Position>78</Position>
    </Report>
    <Report instance="peix-20191231.xml">
      <IsDefault>false</IsDefault>
      <HasEmbeddedReports>false</HasEmbeddedReports>
      <HtmlFileName>R79.htm</HtmlFileName>
      <LongName>00000079 - Disclosure - COMMON STOCK AND WARRANTS. (Details)</LongName>
      <ReportType>Sheet</ReportType>
      <Role>http://pacificethanol.net/role/CommonStockAndWarrants.Details</Role>
      <ShortName>COMMON STOCK AND WARRANTS. (Details)</ShortName>
      <MenuCategory>Details</MenuCategory>
      <ParentRole>http://pacificethanol.net/role/CommonStockAndWarrants.Tables</ParentRole>
      <Position>79</Position>
    </Report>
    <Report instance="peix-20191231.xml">
      <IsDefault>false</IsDefault>
      <HasEmbeddedReports>false</HasEmbeddedReports>
      <HtmlFileName>R80.htm</HtmlFileName>
      <LongName>00000080 - Disclosure - COMMON STOCK AND WARRANTS. (Details Narrative)</LongName>
      <ReportType>Sheet</ReportType>
      <Role>http://pacificethanol.net/role/CommonStockAndWarrants.DetailsNarrative</Role>
      <ShortName>COMMON STOCK AND WARRANTS. (Details Narrative)</ShortName>
      <MenuCategory>Details</MenuCategory>
      <ParentRole>http://pacificethanol.net/role/CommonStockAndWarrants.Tables</ParentRole>
      <Position>80</Position>
    </Report>
    <Report instance="peix-20191231.xml">
      <IsDefault>false</IsDefault>
      <HasEmbeddedReports>false</HasEmbeddedReports>
      <HtmlFileName>R81.htm</HtmlFileName>
      <LongName>00000081 - Disclosure - STOCK-BASED COMPENSATION. (Details)</LongName>
      <ReportType>Sheet</ReportType>
      <Role>http://pacificethanol.net/role/Stock-basedCompensation.Details</Role>
      <ShortName>STOCK-BASED COMPENSATION. (Details)</ShortName>
      <MenuCategory>Details</MenuCategory>
      <ParentRole>http://pacificethanol.net/role/Stock-basedCompensation.Tables</ParentRole>
      <Position>81</Position>
    </Report>
    <Report instance="peix-20191231.xml">
      <IsDefault>false</IsDefault>
      <HasEmbeddedReports>false</HasEmbeddedReports>
      <HtmlFileName>R82.htm</HtmlFileName>
      <LongName>00000082 - Disclosure - STOCK-BASED COMPENSATION. (Details 1)</LongName>
      <ReportType>Sheet</ReportType>
      <Role>http://pacificethanol.net/role/Stock-basedCompensation.Details1</Role>
      <ShortName>STOCK-BASED COMPENSATION. (Details 1)</ShortName>
      <MenuCategory>Details</MenuCategory>
      <ParentRole>http://pacificethanol.net/role/Stock-basedCompensation.Tables</ParentRole>
      <Position>82</Position>
    </Report>
    <Report instance="peix-20191231.xml">
      <IsDefault>false</IsDefault>
      <HasEmbeddedReports>false</HasEmbeddedReports>
      <HtmlFileName>R83.htm</HtmlFileName>
      <LongName>00000083 - Disclosure - STOCK-BASED COMPENSATION. (Details 2)</LongName>
      <ReportType>Sheet</ReportType>
      <Role>http://pacificethanol.net/role/Stock-basedCompensation.Details2</Role>
      <ShortName>STOCK-BASED COMPENSATION. (Details 2)</ShortName>
      <MenuCategory>Details</MenuCategory>
      <ParentRole>http://pacificethanol.net/role/Stock-basedCompensation.Tables</ParentRole>
      <Position>83</Position>
    </Report>
    <Report instance="peix-20191231.xml">
      <IsDefault>false</IsDefault>
      <HasEmbeddedReports>false</HasEmbeddedReports>
      <HtmlFileName>R84.htm</HtmlFileName>
      <LongName>00000084 - Disclosure - STOCK-BASED COMPENSATION. (Details 3)</LongName>
      <ReportType>Sheet</ReportType>
      <Role>http://pacificethanol.net/role/Stock-basedCompensation.Details3</Role>
      <ShortName>STOCK-BASED COMPENSATION. (Details 3)</ShortName>
      <MenuCategory>Details</MenuCategory>
      <ParentRole>http://pacificethanol.net/role/Stock-basedCompensation.Tables</ParentRole>
      <Position>84</Position>
    </Report>
    <Report instance="peix-20191231.xml">
      <IsDefault>false</IsDefault>
      <HasEmbeddedReports>false</HasEmbeddedReports>
      <HtmlFileName>R85.htm</HtmlFileName>
      <LongName>00000085 - Disclosure - STOCK-BASED COMPENSATION. (Details Narrative)</LongName>
      <ReportType>Sheet</ReportType>
      <Role>http://pacificethanol.net/role/Stock-basedCompensation.DetailsNarrative</Role>
      <ShortName>STOCK-BASED COMPENSATION. (Details Narrative)</ShortName>
      <MenuCategory>Details</MenuCategory>
      <ParentRole>http://pacificethanol.net/role/Stock-basedCompensation.Tables</ParentRole>
      <Position>85</Position>
    </Report>
    <Report instance="peix-20191231.xml">
      <IsDefault>false</IsDefault>
      <HasEmbeddedReports>false</HasEmbeddedReports>
      <HtmlFileName>R86.htm</HtmlFileName>
      <LongName>00000086 - Disclosure - COMMITMENTS AND CONTINGENCIES. (Details Narrative)</LongName>
      <ReportType>Sheet</ReportType>
      <Role>http://pacificethanol.net/role/CommitmentsAndContingencies.DetailsNarrative</Role>
      <ShortName>COMMITMENTS AND CONTINGENCIES. (Details Narrative)</ShortName>
      <MenuCategory>Details</MenuCategory>
      <ParentRole>http://pacificethanol.net/role/CommitmentsAndContingencies.</ParentRole>
      <Position>86</Position>
    </Report>
    <Report instance="peix-20191231.xml">
      <IsDefault>false</IsDefault>
      <HasEmbeddedReports>false</HasEmbeddedReports>
      <HtmlFileName>R87.htm</HtmlFileName>
      <LongName>00000087 - Disclosure - FAIR VALUE MEASUREMENTS. (Details)</LongName>
      <ReportType>Sheet</ReportType>
      <Role>http://pacificethanol.net/role/FairValueMeasurements.Details</Role>
      <ShortName>FAIR VALUE MEASUREMENTS. (Details)</ShortName>
      <MenuCategory>Details</MenuCategory>
      <ParentRole>http://pacificethanol.net/role/FairValueMeasurements.Tables</ParentRole>
      <Position>87</Position>
    </Report>
    <Report instance="peix-20191231.xml">
      <IsDefault>false</IsDefault>
      <HasEmbeddedReports>false</HasEmbeddedReports>
      <HtmlFileName>R88.htm</HtmlFileName>
      <LongName>00000088 - Disclosure - FAIR VALUE MEASUREMENTS. (Details 1)</LongName>
      <ReportType>Sheet</ReportType>
      <Role>http://pacificethanol.net/role/FairValueMeasurements.Details1</Role>
      <ShortName>FAIR VALUE MEASUREMENTS. (Details 1)</ShortName>
      <MenuCategory>Details</MenuCategory>
      <ParentRole>http://pacificethanol.net/role/FairValueMeasurements.Tables</ParentRole>
      <Position>88</Position>
    </Report>
    <Report instance="peix-20191231.xml">
      <IsDefault>false</IsDefault>
      <HasEmbeddedReports>false</HasEmbeddedReports>
      <HtmlFileName>R89.htm</HtmlFileName>
      <LongName>00000089 - Disclosure - FAIR VALUE MEASUREMENTS. (Details Narrative)</LongName>
      <ReportType>Sheet</ReportType>
      <Role>http://pacificethanol.net/role/FairValueMeasurements.DetailsTextual</Role>
      <ShortName>FAIR VALUE MEASUREMENTS. (Details Narrative)</ShortName>
      <MenuCategory>Details</MenuCategory>
      <ParentRole>http://pacificethanol.net/role/FairValueMeasurements.Tables</ParentRole>
      <Position>89</Position>
    </Report>
    <Report instance="peix-20191231.xml">
      <IsDefault>false</IsDefault>
      <HasEmbeddedReports>false</HasEmbeddedReports>
      <HtmlFileName>R90.htm</HtmlFileName>
      <LongName>00000090 - Disclosure - PARENT COMPANY FINANCIALS. (Details)</LongName>
      <ReportType>Sheet</ReportType>
      <Role>http://pacificethanol.net/role/ParentCompanyFinancials.Details</Role>
      <ShortName>PARENT COMPANY FINANCIALS. (Details)</ShortName>
      <MenuCategory>Details</MenuCategory>
      <ParentRole>http://pacificethanol.net/role/ParentCompanyFinancials.Tables</ParentRole>
      <Position>90</Position>
    </Report>
    <Report instance="peix-20191231.xml">
      <IsDefault>false</IsDefault>
      <HasEmbeddedReports>false</HasEmbeddedReports>
      <HtmlFileName>R91.htm</HtmlFileName>
      <LongName>00000091 - Disclosure - PARENT COMPANY FINANCIALS. (Details 1)</LongName>
      <ReportType>Sheet</ReportType>
      <Role>http://pacificethanol.net/role/ParentCompanyFinancials.Details1</Role>
      <ShortName>PARENT COMPANY FINANCIALS. (Details 1)</ShortName>
      <MenuCategory>Details</MenuCategory>
      <ParentRole>http://pacificethanol.net/role/ParentCompanyFinancials.Tables</ParentRole>
      <Position>91</Position>
    </Report>
    <Report instance="peix-20191231.xml">
      <IsDefault>false</IsDefault>
      <HasEmbeddedReports>false</HasEmbeddedReports>
      <HtmlFileName>R92.htm</HtmlFileName>
      <LongName>00000092 - Disclosure - PARENT COMPANY FINANCIALS. (Details 2)</LongName>
      <ReportType>Sheet</ReportType>
      <Role>http://pacificethanol.net/role/ParentCompanyFinancials.Details2</Role>
      <ShortName>PARENT COMPANY FINANCIALS. (Details 2)</ShortName>
      <MenuCategory>Details</MenuCategory>
      <ParentRole>http://pacificethanol.net/role/ParentCompanyFinancials.Tables</ParentRole>
      <Position>92</Position>
    </Report>
    <Report instance="peix-20191231.xml">
      <IsDefault>false</IsDefault>
      <HasEmbeddedReports>false</HasEmbeddedReports>
      <HtmlFileName>R93.htm</HtmlFileName>
      <LongName>00000093 - Disclosure - PARENT COMPANY FINANCIALS. (Details Narrative)</LongName>
      <ReportType>Sheet</ReportType>
      <Role>http://pacificethanol.net/role/ParentCompanyFinancials.DetailsNarrative</Role>
      <ShortName>PARENT COMPANY FINANCIALS. (Details Narrative)</ShortName>
      <MenuCategory>Details</MenuCategory>
      <ParentRole>http://pacificethanol.net/role/ParentCompanyFinancials.Tables</ParentRole>
      <Position>93</Position>
    </Report>
    <Report instance="peix-20191231.xml">
      <IsDefault>false</IsDefault>
      <HasEmbeddedReports>false</HasEmbeddedReports>
      <HtmlFileName>R94.htm</HtmlFileName>
      <LongName>00000094 - Disclosure - QUARTERLY FINANCIAL DATA (UNAUDITED). (Details)</LongName>
      <ReportType>Sheet</ReportType>
      <Role>http://pacificethanol.net/role/QuarterlyFinancialDataUnaudited.Details</Role>
      <ShortName>QUARTERLY FINANCIAL DATA (UNAUDITED). (Details)</ShortName>
      <MenuCategory>Details</MenuCategory>
      <ParentRole>http://pacificethanol.net/role/QuarterlyFinancialDataUnaudited.Tables</ParentRole>
      <Position>94</Position>
    </Report>
    <Report>
      <IsDefault>false</IsDefault>
      <HasEmbeddedReports>false</HasEmbeddedReports>
      <LongName>All Reports</LongName>
      <ReportType>Book</ReportType>
      <ShortName>All Reports</ShortName>
    </Report>
  </MyReports>
  <InputFiles>
    <File>peix-20191231.xml</File>
    <File>peix-20191231.xsd</File>
    <File>peix-20191231_cal.xml</File>
    <File>peix-20191231_def.xml</File>
    <File>peix-20191231_lab.xml</File>
    <File>peix-20191231_pre.xml</File>
  </InputFiles>
  <SupplementalFiles/>
  <BaseTaxonomies>
    <BaseTaxonomy>http://xbrl.sec.gov/dei/2019-01-31</BaseTaxonomy>
    <BaseTaxonomy>http://fasb.org/srt/2019-01-31</BaseTaxonomy>
    <BaseTaxonomy>http://fasb.org/us-gaap/2019-01-31</BaseTaxonomy>
  </BaseTaxonomies>
  <HasPresentationLinkbase>true</HasPresentationLinkbase>
  <HasCalculationLinkbase>true</HasCalculationLinkbase>
</FilingSummary>
