<?xml version='1.0' encoding='utf-8'?>
<FilingSummary>
  <Version>3.20.2</Version>
  <ProcessingTime/>
  <ReportFormat>html</ReportFormat>
  <ContextCount>258</ContextCount>
  <ElementCount>325</ElementCount>
  <EntityCount>1</EntityCount>
  <FootnotesReported>true</FootnotesReported>
  <SegmentCount>65</SegmentCount>
  <ScenarioCount>0</ScenarioCount>
  <TuplesReported>false</TuplesReported>
  <UnitCount>4</UnitCount>
  <MyReports>
    <Report instance="peix-20200930.xml">
      <IsDefault>false</IsDefault>
      <HasEmbeddedReports>false</HasEmbeddedReports>
      <HtmlFileName>R1.htm</HtmlFileName>
      <LongName>000 - 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-20200930.xml">
      <IsDefault>false</IsDefault>
      <HasEmbeddedReports>false</HasEmbeddedReports>
      <HtmlFileName>R2.htm</HtmlFileName>
      <LongName>001 - Statement - Consolidated Balance Sheets</LongName>
      <ReportType>Sheet</ReportType>
      <Role>http://pacificethanol.net/role/ConsolidatedBalanceSheet</Role>
      <ShortName>Consolidated Balance Sheets</ShortName>
      <MenuCategory>Statements</MenuCategory>
      <Position>2</Position>
    </Report>
    <Report instance="peix-20200930.xml">
      <IsDefault>false</IsDefault>
      <HasEmbeddedReports>false</HasEmbeddedReports>
      <HtmlFileName>R3.htm</HtmlFileName>
      <LongName>002 - Statement - Consolidated Balance Sheets (Parentheticals)</LongName>
      <ReportType>Sheet</ReportType>
      <Role>http://pacificethanol.net/role/ConsolidatedBalanceSheet_Parentheticals</Role>
      <ShortName>Consolidated Balance Sheets (Parentheticals)</ShortName>
      <MenuCategory>Statements</MenuCategory>
      <Position>3</Position>
    </Report>
    <Report instance="peix-20200930.xml">
      <IsDefault>false</IsDefault>
      <HasEmbeddedReports>false</HasEmbeddedReports>
      <HtmlFileName>R4.htm</HtmlFileName>
      <LongName>003 - Statement - Consolidated Statements of Operations (Unaudited)</LongName>
      <ReportType>Sheet</ReportType>
      <Role>http://pacificethanol.net/role/ConsolidatedIncomeStatement</Role>
      <ShortName>Consolidated Statements of Operations (Unaudited)</ShortName>
      <MenuCategory>Statements</MenuCategory>
      <Position>4</Position>
    </Report>
    <Report instance="peix-20200930.xml">
      <IsDefault>false</IsDefault>
      <HasEmbeddedReports>false</HasEmbeddedReports>
      <HtmlFileName>R5.htm</HtmlFileName>
      <LongName>004 - Statement - Consolidated Statements of Cash Flows (Unaudited)</LongName>
      <ReportType>Sheet</ReportType>
      <Role>http://pacificethanol.net/role/ConsolidatedCashFlow</Role>
      <ShortName>Consolidated Statements of Cash Flows (Unaudited)</ShortName>
      <MenuCategory>Statements</MenuCategory>
      <Position>5</Position>
    </Report>
    <Report instance="peix-20200930.xml">
      <IsDefault>false</IsDefault>
      <HasEmbeddedReports>false</HasEmbeddedReports>
      <HtmlFileName>R6.htm</HtmlFileName>
      <LongName>005 - Statement - Consolidated Statements of Stockholders' Equity (Unaudited)</LongName>
      <ReportType>Sheet</ReportType>
      <Role>http://pacificethanol.net/role/ShareholdersEquityType2or3</Role>
      <ShortName>Consolidated Statements of Stockholders' Equity (Unaudited)</ShortName>
      <MenuCategory>Statements</MenuCategory>
      <Position>6</Position>
    </Report>
    <Report instance="peix-20200930.xml">
      <IsDefault>false</IsDefault>
      <HasEmbeddedReports>false</HasEmbeddedReports>
      <HtmlFileName>R7.htm</HtmlFileName>
      <LongName>006 - Disclosure - Organization and Basis of Presentation.</LongName>
      <ReportType>Sheet</ReportType>
      <Role>http://pacificethanol.net/role/OrganizationandBasisofPresentation</Role>
      <ShortName>Organization and Basis of Presentation.</ShortName>
      <MenuCategory>Notes</MenuCategory>
      <Position>7</Position>
    </Report>
    <Report instance="peix-20200930.xml">
      <IsDefault>false</IsDefault>
      <HasEmbeddedReports>false</HasEmbeddedReports>
      <HtmlFileName>R8.htm</HtmlFileName>
      <LongName>007 - Disclosure - Asset Sales.</LongName>
      <ReportType>Sheet</ReportType>
      <Role>http://pacificethanol.net/role/AssetSales</Role>
      <ShortName>Asset Sales.</ShortName>
      <MenuCategory>Notes</MenuCategory>
      <Position>8</Position>
    </Report>
    <Report instance="peix-20200930.xml">
      <IsDefault>false</IsDefault>
      <HasEmbeddedReports>false</HasEmbeddedReports>
      <HtmlFileName>R9.htm</HtmlFileName>
      <LongName>008 - Disclosure - Segments.</LongName>
      <ReportType>Sheet</ReportType>
      <Role>http://pacificethanol.net/role/Segments</Role>
      <ShortName>Segments.</ShortName>
      <MenuCategory>Notes</MenuCategory>
      <Position>9</Position>
    </Report>
    <Report instance="peix-20200930.xml">
      <IsDefault>false</IsDefault>
      <HasEmbeddedReports>false</HasEmbeddedReports>
      <HtmlFileName>R10.htm</HtmlFileName>
      <LongName>009 - Disclosure - Inventories.</LongName>
      <ReportType>Sheet</ReportType>
      <Role>http://pacificethanol.net/role/Inventories</Role>
      <ShortName>Inventories.</ShortName>
      <MenuCategory>Notes</MenuCategory>
      <Position>10</Position>
    </Report>
    <Report instance="peix-20200930.xml">
      <IsDefault>false</IsDefault>
      <HasEmbeddedReports>false</HasEmbeddedReports>
      <HtmlFileName>R11.htm</HtmlFileName>
      <LongName>010 - Disclosure - Derivatives.</LongName>
      <ReportType>Sheet</ReportType>
      <Role>http://pacificethanol.net/role/Derivatives</Role>
      <ShortName>Derivatives.</ShortName>
      <MenuCategory>Notes</MenuCategory>
      <Position>11</Position>
    </Report>
    <Report instance="peix-20200930.xml">
      <IsDefault>false</IsDefault>
      <HasEmbeddedReports>false</HasEmbeddedReports>
      <HtmlFileName>R12.htm</HtmlFileName>
      <LongName>011 - Disclosure - Debt.</LongName>
      <ReportType>Sheet</ReportType>
      <Role>http://pacificethanol.net/role/Debt</Role>
      <ShortName>Debt.</ShortName>
      <MenuCategory>Notes</MenuCategory>
      <Position>12</Position>
    </Report>
    <Report instance="peix-20200930.xml">
      <IsDefault>false</IsDefault>
      <HasEmbeddedReports>false</HasEmbeddedReports>
      <HtmlFileName>R13.htm</HtmlFileName>
      <LongName>012 - Disclosure - Commitments and Contingencies.</LongName>
      <ReportType>Sheet</ReportType>
      <Role>http://pacificethanol.net/role/CommitmentsandContingencies</Role>
      <ShortName>Commitments and Contingencies.</ShortName>
      <MenuCategory>Notes</MenuCategory>
      <Position>13</Position>
    </Report>
    <Report instance="peix-20200930.xml">
      <IsDefault>false</IsDefault>
      <HasEmbeddedReports>false</HasEmbeddedReports>
      <HtmlFileName>R14.htm</HtmlFileName>
      <LongName>013 - Disclosure - Pension and Retirement Benefit Plans.</LongName>
      <ReportType>Sheet</ReportType>
      <Role>http://pacificethanol.net/role/PensionandRetirementBenefitPlans</Role>
      <ShortName>Pension and Retirement Benefit Plans.</ShortName>
      <MenuCategory>Notes</MenuCategory>
      <Position>14</Position>
    </Report>
    <Report instance="peix-20200930.xml">
      <IsDefault>false</IsDefault>
      <HasEmbeddedReports>false</HasEmbeddedReports>
      <HtmlFileName>R15.htm</HtmlFileName>
      <LongName>014 - Disclosure - Fair Value Measurements.</LongName>
      <ReportType>Sheet</ReportType>
      <Role>http://pacificethanol.net/role/FairValueMeasurements</Role>
      <ShortName>Fair Value Measurements.</ShortName>
      <MenuCategory>Notes</MenuCategory>
      <Position>15</Position>
    </Report>
    <Report instance="peix-20200930.xml">
      <IsDefault>false</IsDefault>
      <HasEmbeddedReports>false</HasEmbeddedReports>
      <HtmlFileName>R16.htm</HtmlFileName>
      <LongName>015 - Disclosure - Earnings Per Share.</LongName>
      <ReportType>Sheet</ReportType>
      <Role>http://pacificethanol.net/role/EarningsPerShare</Role>
      <ShortName>Earnings Per Share.</ShortName>
      <MenuCategory>Notes</MenuCategory>
      <Position>16</Position>
    </Report>
    <Report instance="peix-20200930.xml">
      <IsDefault>false</IsDefault>
      <HasEmbeddedReports>false</HasEmbeddedReports>
      <HtmlFileName>R17.htm</HtmlFileName>
      <LongName>016 - Disclosure - Parent Company Financials.</LongName>
      <ReportType>Sheet</ReportType>
      <Role>http://pacificethanol.net/role/ParentCompanyFinancials</Role>
      <ShortName>Parent Company Financials.</ShortName>
      <MenuCategory>Notes</MenuCategory>
      <Position>17</Position>
    </Report>
    <Report instance="peix-20200930.xml">
      <IsDefault>false</IsDefault>
      <HasEmbeddedReports>false</HasEmbeddedReports>
      <HtmlFileName>R18.htm</HtmlFileName>
      <LongName>017 - Disclosure - Accounting Policies, by Policy (Policies)</LongName>
      <ReportType>Sheet</ReportType>
      <Role>http://pacificethanol.net/role/AccountingPoliciesByPolicy</Role>
      <ShortName>Accounting Policies, by Policy (Policies)</ShortName>
      <MenuCategory>Policies</MenuCategory>
      <Position>18</Position>
    </Report>
    <Report instance="peix-20200930.xml">
      <IsDefault>false</IsDefault>
      <HasEmbeddedReports>false</HasEmbeddedReports>
      <HtmlFileName>R19.htm</HtmlFileName>
      <LongName>018 - Disclosure - Segments. (Tables)</LongName>
      <ReportType>Sheet</ReportType>
      <Role>http://pacificethanol.net/role/SegmentsTables</Role>
      <ShortName>Segments. (Tables)</ShortName>
      <MenuCategory>Tables</MenuCategory>
      <ParentRole>http://pacificethanol.net/role/Segments</ParentRole>
      <Position>19</Position>
    </Report>
    <Report instance="peix-20200930.xml">
      <IsDefault>false</IsDefault>
      <HasEmbeddedReports>false</HasEmbeddedReports>
      <HtmlFileName>R20.htm</HtmlFileName>
      <LongName>019 - Disclosure - Inventories. (Tables)</LongName>
      <ReportType>Sheet</ReportType>
      <Role>http://pacificethanol.net/role/InventoriesTables</Role>
      <ShortName>Inventories. (Tables)</ShortName>
      <MenuCategory>Tables</MenuCategory>
      <ParentRole>http://pacificethanol.net/role/Inventories</ParentRole>
      <Position>20</Position>
    </Report>
    <Report instance="peix-20200930.xml">
      <IsDefault>false</IsDefault>
      <HasEmbeddedReports>false</HasEmbeddedReports>
      <HtmlFileName>R21.htm</HtmlFileName>
      <LongName>020 - Disclosure - Derivatives. (Tables)</LongName>
      <ReportType>Sheet</ReportType>
      <Role>http://pacificethanol.net/role/DerivativesTables</Role>
      <ShortName>Derivatives. (Tables)</ShortName>
      <MenuCategory>Tables</MenuCategory>
      <ParentRole>http://pacificethanol.net/role/Derivatives</ParentRole>
      <Position>21</Position>
    </Report>
    <Report instance="peix-20200930.xml">
      <IsDefault>false</IsDefault>
      <HasEmbeddedReports>false</HasEmbeddedReports>
      <HtmlFileName>R22.htm</HtmlFileName>
      <LongName>021 - Disclosure - Debt. (Tables)</LongName>
      <ReportType>Sheet</ReportType>
      <Role>http://pacificethanol.net/role/DebtTables</Role>
      <ShortName>Debt. (Tables)</ShortName>
      <MenuCategory>Tables</MenuCategory>
      <ParentRole>http://pacificethanol.net/role/Debt</ParentRole>
      <Position>22</Position>
    </Report>
    <Report instance="peix-20200930.xml">
      <IsDefault>false</IsDefault>
      <HasEmbeddedReports>false</HasEmbeddedReports>
      <HtmlFileName>R23.htm</HtmlFileName>
      <LongName>022 - Disclosure - Fair Value Measurements. (Tables)</LongName>
      <ReportType>Sheet</ReportType>
      <Role>http://pacificethanol.net/role/FairValueMeasurementsTables</Role>
      <ShortName>Fair Value Measurements. (Tables)</ShortName>
      <MenuCategory>Tables</MenuCategory>
      <ParentRole>http://pacificethanol.net/role/FairValueMeasurements</ParentRole>
      <Position>23</Position>
    </Report>
    <Report instance="peix-20200930.xml">
      <IsDefault>false</IsDefault>
      <HasEmbeddedReports>false</HasEmbeddedReports>
      <HtmlFileName>R24.htm</HtmlFileName>
      <LongName>023 - Disclosure - Earnings Per Share. (Tables)</LongName>
      <ReportType>Sheet</ReportType>
      <Role>http://pacificethanol.net/role/EarningsPerShareTables</Role>
      <ShortName>Earnings Per Share. (Tables)</ShortName>
      <MenuCategory>Tables</MenuCategory>
      <ParentRole>http://pacificethanol.net/role/EarningsPerShare</ParentRole>
      <Position>24</Position>
    </Report>
    <Report instance="peix-20200930.xml">
      <IsDefault>false</IsDefault>
      <HasEmbeddedReports>false</HasEmbeddedReports>
      <HtmlFileName>R25.htm</HtmlFileName>
      <LongName>024 - Disclosure - Parent Company Financials. (Tables)</LongName>
      <ReportType>Sheet</ReportType>
      <Role>http://pacificethanol.net/role/ParentCompanyFinancialsTables</Role>
      <ShortName>Parent Company Financials. (Tables)</ShortName>
      <MenuCategory>Tables</MenuCategory>
      <ParentRole>http://pacificethanol.net/role/ParentCompanyFinancials</ParentRole>
      <Position>25</Position>
    </Report>
    <Report instance="peix-20200930.xml">
      <IsDefault>false</IsDefault>
      <HasEmbeddedReports>false</HasEmbeddedReports>
      <HtmlFileName>R26.htm</HtmlFileName>
      <LongName>025 - Disclosure - Organization and Basis of Presentation. (Details)</LongName>
      <ReportType>Sheet</ReportType>
      <Role>http://pacificethanol.net/role/OrganizationandBasisofPresentationDetails</Role>
      <ShortName>Organization and Basis of Presentation. (Details)</ShortName>
      <MenuCategory>Details</MenuCategory>
      <ParentRole>http://pacificethanol.net/role/OrganizationandBasisofPresentation</ParentRole>
      <Position>26</Position>
    </Report>
    <Report instance="peix-20200930.xml">
      <IsDefault>false</IsDefault>
      <HasEmbeddedReports>false</HasEmbeddedReports>
      <HtmlFileName>R27.htm</HtmlFileName>
      <LongName>026 - Disclosure - Asset Sales. (Details)</LongName>
      <ReportType>Sheet</ReportType>
      <Role>http://pacificethanol.net/role/AssetSalesDetails</Role>
      <ShortName>Asset Sales. (Details)</ShortName>
      <MenuCategory>Details</MenuCategory>
      <ParentRole>http://pacificethanol.net/role/AssetSales</ParentRole>
      <Position>27</Position>
    </Report>
    <Report instance="peix-20200930.xml">
      <IsDefault>false</IsDefault>
      <HasEmbeddedReports>false</HasEmbeddedReports>
      <HtmlFileName>R28.htm</HtmlFileName>
      <LongName>027 - Disclosure - Segments. (Details)</LongName>
      <ReportType>Sheet</ReportType>
      <Role>http://pacificethanol.net/role/SegmentsDetails</Role>
      <ShortName>Segments. (Details)</ShortName>
      <MenuCategory>Details</MenuCategory>
      <ParentRole>http://pacificethanol.net/role/SegmentsTables</ParentRole>
      <Position>28</Position>
    </Report>
    <Report instance="peix-20200930.xml">
      <IsDefault>false</IsDefault>
      <HasEmbeddedReports>false</HasEmbeddedReports>
      <HtmlFileName>R29.htm</HtmlFileName>
      <LongName>028 - Disclosure - Segments. (Details) - Schedule of financial data for operating segments</LongName>
      <ReportType>Sheet</ReportType>
      <Role>http://pacificethanol.net/role/ScheduleoffinancialdataforoperatingsegmentsTable</Role>
      <ShortName>Segments. (Details) - Schedule of financial data for operating segments</ShortName>
      <MenuCategory>Details</MenuCategory>
      <ParentRole>http://pacificethanol.net/role/SegmentsTables</ParentRole>
      <Position>29</Position>
    </Report>
    <Report instance="peix-20200930.xml">
      <IsDefault>false</IsDefault>
      <HasEmbeddedReports>false</HasEmbeddedReports>
      <HtmlFileName>R30.htm</HtmlFileName>
      <LongName>029 - Disclosure - Segments. (Details) - Schedule of assets by operating segments</LongName>
      <ReportType>Sheet</ReportType>
      <Role>http://pacificethanol.net/role/ScheduleofassetsbyoperatingsegmentsTable</Role>
      <ShortName>Segments. (Details) - Schedule of assets by operating segments</ShortName>
      <MenuCategory>Details</MenuCategory>
      <ParentRole>http://pacificethanol.net/role/SegmentsTables</ParentRole>
      <Position>30</Position>
    </Report>
    <Report instance="peix-20200930.xml">
      <IsDefault>false</IsDefault>
      <HasEmbeddedReports>false</HasEmbeddedReports>
      <HtmlFileName>R31.htm</HtmlFileName>
      <LongName>030 - Disclosure - Inventories. (Details)</LongName>
      <ReportType>Sheet</ReportType>
      <Role>http://pacificethanol.net/role/InventoriesDetails</Role>
      <ShortName>Inventories. (Details)</ShortName>
      <MenuCategory>Details</MenuCategory>
      <ParentRole>http://pacificethanol.net/role/InventoriesTables</ParentRole>
      <Position>31</Position>
    </Report>
    <Report instance="peix-20200930.xml">
      <IsDefault>false</IsDefault>
      <HasEmbeddedReports>false</HasEmbeddedReports>
      <HtmlFileName>R32.htm</HtmlFileName>
      <LongName>031 - Disclosure - Inventories. (Details) - Schedule of inventories</LongName>
      <ReportType>Sheet</ReportType>
      <Role>http://pacificethanol.net/role/ScheduleofinventoriesTable</Role>
      <ShortName>Inventories. (Details) - Schedule of inventories</ShortName>
      <MenuCategory>Details</MenuCategory>
      <ParentRole>http://pacificethanol.net/role/InventoriesTables</ParentRole>
      <Position>32</Position>
    </Report>
    <Report instance="peix-20200930.xml">
      <IsDefault>false</IsDefault>
      <HasEmbeddedReports>false</HasEmbeddedReports>
      <HtmlFileName>R33.htm</HtmlFileName>
      <LongName>032 - Disclosure - Derivatives. (Details)</LongName>
      <ReportType>Sheet</ReportType>
      <Role>http://pacificethanol.net/role/DerivativesDetails</Role>
      <ShortName>Derivatives. (Details)</ShortName>
      <MenuCategory>Details</MenuCategory>
      <ParentRole>http://pacificethanol.net/role/DerivativesTables</ParentRole>
      <Position>33</Position>
    </Report>
    <Report instance="peix-20200930.xml">
      <IsDefault>false</IsDefault>
      <HasEmbeddedReports>false</HasEmbeddedReports>
      <HtmlFileName>R34.htm</HtmlFileName>
      <LongName>033 - Disclosure - Derivatives. (Details) - Schedule of derivatives not designated as hedging instruments</LongName>
      <ReportType>Sheet</ReportType>
      <Role>http://pacificethanol.net/role/ScheduleofderivativesnotdesignatedashedginginstrumentsTable</Role>
      <ShortName>Derivatives. (Details) - Schedule of derivatives not designated as hedging instruments</ShortName>
      <MenuCategory>Details</MenuCategory>
      <ParentRole>http://pacificethanol.net/role/DerivativesTables</ParentRole>
      <Position>34</Position>
    </Report>
    <Report instance="peix-20200930.xml">
      <IsDefault>false</IsDefault>
      <HasEmbeddedReports>false</HasEmbeddedReports>
      <HtmlFileName>R35.htm</HtmlFileName>
      <LongName>034 - Disclosure - Derivatives. (Details) - Schedule of recognized gains (losses) for derivatives</LongName>
      <ReportType>Sheet</ReportType>
      <Role>http://pacificethanol.net/role/ScheduleofrecognizedgainslossesforderivativesTable</Role>
      <ShortName>Derivatives. (Details) - Schedule of recognized gains (losses) for derivatives</ShortName>
      <MenuCategory>Details</MenuCategory>
      <ParentRole>http://pacificethanol.net/role/DerivativesTables</ParentRole>
      <Position>35</Position>
    </Report>
    <Report instance="peix-20200930.xml">
      <IsDefault>false</IsDefault>
      <HasEmbeddedReports>false</HasEmbeddedReports>
      <HtmlFileName>R36.htm</HtmlFileName>
      <LongName>035 - Disclosure - Debt. (Details)</LongName>
      <ReportType>Sheet</ReportType>
      <Role>http://pacificethanol.net/role/DebtDetails</Role>
      <ShortName>Debt. (Details)</ShortName>
      <MenuCategory>Details</MenuCategory>
      <ParentRole>http://pacificethanol.net/role/DebtTables</ParentRole>
      <Position>36</Position>
    </Report>
    <Report instance="peix-20200930.xml">
      <IsDefault>false</IsDefault>
      <HasEmbeddedReports>false</HasEmbeddedReports>
      <HtmlFileName>R37.htm</HtmlFileName>
      <LongName>036 - Disclosure - Debt. (Details) - Schedule of long term debt</LongName>
      <ReportType>Sheet</ReportType>
      <Role>http://pacificethanol.net/role/ScheduleoflongtermdebtTable</Role>
      <ShortName>Debt. (Details) - Schedule of long term debt</ShortName>
      <MenuCategory>Details</MenuCategory>
      <ParentRole>http://pacificethanol.net/role/DebtTables</ParentRole>
      <Position>37</Position>
    </Report>
    <Report instance="peix-20200930.xml">
      <IsDefault>false</IsDefault>
      <HasEmbeddedReports>false</HasEmbeddedReports>
      <HtmlFileName>R38.htm</HtmlFileName>
      <LongName>037 - Disclosure - Commitments and Contingencies. (Details)</LongName>
      <ReportType>Sheet</ReportType>
      <Role>http://pacificethanol.net/role/CommitmentsandContingenciesDetails</Role>
      <ShortName>Commitments and Contingencies. (Details)</ShortName>
      <MenuCategory>Details</MenuCategory>
      <ParentRole>http://pacificethanol.net/role/CommitmentsandContingencies</ParentRole>
      <Position>38</Position>
    </Report>
    <Report instance="peix-20200930.xml">
      <IsDefault>false</IsDefault>
      <HasEmbeddedReports>false</HasEmbeddedReports>
      <HtmlFileName>R39.htm</HtmlFileName>
      <LongName>038 - Disclosure - Pension and Retirement Benefit Plans. (Details)</LongName>
      <ReportType>Sheet</ReportType>
      <Role>http://pacificethanol.net/role/PensionandRetirementBenefitPlansDetails</Role>
      <ShortName>Pension and Retirement Benefit Plans. (Details)</ShortName>
      <MenuCategory>Details</MenuCategory>
      <ParentRole>http://pacificethanol.net/role/PensionandRetirementBenefitPlans</ParentRole>
      <Position>39</Position>
    </Report>
    <Report instance="peix-20200930.xml">
      <IsDefault>false</IsDefault>
      <HasEmbeddedReports>false</HasEmbeddedReports>
      <HtmlFileName>R40.htm</HtmlFileName>
      <LongName>039 - Disclosure - Fair Value Measurements. (Details) - Schedule of used and related fair value for the warrants</LongName>
      <ReportType>Sheet</ReportType>
      <Role>http://pacificethanol.net/role/ScheduleofusedandrelatedfairvalueforthewarrantsTable</Role>
      <ShortName>Fair Value Measurements. (Details) - Schedule of used and related fair value for the warrants</ShortName>
      <MenuCategory>Details</MenuCategory>
      <ParentRole>http://pacificethanol.net/role/FairValueMeasurementsTables</ParentRole>
      <Position>40</Position>
    </Report>
    <Report instance="peix-20200930.xml">
      <IsDefault>false</IsDefault>
      <HasEmbeddedReports>false</HasEmbeddedReports>
      <HtmlFileName>R41.htm</HtmlFileName>
      <LongName>040 - Disclosure - Fair Value Measurements. (Details) - Schedule of recurring and nonrecurring fair value measurements</LongName>
      <ReportType>Sheet</ReportType>
      <Role>http://pacificethanol.net/role/ScheduleofrecurringandnonrecurringfairvaluemeasurementsTable</Role>
      <ShortName>Fair Value Measurements. (Details) - Schedule of recurring and nonrecurring fair value measurements</ShortName>
      <MenuCategory>Details</MenuCategory>
      <ParentRole>http://pacificethanol.net/role/FairValueMeasurementsTables</ParentRole>
      <Position>41</Position>
    </Report>
    <Report instance="peix-20200930.xml">
      <IsDefault>false</IsDefault>
      <HasEmbeddedReports>false</HasEmbeddedReports>
      <HtmlFileName>R42.htm</HtmlFileName>
      <LongName>041 - Disclosure - Earnings Per Share. (Details)</LongName>
      <ReportType>Sheet</ReportType>
      <Role>http://pacificethanol.net/role/EarningsPerShareDetails</Role>
      <ShortName>Earnings Per Share. (Details)</ShortName>
      <MenuCategory>Details</MenuCategory>
      <ParentRole>http://pacificethanol.net/role/EarningsPerShareTables</ParentRole>
      <Position>42</Position>
    </Report>
    <Report instance="peix-20200930.xml">
      <IsDefault>false</IsDefault>
      <HasEmbeddedReports>false</HasEmbeddedReports>
      <HtmlFileName>R43.htm</HtmlFileName>
      <LongName>042 - Disclosure - Earnings Per Share. (Details) - Schedule of computation of basic and diluted earnings per share</LongName>
      <ReportType>Sheet</ReportType>
      <Role>http://pacificethanol.net/role/ScheduleofcomputationofbasicanddilutedearningspershareTable</Role>
      <ShortName>Earnings Per Share. (Details) - Schedule of computation of basic and diluted earnings per share</ShortName>
      <MenuCategory>Details</MenuCategory>
      <ParentRole>http://pacificethanol.net/role/EarningsPerShareTables</ParentRole>
      <Position>43</Position>
    </Report>
    <Report instance="peix-20200930.xml">
      <IsDefault>false</IsDefault>
      <HasEmbeddedReports>false</HasEmbeddedReports>
      <HtmlFileName>R44.htm</HtmlFileName>
      <LongName>043 - Disclosure - Parent Company Financials. (Details)</LongName>
      <ReportType>Sheet</ReportType>
      <Role>http://pacificethanol.net/role/ParentCompanyFinancialsDetails</Role>
      <ShortName>Parent Company Financials. (Details)</ShortName>
      <MenuCategory>Details</MenuCategory>
      <ParentRole>http://pacificethanol.net/role/ParentCompanyFinancialsTables</ParentRole>
      <Position>44</Position>
    </Report>
    <Report instance="peix-20200930.xml">
      <IsDefault>false</IsDefault>
      <HasEmbeddedReports>false</HasEmbeddedReports>
      <HtmlFileName>R45.htm</HtmlFileName>
      <LongName>044 - Disclosure - Parent Company Financials. (Details) - Schedule of balance sheets - parent company</LongName>
      <ReportType>Sheet</ReportType>
      <Role>http://pacificethanol.net/role/ScheduleofbalancesheetsparentcompanyTable</Role>
      <ShortName>Parent Company Financials. (Details) - Schedule of balance sheets - parent company</ShortName>
      <MenuCategory>Details</MenuCategory>
      <ParentRole>http://pacificethanol.net/role/ParentCompanyFinancialsTables</ParentRole>
      <Position>45</Position>
    </Report>
    <Report instance="peix-20200930.xml">
      <IsDefault>false</IsDefault>
      <HasEmbeddedReports>false</HasEmbeddedReports>
      <HtmlFileName>R46.htm</HtmlFileName>
      <LongName>045 - Disclosure - Parent Company Financials. (Details) - Schedule of statement of operations parent company</LongName>
      <ReportType>Sheet</ReportType>
      <Role>http://pacificethanol.net/role/ScheduleofstatementofoperationsparentcompanyTable</Role>
      <ShortName>Parent Company Financials. (Details) - Schedule of statement of operations parent company</ShortName>
      <MenuCategory>Details</MenuCategory>
      <ParentRole>http://pacificethanol.net/role/ParentCompanyFinancialsTables</ParentRole>
      <Position>46</Position>
    </Report>
    <Report instance="peix-20200930.xml">
      <IsDefault>false</IsDefault>
      <HasEmbeddedReports>false</HasEmbeddedReports>
      <HtmlFileName>R47.htm</HtmlFileName>
      <LongName>046 - Disclosure - Parent Company Financials. (Details) - Schedule of statement of cash flows parent company</LongName>
      <ReportType>Sheet</ReportType>
      <Role>http://pacificethanol.net/role/ScheduleofstatementofcashflowsparentcompanyTable</Role>
      <ShortName>Parent Company Financials. (Details) - Schedule of statement of cash flows parent company</ShortName>
      <MenuCategory>Details</MenuCategory>
      <ParentRole>http://pacificethanol.net/role/ParentCompanyFinancialsTables</ParentRole>
      <Position>47</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-20200930.xml</File>
    <File>peix-20200930.xsd</File>
    <File>peix-20200930_cal.xml</File>
    <File>peix-20200930_def.xml</File>
    <File>peix-20200930_lab.xml</File>
    <File>peix-20200930_pre.xml</File>
  </InputFiles>
  <SupplementalFiles/>
  <BaseTaxonomies>
    <BaseTaxonomy>http://fasb.org/srt/2020-01-31</BaseTaxonomy>
    <BaseTaxonomy>http://fasb.org/us-gaap/2020-01-31</BaseTaxonomy>
    <BaseTaxonomy>http://xbrl.sec.gov/dei/2019-01-31</BaseTaxonomy>
  </BaseTaxonomies>
  <HasPresentationLinkbase>true</HasPresentationLinkbase>
  <HasCalculationLinkbase>true</HasCalculationLinkbase>
</FilingSummary>
