<?xml version='1.0' encoding='UTF-8'?>
<FilingSummary>
  <Version>3.5.0.2</Version>
  <ProcessingTime/>
  <ReportFormat>html</ReportFormat>
  <ContextCount>149</ContextCount>
  <ElementCount>176</ElementCount>
  <EntityCount>1</EntityCount>
  <FootnotesReported>false</FootnotesReported>
  <SegmentCount>35</SegmentCount>
  <ScenarioCount>0</ScenarioCount>
  <TuplesReported>false</TuplesReported>
  <UnitCount>5</UnitCount>
  <MyReports>
    <Report instance="fgen-20160630.xml">
      <IsDefault>false</IsDefault>
      <HasEmbeddedReports>false</HasEmbeddedReports>
      <HtmlFileName>R1.htm</HtmlFileName>
      <LongName>100000 - Document - Document and Entity Information</LongName>
      <ReportType>Sheet</ReportType>
      <Role>http://www.fibrogen.com/20160630/taxonomy/role/DocumentDocumentAndEntityInformation</Role>
      <ShortName>Document and Entity Information</ShortName>
      <MenuCategory>Cover</MenuCategory>
      <Position>1</Position>
    </Report>
    <Report instance="fgen-20160630.xml">
      <IsDefault>false</IsDefault>
      <HasEmbeddedReports>false</HasEmbeddedReports>
      <HtmlFileName>R2.htm</HtmlFileName>
      <LongName>100010 - Statement - Condensed Consolidated Balance Sheets (Unaudited)</LongName>
      <ReportType>Sheet</ReportType>
      <Role>http://www.fibrogen.com/20160630/taxonomy/role/StatementCondensedConsolidatedBalanceSheetsUnaudited</Role>
      <ShortName>Condensed Consolidated Balance Sheets (Unaudited)</ShortName>
      <MenuCategory>Statements</MenuCategory>
      <Position>2</Position>
    </Report>
    <Report instance="fgen-20160630.xml">
      <IsDefault>false</IsDefault>
      <HasEmbeddedReports>false</HasEmbeddedReports>
      <HtmlFileName>R3.htm</HtmlFileName>
      <LongName>100020 - Statement - Condensed Consolidated Balance Sheets (Unaudited) (Parenthetical)</LongName>
      <ReportType>Sheet</ReportType>
      <Role>http://www.fibrogen.com/20160630/taxonomy/role/StatementCondensedConsolidatedBalanceSheetsUnauditedParenthetical</Role>
      <ShortName>Condensed Consolidated Balance Sheets (Unaudited) (Parenthetical)</ShortName>
      <MenuCategory>Statements</MenuCategory>
      <Position>3</Position>
    </Report>
    <Report instance="fgen-20160630.xml">
      <IsDefault>false</IsDefault>
      <HasEmbeddedReports>false</HasEmbeddedReports>
      <HtmlFileName>R4.htm</HtmlFileName>
      <LongName>100030 - Statement - Condensed Consolidated Statements of Operations (Unaudited)</LongName>
      <ReportType>Sheet</ReportType>
      <Role>http://www.fibrogen.com/20160630/taxonomy/role/StatementCondensedConsolidatedStatementsOfOperationsUnaudited</Role>
      <ShortName>Condensed Consolidated Statements of Operations (Unaudited)</ShortName>
      <MenuCategory>Statements</MenuCategory>
      <Position>4</Position>
    </Report>
    <Report instance="fgen-20160630.xml">
      <IsDefault>false</IsDefault>
      <HasEmbeddedReports>false</HasEmbeddedReports>
      <HtmlFileName>R5.htm</HtmlFileName>
      <LongName>100040 - Statement - Condensed Consolidated Statements of Operations (Parenthetical) (Unaudited)</LongName>
      <ReportType>Sheet</ReportType>
      <Role>http://www.fibrogen.com/20160630/taxonomy/role/StatementCondensedConsolidatedStatementsOfOperationsParentheticalUnaudited</Role>
      <ShortName>Condensed Consolidated Statements of Operations (Parenthetical) (Unaudited)</ShortName>
      <MenuCategory>Statements</MenuCategory>
      <Position>5</Position>
    </Report>
    <Report instance="fgen-20160630.xml">
      <IsDefault>false</IsDefault>
      <HasEmbeddedReports>false</HasEmbeddedReports>
      <HtmlFileName>R6.htm</HtmlFileName>
      <LongName>100050 - Statement - Condensed Consolidated Statements of Comprehensive Income (Loss) (Unaudited)</LongName>
      <ReportType>Sheet</ReportType>
      <Role>http://www.fibrogen.com/20160630/taxonomy/role/StatementCondensedConsolidatedStatementsOfComprehensiveIncomeLossUnaudited</Role>
      <ShortName>Condensed Consolidated Statements of Comprehensive Income (Loss) (Unaudited)</ShortName>
      <MenuCategory>Statements</MenuCategory>
      <Position>6</Position>
    </Report>
    <Report instance="fgen-20160630.xml">
      <IsDefault>false</IsDefault>
      <HasEmbeddedReports>false</HasEmbeddedReports>
      <HtmlFileName>R7.htm</HtmlFileName>
      <LongName>100060 - Statement - Condensed Consolidated Statement of Cash Flows (Unaudited)</LongName>
      <ReportType>Sheet</ReportType>
      <Role>http://www.fibrogen.com/20160630/taxonomy/role/StatementCondensedConsolidatedStatementOfCashFlowsUnaudited</Role>
      <ShortName>Condensed Consolidated Statement of Cash Flows (Unaudited)</ShortName>
      <MenuCategory>Statements</MenuCategory>
      <Position>7</Position>
    </Report>
    <Report instance="fgen-20160630.xml">
      <IsDefault>false</IsDefault>
      <HasEmbeddedReports>false</HasEmbeddedReports>
      <HtmlFileName>R8.htm</HtmlFileName>
      <LongName>100070 - Disclosure - Description of Operations and Summary of Significant Accounting Policies</LongName>
      <ReportType>Sheet</ReportType>
      <Role>http://www.fibrogen.com/20160630/taxonomy/role/DisclosureDescriptionOfOperationsAndSummaryOfSignificantAccountingPolicies</Role>
      <ShortName>Description of Operations and Summary of Significant Accounting Policies</ShortName>
      <MenuCategory>Notes</MenuCategory>
      <Position>8</Position>
    </Report>
    <Report instance="fgen-20160630.xml">
      <IsDefault>false</IsDefault>
      <HasEmbeddedReports>false</HasEmbeddedReports>
      <HtmlFileName>R9.htm</HtmlFileName>
      <LongName>100080 - Disclosure - Collaboration Agreements</LongName>
      <ReportType>Sheet</ReportType>
      <Role>http://www.fibrogen.com/20160630/taxonomy/role/DisclosureCollaborationAgreements</Role>
      <ShortName>Collaboration Agreements</ShortName>
      <MenuCategory>Notes</MenuCategory>
      <Position>9</Position>
    </Report>
    <Report instance="fgen-20160630.xml">
      <IsDefault>false</IsDefault>
      <HasEmbeddedReports>false</HasEmbeddedReports>
      <HtmlFileName>R10.htm</HtmlFileName>
      <LongName>100090 - Disclosure - Fair Value Measurements</LongName>
      <ReportType>Sheet</ReportType>
      <Role>http://www.fibrogen.com/20160630/taxonomy/role/DisclosureFairValueMeasurements</Role>
      <ShortName>Fair Value Measurements</ShortName>
      <MenuCategory>Notes</MenuCategory>
      <Position>10</Position>
    </Report>
    <Report instance="fgen-20160630.xml">
      <IsDefault>false</IsDefault>
      <HasEmbeddedReports>false</HasEmbeddedReports>
      <HtmlFileName>R11.htm</HtmlFileName>
      <LongName>100100 - Disclosure - Balance Sheet Components</LongName>
      <ReportType>Sheet</ReportType>
      <Role>http://www.fibrogen.com/20160630/taxonomy/role/DisclosureBalanceSheetComponents</Role>
      <ShortName>Balance Sheet Components</ShortName>
      <MenuCategory>Notes</MenuCategory>
      <Position>11</Position>
    </Report>
    <Report instance="fgen-20160630.xml">
      <IsDefault>false</IsDefault>
      <HasEmbeddedReports>false</HasEmbeddedReports>
      <HtmlFileName>R12.htm</HtmlFileName>
      <LongName>100110 - Disclosure - Stock-Based Compensation</LongName>
      <ReportType>Sheet</ReportType>
      <Role>http://www.fibrogen.com/20160630/taxonomy/role/DisclosureStockBasedCompensation</Role>
      <ShortName>Stock-Based Compensation</ShortName>
      <MenuCategory>Notes</MenuCategory>
      <Position>12</Position>
    </Report>
    <Report instance="fgen-20160630.xml">
      <IsDefault>false</IsDefault>
      <HasEmbeddedReports>false</HasEmbeddedReports>
      <HtmlFileName>R13.htm</HtmlFileName>
      <LongName>100120 - Disclosure - Income Taxes</LongName>
      <ReportType>Sheet</ReportType>
      <Role>http://www.fibrogen.com/20160630/taxonomy/role/DisclosureIncomeTaxes</Role>
      <ShortName>Income Taxes</ShortName>
      <MenuCategory>Notes</MenuCategory>
      <Position>13</Position>
    </Report>
    <Report instance="fgen-20160630.xml">
      <IsDefault>false</IsDefault>
      <HasEmbeddedReports>false</HasEmbeddedReports>
      <HtmlFileName>R14.htm</HtmlFileName>
      <LongName>100130 - Disclosure - Related Party Transactions</LongName>
      <ReportType>Sheet</ReportType>
      <Role>http://www.fibrogen.com/20160630/taxonomy/role/DisclosureRelatedPartyTransactions</Role>
      <ShortName>Related Party Transactions</ShortName>
      <MenuCategory>Notes</MenuCategory>
      <Position>14</Position>
    </Report>
    <Report instance="fgen-20160630.xml">
      <IsDefault>false</IsDefault>
      <HasEmbeddedReports>false</HasEmbeddedReports>
      <HtmlFileName>R15.htm</HtmlFileName>
      <LongName>100140 - Disclosure - Description of Operations and Summary of Significant Accounting Policies (Policies)</LongName>
      <ReportType>Sheet</ReportType>
      <Role>http://www.fibrogen.com/20160630/taxonomy/role/DisclosureDescriptionOfOperationsAndSummaryOfSignificantAccountingPoliciesPolicies</Role>
      <ShortName>Description of Operations and Summary of Significant Accounting Policies (Policies)</ShortName>
      <MenuCategory>Policies</MenuCategory>
      <ParentRole>http://www.fibrogen.com/20160630/taxonomy/role/DisclosureDescriptionOfOperationsAndSummaryOfSignificantAccountingPolicies</ParentRole>
      <Position>15</Position>
    </Report>
    <Report instance="fgen-20160630.xml">
      <IsDefault>false</IsDefault>
      <HasEmbeddedReports>false</HasEmbeddedReports>
      <HtmlFileName>R16.htm</HtmlFileName>
      <LongName>100150 - Disclosure - Description of Operations and Summary of Significant Accounting Policies  (Tables)</LongName>
      <ReportType>Sheet</ReportType>
      <Role>http://www.fibrogen.com/20160630/taxonomy/role/DisclosureDescriptionOfOperationsAndSummaryOfSignificantAccountingPoliciesTables</Role>
      <ShortName>Description of Operations and Summary of Significant Accounting Policies  (Tables)</ShortName>
      <MenuCategory>Tables</MenuCategory>
      <ParentRole>http://www.fibrogen.com/20160630/taxonomy/role/DisclosureDescriptionOfOperationsAndSummaryOfSignificantAccountingPolicies</ParentRole>
      <Position>16</Position>
    </Report>
    <Report instance="fgen-20160630.xml">
      <IsDefault>false</IsDefault>
      <HasEmbeddedReports>false</HasEmbeddedReports>
      <HtmlFileName>R17.htm</HtmlFileName>
      <LongName>100160 - Disclosure - Collaboration Agreements (Tables)</LongName>
      <ReportType>Sheet</ReportType>
      <Role>http://www.fibrogen.com/20160630/taxonomy/role/DisclosureCollaborationAgreementsTables</Role>
      <ShortName>Collaboration Agreements (Tables)</ShortName>
      <MenuCategory>Tables</MenuCategory>
      <ParentRole>http://www.fibrogen.com/20160630/taxonomy/role/DisclosureCollaborationAgreements</ParentRole>
      <Position>17</Position>
    </Report>
    <Report instance="fgen-20160630.xml">
      <IsDefault>false</IsDefault>
      <HasEmbeddedReports>false</HasEmbeddedReports>
      <HtmlFileName>R18.htm</HtmlFileName>
      <LongName>100170 - Disclosure - Fair Value Measurements (Tables)</LongName>
      <ReportType>Sheet</ReportType>
      <Role>http://www.fibrogen.com/20160630/taxonomy/role/DisclosureFairValueMeasurementsTables</Role>
      <ShortName>Fair Value Measurements (Tables)</ShortName>
      <MenuCategory>Tables</MenuCategory>
      <ParentRole>http://www.fibrogen.com/20160630/taxonomy/role/DisclosureFairValueMeasurements</ParentRole>
      <Position>18</Position>
    </Report>
    <Report instance="fgen-20160630.xml">
      <IsDefault>false</IsDefault>
      <HasEmbeddedReports>false</HasEmbeddedReports>
      <HtmlFileName>R19.htm</HtmlFileName>
      <LongName>100180 - Disclosure - Balance Sheet Components (Tables)</LongName>
      <ReportType>Sheet</ReportType>
      <Role>http://www.fibrogen.com/20160630/taxonomy/role/DisclosureBalanceSheetComponentsTables</Role>
      <ShortName>Balance Sheet Components (Tables)</ShortName>
      <MenuCategory>Tables</MenuCategory>
      <ParentRole>http://www.fibrogen.com/20160630/taxonomy/role/DisclosureBalanceSheetComponents</ParentRole>
      <Position>19</Position>
    </Report>
    <Report instance="fgen-20160630.xml">
      <IsDefault>false</IsDefault>
      <HasEmbeddedReports>false</HasEmbeddedReports>
      <HtmlFileName>R20.htm</HtmlFileName>
      <LongName>100190 - Disclosure - Stock-Based Compensation (Tables)</LongName>
      <ReportType>Sheet</ReportType>
      <Role>http://www.fibrogen.com/20160630/taxonomy/role/DisclosureStockBasedCompensationTables</Role>
      <ShortName>Stock-Based Compensation (Tables)</ShortName>
      <MenuCategory>Tables</MenuCategory>
      <ParentRole>http://www.fibrogen.com/20160630/taxonomy/role/DisclosureStockBasedCompensation</ParentRole>
      <Position>20</Position>
    </Report>
    <Report instance="fgen-20160630.xml">
      <IsDefault>false</IsDefault>
      <HasEmbeddedReports>false</HasEmbeddedReports>
      <HtmlFileName>R21.htm</HtmlFileName>
      <LongName>100200 - Disclosure - Description of Operations and Summary of Significant Accounting Policies - Additional Information (Detail)</LongName>
      <ReportType>Sheet</ReportType>
      <Role>http://www.fibrogen.com/20160630/taxonomy/role/DisclosureDescriptionOfOperationsAndSummaryOfSignificantAccountingPoliciesAdditionalInformationDetail</Role>
      <ShortName>Description of Operations and Summary of Significant Accounting Policies - Additional Information (Detail)</ShortName>
      <MenuCategory>Details</MenuCategory>
      <Position>21</Position>
    </Report>
    <Report instance="fgen-20160630.xml">
      <IsDefault>false</IsDefault>
      <HasEmbeddedReports>false</HasEmbeddedReports>
      <HtmlFileName>R22.htm</HtmlFileName>
      <LongName>100210 - Disclosure - Description of Operations and Summary of Significant Accounting Policies - Schedule of Reconciliation of Basic and Diluted Net Income (Loss) per Share Calculation (Detail)</LongName>
      <ReportType>Sheet</ReportType>
      <Role>http://www.fibrogen.com/20160630/taxonomy/role/DisclosureDescriptionOfOperationsAndSummaryOfSignificantAccountingPoliciesScheduleOfReconciliationOfBasicAndDilutedNetIncomeLossPerShareCalculationDetail</Role>
      <ShortName>Description of Operations and Summary of Significant Accounting Policies - Schedule of Reconciliation of Basic and Diluted Net Income (Loss) per Share Calculation (Detail)</ShortName>
      <MenuCategory>Details</MenuCategory>
      <Position>22</Position>
    </Report>
    <Report instance="fgen-20160630.xml">
      <IsDefault>false</IsDefault>
      <HasEmbeddedReports>false</HasEmbeddedReports>
      <HtmlFileName>R23.htm</HtmlFileName>
      <LongName>100220 - Disclosure - Collaboration Agreements - Astellas Agreements - Additional Information (Detail)</LongName>
      <ReportType>Sheet</ReportType>
      <Role>http://www.fibrogen.com/20160630/taxonomy/role/DisclosureCollaborationAgreementsAstellasAgreementsAdditionalInformationDetail</Role>
      <ShortName>Collaboration Agreements - Astellas Agreements - Additional Information (Detail)</ShortName>
      <MenuCategory>Details</MenuCategory>
      <Position>23</Position>
    </Report>
    <Report instance="fgen-20160630.xml">
      <IsDefault>false</IsDefault>
      <HasEmbeddedReports>false</HasEmbeddedReports>
      <HtmlFileName>R24.htm</HtmlFileName>
      <LongName>100230 - Disclosure - Collaboration Agreements - AstraZeneca Agreements - Additional Information 1 (Detail)</LongName>
      <ReportType>Sheet</ReportType>
      <Role>http://www.fibrogen.com/20160630/taxonomy/role/DisclosureCollaborationAgreementsAstrazenecaAgreementsAdditionalInformation1Detail</Role>
      <ShortName>Collaboration Agreements - AstraZeneca Agreements - Additional Information 1 (Detail)</ShortName>
      <MenuCategory>Details</MenuCategory>
      <Position>24</Position>
    </Report>
    <Report instance="fgen-20160630.xml">
      <IsDefault>false</IsDefault>
      <HasEmbeddedReports>false</HasEmbeddedReports>
      <HtmlFileName>R25.htm</HtmlFileName>
      <LongName>100240 - Disclosure - Collaboration Agreements - Summary of Revenue Recognized under Agreement (Detail)</LongName>
      <ReportType>Sheet</ReportType>
      <Role>http://www.fibrogen.com/20160630/taxonomy/role/DisclosureCollaborationAgreementsSummaryOfRevenueRecognizedUnderAgreementDetail</Role>
      <ShortName>Collaboration Agreements - Summary of Revenue Recognized under Agreement (Detail)</ShortName>
      <MenuCategory>Details</MenuCategory>
      <Position>25</Position>
    </Report>
    <Report instance="fgen-20160630.xml">
      <IsDefault>false</IsDefault>
      <HasEmbeddedReports>false</HasEmbeddedReports>
      <HtmlFileName>R26.htm</HtmlFileName>
      <LongName>100250 - Disclosure - Collaboration Agreements - Total Arrangement Consideration Allocated to Deliverables along with Associated Deferred Revenue (Detail)</LongName>
      <ReportType>Sheet</ReportType>
      <Role>http://www.fibrogen.com/20160630/taxonomy/role/DisclosureCollaborationAgreementsTotalArrangementConsiderationAllocatedToDeliverablesAlongWithAssociatedDeferredRevenueDetail</Role>
      <ShortName>Collaboration Agreements - Total Arrangement Consideration Allocated to Deliverables along with Associated Deferred Revenue (Detail)</ShortName>
      <MenuCategory>Details</MenuCategory>
      <Position>26</Position>
    </Report>
    <Report instance="fgen-20160630.xml">
      <IsDefault>false</IsDefault>
      <HasEmbeddedReports>false</HasEmbeddedReports>
      <HtmlFileName>R27.htm</HtmlFileName>
      <LongName>100260 - Disclosure - Fair Value Measurements - Fair Values of Financial Assets Measured on Recurring Basis (Detail)</LongName>
      <ReportType>Sheet</ReportType>
      <Role>http://www.fibrogen.com/20160630/taxonomy/role/DisclosureFairValueMeasurementsFairValuesOfFinancialAssetsMeasuredOnRecurringBasisDetail</Role>
      <ShortName>Fair Value Measurements - Fair Values of Financial Assets Measured on Recurring Basis (Detail)</ShortName>
      <MenuCategory>Details</MenuCategory>
      <Position>27</Position>
    </Report>
    <Report instance="fgen-20160630.xml">
      <IsDefault>false</IsDefault>
      <HasEmbeddedReports>false</HasEmbeddedReports>
      <HtmlFileName>R28.htm</HtmlFileName>
      <LongName>100270 - Disclosure - Fair Value Measurements - Fair Values of Financial Liabilities Carried at Historical Cost (Detail)</LongName>
      <ReportType>Sheet</ReportType>
      <Role>http://www.fibrogen.com/20160630/taxonomy/role/DisclosureFairValueMeasurementsFairValuesOfFinancialLiabilitiesCarriedAtHistoricalCostDetail</Role>
      <ShortName>Fair Value Measurements - Fair Values of Financial Liabilities Carried at Historical Cost (Detail)</ShortName>
      <MenuCategory>Details</MenuCategory>
      <Position>28</Position>
    </Report>
    <Report instance="fgen-20160630.xml">
      <IsDefault>false</IsDefault>
      <HasEmbeddedReports>false</HasEmbeddedReports>
      <HtmlFileName>R29.htm</HtmlFileName>
      <LongName>100280 - Disclosure - Fair Value Measurements - Additional Information (Detail)</LongName>
      <ReportType>Sheet</ReportType>
      <Role>http://www.fibrogen.com/20160630/taxonomy/role/DisclosureFairValueMeasurementsAdditionalInformationDetail</Role>
      <ShortName>Fair Value Measurements - Additional Information (Detail)</ShortName>
      <MenuCategory>Details</MenuCategory>
      <Position>29</Position>
    </Report>
    <Report instance="fgen-20160630.xml">
      <IsDefault>false</IsDefault>
      <HasEmbeddedReports>false</HasEmbeddedReports>
      <HtmlFileName>R30.htm</HtmlFileName>
      <LongName>100290 - Disclosure - Balance Sheet Components - Schedule of Cash and Cash Equivalents (Detail)</LongName>
      <ReportType>Sheet</ReportType>
      <Role>http://www.fibrogen.com/20160630/taxonomy/role/DisclosureBalanceSheetComponentsScheduleOfCashAndCashEquivalentsDetail</Role>
      <ShortName>Balance Sheet Components - Schedule of Cash and Cash Equivalents (Detail)</ShortName>
      <MenuCategory>Details</MenuCategory>
      <Position>30</Position>
    </Report>
    <Report instance="fgen-20160630.xml">
      <IsDefault>false</IsDefault>
      <HasEmbeddedReports>false</HasEmbeddedReports>
      <HtmlFileName>R31.htm</HtmlFileName>
      <LongName>100300 - Disclosure - Balance Sheet Components - Additional Information (Detail)</LongName>
      <ReportType>Sheet</ReportType>
      <Role>http://www.fibrogen.com/20160630/taxonomy/role/DisclosureBalanceSheetComponentsAdditionalInformationDetail</Role>
      <ShortName>Balance Sheet Components - Additional Information (Detail)</ShortName>
      <MenuCategory>Details</MenuCategory>
      <Position>31</Position>
    </Report>
    <Report instance="fgen-20160630.xml">
      <IsDefault>false</IsDefault>
      <HasEmbeddedReports>false</HasEmbeddedReports>
      <HtmlFileName>R32.htm</HtmlFileName>
      <LongName>100310 - Disclosure - Balance Sheet Components - Summary of Amortized Cost, Gross Unrealized Holding Gains or Losses, and Fair Value of Available-for-Sale Investments (Detail)</LongName>
      <ReportType>Sheet</ReportType>
      <Role>http://www.fibrogen.com/20160630/taxonomy/role/DisclosureBalanceSheetComponentsSummaryOfAmortizedCostGrossUnrealizedHoldingGainsOrLossesAndFairValueOfAvailableForSaleInvestmentsDetail</Role>
      <ShortName>Balance Sheet Components - Summary of Amortized Cost, Gross Unrealized Holding Gains or Losses, and Fair Value of Available-for-Sale Investments (Detail)</ShortName>
      <MenuCategory>Details</MenuCategory>
      <Position>32</Position>
    </Report>
    <Report instance="fgen-20160630.xml">
      <IsDefault>false</IsDefault>
      <HasEmbeddedReports>false</HasEmbeddedReports>
      <HtmlFileName>R33.htm</HtmlFileName>
      <LongName>100320 - Disclosure - Balance Sheet Components - Schedule of Accrued Liabilities (Detail)</LongName>
      <ReportType>Sheet</ReportType>
      <Role>http://www.fibrogen.com/20160630/taxonomy/role/DisclosureBalanceSheetComponentsScheduleOfAccruedLiabilitiesDetail</Role>
      <ShortName>Balance Sheet Components - Schedule of Accrued Liabilities (Detail)</ShortName>
      <MenuCategory>Details</MenuCategory>
      <Position>33</Position>
    </Report>
    <Report instance="fgen-20160630.xml">
      <IsDefault>false</IsDefault>
      <HasEmbeddedReports>false</HasEmbeddedReports>
      <HtmlFileName>R34.htm</HtmlFileName>
      <LongName>100330 - Disclosure - Stock-Based Compensation - Schedule of Allocated Stock-Based Compensation Expense (Detail)</LongName>
      <ReportType>Sheet</ReportType>
      <Role>http://www.fibrogen.com/20160630/taxonomy/role/DisclosureStockBasedCompensationScheduleOfAllocatedStockBasedCompensationExpenseDetail</Role>
      <ShortName>Stock-Based Compensation - Schedule of Allocated Stock-Based Compensation Expense (Detail)</ShortName>
      <MenuCategory>Details</MenuCategory>
      <Position>34</Position>
    </Report>
    <Report instance="fgen-20160630.xml">
      <IsDefault>false</IsDefault>
      <HasEmbeddedReports>false</HasEmbeddedReports>
      <HtmlFileName>R35.htm</HtmlFileName>
      <LongName>100340 - Disclosure - Stock-Based Compensation - Schedule of Assumptions used to Estimate Fair Value of Stock Options Granted and Employee Stock Purchase Plans (Detail)</LongName>
      <ReportType>Sheet</ReportType>
      <Role>http://www.fibrogen.com/20160630/taxonomy/role/DisclosureStockBasedCompensationScheduleOfAssumptionsUsedToEstimateFairValueOfStockOptionsGrantedAndEmployeeStockPurchasePlansDetail</Role>
      <ShortName>Stock-Based Compensation - Schedule of Assumptions used to Estimate Fair Value of Stock Options Granted and Employee Stock Purchase Plans (Detail)</ShortName>
      <MenuCategory>Details</MenuCategory>
      <Position>35</Position>
    </Report>
    <Report instance="fgen-20160630.xml">
      <IsDefault>false</IsDefault>
      <HasEmbeddedReports>false</HasEmbeddedReports>
      <HtmlFileName>R36.htm</HtmlFileName>
      <LongName>100350 - Disclosure - Related Party Transactions - Additional Information (Detail)</LongName>
      <ReportType>Sheet</ReportType>
      <Role>http://www.fibrogen.com/20160630/taxonomy/role/DisclosureRelatedPartyTransactionsAdditionalInformationDetail</Role>
      <ShortName>Related Party Transactions - Additional Information (Detail)</ShortName>
      <MenuCategory>Details</MenuCategory>
      <Position>36</Position>
    </Report>
    <Report>
      <IsDefault>false</IsDefault>
      <HasEmbeddedReports>false</HasEmbeddedReports>
      <LongName>All Reports</LongName>
      <ReportType>Book</ReportType>
      <ShortName>All Reports</ShortName>
    </Report>
  </MyReports>
  <InputFiles>
    <File>fgen-20160630.xml</File>
    <File>fgen-20160630.xsd</File>
    <File>fgen-20160630_cal.xml</File>
    <File>fgen-20160630_def.xml</File>
    <File>fgen-20160630_lab.xml</File>
    <File>fgen-20160630_pre.xml</File>
  </InputFiles>
  <SupplementalFiles/>
  <BaseTaxonomies/>
  <HasPresentationLinkbase>true</HasPresentationLinkbase>
  <HasCalculationLinkbase>true</HasCalculationLinkbase>
</FilingSummary>
