<?xml version='1.0' encoding='UTF-8'?>
<FilingSummary>
  <Version>3.8.0.1</Version>
  <ProcessingTime/>
  <ReportFormat>html</ReportFormat>
  <ContextCount>302</ContextCount>
  <ElementCount>330</ElementCount>
  <EntityCount>1</EntityCount>
  <FootnotesReported>false</FootnotesReported>
  <SegmentCount>83</SegmentCount>
  <ScenarioCount>0</ScenarioCount>
  <TuplesReported>false</TuplesReported>
  <UnitCount>7</UnitCount>
  <MyReports>
    <Report instance="xncr-20171231.xml">
      <IsDefault>false</IsDefault>
      <HasEmbeddedReports>false</HasEmbeddedReports>
      <HtmlFileName>R1.htm</HtmlFileName>
      <LongName>00090 - Document - Document and Entity Information</LongName>
      <ReportType>Sheet</ReportType>
      <Role>http://www.xencor.com/role/DocumentDocumentAndEntityInformation</Role>
      <ShortName>Document and Entity Information</ShortName>
      <MenuCategory>Cover</MenuCategory>
      <Position>1</Position>
    </Report>
    <Report instance="xncr-20171231.xml">
      <IsDefault>false</IsDefault>
      <HasEmbeddedReports>false</HasEmbeddedReports>
      <HtmlFileName>R2.htm</HtmlFileName>
      <LongName>00100 - Statement - Balance Sheets</LongName>
      <ReportType>Sheet</ReportType>
      <Role>http://www.xencor.com/role/StatementBalanceSheets</Role>
      <ShortName>Balance Sheets</ShortName>
      <MenuCategory>Statements</MenuCategory>
      <Position>2</Position>
    </Report>
    <Report instance="xncr-20171231.xml">
      <IsDefault>false</IsDefault>
      <HasEmbeddedReports>false</HasEmbeddedReports>
      <HtmlFileName>R3.htm</HtmlFileName>
      <LongName>00105 - Statement - Balance Sheets (Parenthetical)</LongName>
      <ReportType>Sheet</ReportType>
      <Role>http://www.xencor.com/role/StatementBalanceSheetsParenthetical</Role>
      <ShortName>Balance Sheets (Parenthetical)</ShortName>
      <MenuCategory>Statements</MenuCategory>
      <Position>3</Position>
    </Report>
    <Report instance="xncr-20171231.xml">
      <IsDefault>false</IsDefault>
      <HasEmbeddedReports>false</HasEmbeddedReports>
      <HtmlFileName>R4.htm</HtmlFileName>
      <LongName>00200 - Statement - Statements of Comprehensive Income (Loss)</LongName>
      <ReportType>Sheet</ReportType>
      <Role>http://www.xencor.com/role/StatementStatementsOfComprehensiveIncomeLoss</Role>
      <ShortName>Statements of Comprehensive Income (Loss)</ShortName>
      <MenuCategory>Statements</MenuCategory>
      <Position>4</Position>
    </Report>
    <Report instance="xncr-20171231.xml">
      <IsDefault>false</IsDefault>
      <HasEmbeddedReports>false</HasEmbeddedReports>
      <HtmlFileName>R5.htm</HtmlFileName>
      <LongName>00300 - Statement - Statement of Stockholders' Equity</LongName>
      <ReportType>Sheet</ReportType>
      <Role>http://www.xencor.com/role/StatementStatementOfStockholdersEquity</Role>
      <ShortName>Statement of Stockholders' Equity</ShortName>
      <MenuCategory>Statements</MenuCategory>
      <Position>5</Position>
    </Report>
    <Report instance="xncr-20171231.xml">
      <IsDefault>false</IsDefault>
      <HasEmbeddedReports>false</HasEmbeddedReports>
      <HtmlFileName>R6.htm</HtmlFileName>
      <LongName>00400 - Statement - Statements of Cash Flows</LongName>
      <ReportType>Sheet</ReportType>
      <Role>http://www.xencor.com/role/StatementStatementsOfCashFlows</Role>
      <ShortName>Statements of Cash Flows</ShortName>
      <MenuCategory>Statements</MenuCategory>
      <Position>6</Position>
    </Report>
    <Report instance="xncr-20171231.xml">
      <IsDefault>false</IsDefault>
      <HasEmbeddedReports>false</HasEmbeddedReports>
      <HtmlFileName>R7.htm</HtmlFileName>
      <LongName>10101 - Disclosure - Summary of Significant Accounting Policies</LongName>
      <ReportType>Sheet</ReportType>
      <Role>http://www.xencor.com/role/DisclosureSummaryOfSignificantAccountingPolicies</Role>
      <ShortName>Summary of Significant Accounting Policies</ShortName>
      <MenuCategory>Notes</MenuCategory>
      <Position>7</Position>
    </Report>
    <Report instance="xncr-20171231.xml">
      <IsDefault>false</IsDefault>
      <HasEmbeddedReports>false</HasEmbeddedReports>
      <HtmlFileName>R8.htm</HtmlFileName>
      <LongName>10201 - Disclosure - Comprehensive Income (Loss)</LongName>
      <ReportType>Sheet</ReportType>
      <Role>http://www.xencor.com/role/DisclosureComprehensiveIncomeLoss</Role>
      <ShortName>Comprehensive Income (Loss)</ShortName>
      <MenuCategory>Notes</MenuCategory>
      <Position>8</Position>
    </Report>
    <Report instance="xncr-20171231.xml">
      <IsDefault>false</IsDefault>
      <HasEmbeddedReports>false</HasEmbeddedReports>
      <HtmlFileName>R9.htm</HtmlFileName>
      <LongName>10301 - Disclosure - Marketable Securities</LongName>
      <ReportType>Sheet</ReportType>
      <Role>http://www.xencor.com/role/DisclosureMarketableSecurities</Role>
      <ShortName>Marketable Securities</ShortName>
      <MenuCategory>Notes</MenuCategory>
      <Position>9</Position>
    </Report>
    <Report instance="xncr-20171231.xml">
      <IsDefault>false</IsDefault>
      <HasEmbeddedReports>false</HasEmbeddedReports>
      <HtmlFileName>R10.htm</HtmlFileName>
      <LongName>10401 - Disclosure - Sale of Additional Common Stock</LongName>
      <ReportType>Sheet</ReportType>
      <Role>http://www.xencor.com/role/DisclosureSaleOfAdditionalCommonStock</Role>
      <ShortName>Sale of Additional Common Stock</ShortName>
      <MenuCategory>Notes</MenuCategory>
      <Position>10</Position>
    </Report>
    <Report instance="xncr-20171231.xml">
      <IsDefault>false</IsDefault>
      <HasEmbeddedReports>false</HasEmbeddedReports>
      <HtmlFileName>R11.htm</HtmlFileName>
      <LongName>10501 - Disclosure - Property and Equipment</LongName>
      <ReportType>Sheet</ReportType>
      <Role>http://www.xencor.com/role/DisclosurePropertyAndEquipment</Role>
      <ShortName>Property and Equipment</ShortName>
      <MenuCategory>Notes</MenuCategory>
      <Position>11</Position>
    </Report>
    <Report instance="xncr-20171231.xml">
      <IsDefault>false</IsDefault>
      <HasEmbeddedReports>false</HasEmbeddedReports>
      <HtmlFileName>R12.htm</HtmlFileName>
      <LongName>10601 - Disclosure - Income Taxes</LongName>
      <ReportType>Sheet</ReportType>
      <Role>http://www.xencor.com/role/DisclosureIncomeTaxes</Role>
      <ShortName>Income Taxes</ShortName>
      <MenuCategory>Notes</MenuCategory>
      <Position>12</Position>
    </Report>
    <Report instance="xncr-20171231.xml">
      <IsDefault>false</IsDefault>
      <HasEmbeddedReports>false</HasEmbeddedReports>
      <HtmlFileName>R13.htm</HtmlFileName>
      <LongName>10701 - Disclosure - Stock-Based Compensation</LongName>
      <ReportType>Sheet</ReportType>
      <Role>http://www.xencor.com/role/DisclosureStockBasedCompensation</Role>
      <ShortName>Stock-Based Compensation</ShortName>
      <MenuCategory>Notes</MenuCategory>
      <Position>13</Position>
    </Report>
    <Report instance="xncr-20171231.xml">
      <IsDefault>false</IsDefault>
      <HasEmbeddedReports>false</HasEmbeddedReports>
      <HtmlFileName>R14.htm</HtmlFileName>
      <LongName>10801 - Disclosure - Commitments and Contingencies</LongName>
      <ReportType>Sheet</ReportType>
      <Role>http://www.xencor.com/role/DisclosureCommitmentsAndContingencies</Role>
      <ShortName>Commitments and Contingencies</ShortName>
      <MenuCategory>Notes</MenuCategory>
      <Position>14</Position>
    </Report>
    <Report instance="xncr-20171231.xml">
      <IsDefault>false</IsDefault>
      <HasEmbeddedReports>false</HasEmbeddedReports>
      <HtmlFileName>R15.htm</HtmlFileName>
      <LongName>10901 - Disclosure - 401(k) Plan</LongName>
      <ReportType>Sheet</ReportType>
      <Role>http://www.xencor.com/role/Disclosure401KPlan</Role>
      <ShortName>401(k) Plan</ShortName>
      <MenuCategory>Notes</MenuCategory>
      <Position>15</Position>
    </Report>
    <Report instance="xncr-20171231.xml">
      <IsDefault>false</IsDefault>
      <HasEmbeddedReports>false</HasEmbeddedReports>
      <HtmlFileName>R16.htm</HtmlFileName>
      <LongName>11001 - Disclosure - Condensed Quarterly Financial Data (unaudited)</LongName>
      <ReportType>Sheet</ReportType>
      <Role>http://www.xencor.com/role/DisclosureCondensedQuarterlyFinancialDataUnaudited</Role>
      <ShortName>Condensed Quarterly Financial Data (unaudited)</ShortName>
      <MenuCategory>Notes</MenuCategory>
      <Position>16</Position>
    </Report>
    <Report instance="xncr-20171231.xml">
      <IsDefault>false</IsDefault>
      <HasEmbeddedReports>false</HasEmbeddedReports>
      <HtmlFileName>R17.htm</HtmlFileName>
      <LongName>20102 - Disclosure - Summary of Significant Accounting Policies (Polices)</LongName>
      <ReportType>Sheet</ReportType>
      <Role>http://www.xencor.com/role/DisclosureSummaryOfSignificantAccountingPoliciesPolices</Role>
      <ShortName>Summary of Significant Accounting Policies (Polices)</ShortName>
      <MenuCategory>Policies</MenuCategory>
      <ParentRole>http://www.xencor.com/role/DisclosureSummaryOfSignificantAccountingPolicies</ParentRole>
      <Position>17</Position>
    </Report>
    <Report instance="xncr-20171231.xml">
      <IsDefault>false</IsDefault>
      <HasEmbeddedReports>false</HasEmbeddedReports>
      <HtmlFileName>R18.htm</HtmlFileName>
      <LongName>30103 - Disclosure - Summary of Significant Accounting Policies (Tables)</LongName>
      <ReportType>Sheet</ReportType>
      <Role>http://www.xencor.com/role/DisclosureSummaryOfSignificantAccountingPoliciesTables</Role>
      <ShortName>Summary of Significant Accounting Policies (Tables)</ShortName>
      <MenuCategory>Tables</MenuCategory>
      <ParentRole>http://www.xencor.com/role/DisclosureSummaryOfSignificantAccountingPolicies</ParentRole>
      <Position>18</Position>
    </Report>
    <Report instance="xncr-20171231.xml">
      <IsDefault>false</IsDefault>
      <HasEmbeddedReports>false</HasEmbeddedReports>
      <HtmlFileName>R19.htm</HtmlFileName>
      <LongName>30303 - Disclosure - Marketable Securities (Tables)</LongName>
      <ReportType>Sheet</ReportType>
      <Role>http://www.xencor.com/role/DisclosureMarketableSecuritiesTables</Role>
      <ShortName>Marketable Securities (Tables)</ShortName>
      <MenuCategory>Tables</MenuCategory>
      <ParentRole>http://www.xencor.com/role/DisclosureMarketableSecurities</ParentRole>
      <Position>19</Position>
    </Report>
    <Report instance="xncr-20171231.xml">
      <IsDefault>false</IsDefault>
      <HasEmbeddedReports>false</HasEmbeddedReports>
      <HtmlFileName>R20.htm</HtmlFileName>
      <LongName>30503 - Disclosure - Property and Equipment (Tables)</LongName>
      <ReportType>Sheet</ReportType>
      <Role>http://www.xencor.com/role/DisclosurePropertyAndEquipmentTables</Role>
      <ShortName>Property and Equipment (Tables)</ShortName>
      <MenuCategory>Tables</MenuCategory>
      <ParentRole>http://www.xencor.com/role/DisclosurePropertyAndEquipment</ParentRole>
      <Position>20</Position>
    </Report>
    <Report instance="xncr-20171231.xml">
      <IsDefault>false</IsDefault>
      <HasEmbeddedReports>false</HasEmbeddedReports>
      <HtmlFileName>R21.htm</HtmlFileName>
      <LongName>30603 - Disclosure - Income Taxes (Tables)</LongName>
      <ReportType>Sheet</ReportType>
      <Role>http://www.xencor.com/role/DisclosureIncomeTaxesTables</Role>
      <ShortName>Income Taxes (Tables)</ShortName>
      <MenuCategory>Tables</MenuCategory>
      <ParentRole>http://www.xencor.com/role/DisclosureIncomeTaxes</ParentRole>
      <Position>21</Position>
    </Report>
    <Report instance="xncr-20171231.xml">
      <IsDefault>false</IsDefault>
      <HasEmbeddedReports>false</HasEmbeddedReports>
      <HtmlFileName>R22.htm</HtmlFileName>
      <LongName>30703 - Disclosure - Stock-Based Compensation (Tables)</LongName>
      <ReportType>Sheet</ReportType>
      <Role>http://www.xencor.com/role/DisclosureStockBasedCompensationTables</Role>
      <ShortName>Stock-Based Compensation (Tables)</ShortName>
      <MenuCategory>Tables</MenuCategory>
      <ParentRole>http://www.xencor.com/role/DisclosureStockBasedCompensation</ParentRole>
      <Position>22</Position>
    </Report>
    <Report instance="xncr-20171231.xml">
      <IsDefault>false</IsDefault>
      <HasEmbeddedReports>false</HasEmbeddedReports>
      <HtmlFileName>R23.htm</HtmlFileName>
      <LongName>30803 - Disclosure - Commitments and Contingencies (Tables)</LongName>
      <ReportType>Sheet</ReportType>
      <Role>http://www.xencor.com/role/DisclosureCommitmentsAndContingenciesTables</Role>
      <ShortName>Commitments and Contingencies (Tables)</ShortName>
      <MenuCategory>Tables</MenuCategory>
      <ParentRole>http://www.xencor.com/role/DisclosureCommitmentsAndContingencies</ParentRole>
      <Position>23</Position>
    </Report>
    <Report instance="xncr-20171231.xml">
      <IsDefault>false</IsDefault>
      <HasEmbeddedReports>false</HasEmbeddedReports>
      <HtmlFileName>R24.htm</HtmlFileName>
      <LongName>31003 - Disclosure - Condensed Quarterly Financial Data (unaudited) (Tables)</LongName>
      <ReportType>Sheet</ReportType>
      <Role>http://www.xencor.com/role/DisclosureCondensedQuarterlyFinancialDataUnauditedTables</Role>
      <ShortName>Condensed Quarterly Financial Data (unaudited) (Tables)</ShortName>
      <MenuCategory>Tables</MenuCategory>
      <ParentRole>http://www.xencor.com/role/DisclosureCondensedQuarterlyFinancialDataUnaudited</ParentRole>
      <Position>24</Position>
    </Report>
    <Report instance="xncr-20171231.xml">
      <IsDefault>false</IsDefault>
      <HasEmbeddedReports>false</HasEmbeddedReports>
      <HtmlFileName>R25.htm</HtmlFileName>
      <LongName>40101 - Disclosure - Summary of Significant Accounting Policies (Details)</LongName>
      <ReportType>Sheet</ReportType>
      <Role>http://www.xencor.com/role/DisclosureSummaryOfSignificantAccountingPoliciesDetails</Role>
      <ShortName>Summary of Significant Accounting Policies (Details)</ShortName>
      <MenuCategory>Details</MenuCategory>
      <ParentRole>http://www.xencor.com/role/DisclosureSummaryOfSignificantAccountingPoliciesTables</ParentRole>
      <Position>25</Position>
    </Report>
    <Report instance="xncr-20171231.xml">
      <IsDefault>false</IsDefault>
      <HasEmbeddedReports>false</HasEmbeddedReports>
      <HtmlFileName>R26.htm</HtmlFileName>
      <LongName>40102 - Disclosure - Summary of Significant Accounting Policies - Collaborative Research and Licensing Agreement (Details)</LongName>
      <ReportType>Sheet</ReportType>
      <Role>http://www.xencor.com/role/DisclosureSummaryOfSignificantAccountingPoliciesCollaborativeResearchAndLicensingAgreementDetails</Role>
      <ShortName>Summary of Significant Accounting Policies - Collaborative Research and Licensing Agreement (Details)</ShortName>
      <MenuCategory>Details</MenuCategory>
      <Position>26</Position>
    </Report>
    <Report instance="xncr-20171231.xml">
      <IsDefault>false</IsDefault>
      <HasEmbeddedReports>false</HasEmbeddedReports>
      <HtmlFileName>R27.htm</HtmlFileName>
      <LongName>40103 - Disclosure - Summary of Significant Accounting Policies - Collaborative Research and Licensing Agreements - Revenue Recognition (Details)</LongName>
      <ReportType>Sheet</ReportType>
      <Role>http://www.xencor.com/role/DisclosureSummaryOfSignificantAccountingPoliciesCollaborativeResearchAndLicensingAgreementsRevenueRecognitionDetails</Role>
      <ShortName>Summary of Significant Accounting Policies - Collaborative Research and Licensing Agreements - Revenue Recognition (Details)</ShortName>
      <MenuCategory>Details</MenuCategory>
      <Position>27</Position>
    </Report>
    <Report instance="xncr-20171231.xml">
      <IsDefault>false</IsDefault>
      <HasEmbeddedReports>false</HasEmbeddedReports>
      <HtmlFileName>R28.htm</HtmlFileName>
      <LongName>40104 - Disclosure - Summary of Significant Accounting Policies - Concentration Risk (Details)</LongName>
      <ReportType>Sheet</ReportType>
      <Role>http://www.xencor.com/role/DisclosureSummaryOfSignificantAccountingPoliciesConcentrationRiskDetails</Role>
      <ShortName>Summary of Significant Accounting Policies - Concentration Risk (Details)</ShortName>
      <MenuCategory>Details</MenuCategory>
      <Position>28</Position>
    </Report>
    <Report instance="xncr-20171231.xml">
      <IsDefault>false</IsDefault>
      <HasEmbeddedReports>false</HasEmbeddedReports>
      <HtmlFileName>R29.htm</HtmlFileName>
      <LongName>40105 - Disclosure - Summary of Significant Accounting Policies - Fair Value (Details)</LongName>
      <ReportType>Sheet</ReportType>
      <Role>http://www.xencor.com/role/DisclosureSummaryOfSignificantAccountingPoliciesFairValueDetails</Role>
      <ShortName>Summary of Significant Accounting Policies - Fair Value (Details)</ShortName>
      <MenuCategory>Details</MenuCategory>
      <Position>29</Position>
    </Report>
    <Report instance="xncr-20171231.xml">
      <IsDefault>false</IsDefault>
      <HasEmbeddedReports>false</HasEmbeddedReports>
      <HtmlFileName>R30.htm</HtmlFileName>
      <LongName>40106 - Disclosure - Summary of Significant Accounting Policies - Property, Plant, and Equipment (Details)</LongName>
      <ReportType>Sheet</ReportType>
      <Role>http://www.xencor.com/role/DisclosureSummaryOfSignificantAccountingPoliciesPropertyPlantAndEquipmentDetails</Role>
      <ShortName>Summary of Significant Accounting Policies - Property, Plant, and Equipment (Details)</ShortName>
      <MenuCategory>Details</MenuCategory>
      <Position>30</Position>
    </Report>
    <Report instance="xncr-20171231.xml">
      <IsDefault>false</IsDefault>
      <HasEmbeddedReports>false</HasEmbeddedReports>
      <HtmlFileName>R31.htm</HtmlFileName>
      <LongName>40107 - Disclosure - Summary of Significant Accounting Policies - Intangibles (Details)</LongName>
      <ReportType>Sheet</ReportType>
      <Role>http://www.xencor.com/role/DisclosureSummaryOfSignificantAccountingPoliciesIntangiblesDetails</Role>
      <ShortName>Summary of Significant Accounting Policies - Intangibles (Details)</ShortName>
      <MenuCategory>Details</MenuCategory>
      <Position>31</Position>
    </Report>
    <Report instance="xncr-20171231.xml">
      <IsDefault>false</IsDefault>
      <HasEmbeddedReports>false</HasEmbeddedReports>
      <HtmlFileName>R32.htm</HtmlFileName>
      <LongName>40108 - Disclosure - Summary of Significant Accounting Policies - Income Taxes (Details)</LongName>
      <ReportType>Sheet</ReportType>
      <Role>http://www.xencor.com/role/DisclosureSummaryOfSignificantAccountingPoliciesIncomeTaxesDetails</Role>
      <ShortName>Summary of Significant Accounting Policies - Income Taxes (Details)</ShortName>
      <MenuCategory>Details</MenuCategory>
      <Position>32</Position>
    </Report>
    <Report instance="xncr-20171231.xml">
      <IsDefault>false</IsDefault>
      <HasEmbeddedReports>false</HasEmbeddedReports>
      <HtmlFileName>R33.htm</HtmlFileName>
      <LongName>40109 - Disclosure - Summary of Significant Accounting Policies - Net Loss Per Share (Details)</LongName>
      <ReportType>Sheet</ReportType>
      <Role>http://www.xencor.com/role/DisclosureSummaryOfSignificantAccountingPoliciesNetLossPerShareDetails</Role>
      <ShortName>Summary of Significant Accounting Policies - Net Loss Per Share (Details)</ShortName>
      <MenuCategory>Details</MenuCategory>
      <Position>33</Position>
    </Report>
    <Report instance="xncr-20171231.xml">
      <IsDefault>false</IsDefault>
      <HasEmbeddedReports>false</HasEmbeddedReports>
      <HtmlFileName>R34.htm</HtmlFileName>
      <LongName>40110 - Disclosure - Summary of Significant Accounting Policies - Segments (Details)</LongName>
      <ReportType>Sheet</ReportType>
      <Role>http://www.xencor.com/role/DisclosureSummaryOfSignificantAccountingPoliciesSegmentsDetails</Role>
      <ShortName>Summary of Significant Accounting Policies - Segments (Details)</ShortName>
      <MenuCategory>Details</MenuCategory>
      <Position>34</Position>
    </Report>
    <Report instance="xncr-20171231.xml">
      <IsDefault>false</IsDefault>
      <HasEmbeddedReports>false</HasEmbeddedReports>
      <HtmlFileName>R35.htm</HtmlFileName>
      <LongName>40301 - Disclosure - Marketable Securities (Details)</LongName>
      <ReportType>Sheet</ReportType>
      <Role>http://www.xencor.com/role/DisclosureMarketableSecuritiesDetails</Role>
      <ShortName>Marketable Securities (Details)</ShortName>
      <MenuCategory>Details</MenuCategory>
      <ParentRole>http://www.xencor.com/role/DisclosureMarketableSecuritiesTables</ParentRole>
      <Position>35</Position>
    </Report>
    <Report instance="xncr-20171231.xml">
      <IsDefault>false</IsDefault>
      <HasEmbeddedReports>false</HasEmbeddedReports>
      <HtmlFileName>R36.htm</HtmlFileName>
      <LongName>40302 - Disclosure - Marketable Securities - Maturities (Details)</LongName>
      <ReportType>Sheet</ReportType>
      <Role>http://www.xencor.com/role/DisclosureMarketableSecuritiesMaturitiesDetails</Role>
      <ShortName>Marketable Securities - Maturities (Details)</ShortName>
      <MenuCategory>Details</MenuCategory>
      <Position>36</Position>
    </Report>
    <Report instance="xncr-20171231.xml">
      <IsDefault>false</IsDefault>
      <HasEmbeddedReports>false</HasEmbeddedReports>
      <HtmlFileName>R37.htm</HtmlFileName>
      <LongName>40303 - Disclosure - Marketable Securities - Unrealized losses (Details)</LongName>
      <ReportType>Sheet</ReportType>
      <Role>http://www.xencor.com/role/DisclosureMarketableSecuritiesUnrealizedLossesDetails</Role>
      <ShortName>Marketable Securities - Unrealized losses (Details)</ShortName>
      <MenuCategory>Details</MenuCategory>
      <Position>37</Position>
    </Report>
    <Report instance="xncr-20171231.xml">
      <IsDefault>false</IsDefault>
      <HasEmbeddedReports>false</HasEmbeddedReports>
      <HtmlFileName>R38.htm</HtmlFileName>
      <LongName>40401 - Disclosure - Sale of Additional Common Stock (Details)</LongName>
      <ReportType>Sheet</ReportType>
      <Role>http://www.xencor.com/role/DisclosureSaleOfAdditionalCommonStockDetails</Role>
      <ShortName>Sale of Additional Common Stock (Details)</ShortName>
      <MenuCategory>Details</MenuCategory>
      <ParentRole>http://www.xencor.com/role/DisclosureSaleOfAdditionalCommonStock</ParentRole>
      <Position>38</Position>
    </Report>
    <Report instance="xncr-20171231.xml">
      <IsDefault>false</IsDefault>
      <HasEmbeddedReports>false</HasEmbeddedReports>
      <HtmlFileName>R39.htm</HtmlFileName>
      <LongName>40501 - Disclosure - Property and Equipment (Details)</LongName>
      <ReportType>Sheet</ReportType>
      <Role>http://www.xencor.com/role/DisclosurePropertyAndEquipmentDetails</Role>
      <ShortName>Property and Equipment (Details)</ShortName>
      <MenuCategory>Details</MenuCategory>
      <ParentRole>http://www.xencor.com/role/DisclosurePropertyAndEquipmentTables</ParentRole>
      <Position>39</Position>
    </Report>
    <Report instance="xncr-20171231.xml">
      <IsDefault>false</IsDefault>
      <HasEmbeddedReports>false</HasEmbeddedReports>
      <HtmlFileName>R40.htm</HtmlFileName>
      <LongName>40601 - Disclosure - Income Taxes - Reconciliation (Details)</LongName>
      <ReportType>Sheet</ReportType>
      <Role>http://www.xencor.com/role/DisclosureIncomeTaxesReconciliationDetails</Role>
      <ShortName>Income Taxes - Reconciliation (Details)</ShortName>
      <MenuCategory>Details</MenuCategory>
      <Position>40</Position>
    </Report>
    <Report instance="xncr-20171231.xml">
      <IsDefault>false</IsDefault>
      <HasEmbeddedReports>false</HasEmbeddedReports>
      <HtmlFileName>R41.htm</HtmlFileName>
      <LongName>40602 - Disclosure - Income Taxes - Deferred tax assets and liabilities (Details)</LongName>
      <ReportType>Sheet</ReportType>
      <Role>http://www.xencor.com/role/DisclosureIncomeTaxesDeferredTaxAssetsAndLiabilitiesDetails</Role>
      <ShortName>Income Taxes - Deferred tax assets and liabilities (Details)</ShortName>
      <MenuCategory>Details</MenuCategory>
      <Position>41</Position>
    </Report>
    <Report instance="xncr-20171231.xml">
      <IsDefault>false</IsDefault>
      <HasEmbeddedReports>false</HasEmbeddedReports>
      <HtmlFileName>R42.htm</HtmlFileName>
      <LongName>40603 - Disclosure - Income Taxes - TCJA and Net operating loss carryforwards (Details)</LongName>
      <ReportType>Sheet</ReportType>
      <Role>http://www.xencor.com/role/DisclosureIncomeTaxesTcjaAndNetOperatingLossCarryforwardsDetails</Role>
      <ShortName>Income Taxes - TCJA and Net operating loss carryforwards (Details)</ShortName>
      <MenuCategory>Details</MenuCategory>
      <Position>42</Position>
    </Report>
    <Report instance="xncr-20171231.xml">
      <IsDefault>false</IsDefault>
      <HasEmbeddedReports>false</HasEmbeddedReports>
      <HtmlFileName>R43.htm</HtmlFileName>
      <LongName>40701 - Disclosure - Stock-Based Compensation - Plan details (Details)</LongName>
      <ReportType>Sheet</ReportType>
      <Role>http://www.xencor.com/role/DisclosureStockBasedCompensationPlanDetailsDetails</Role>
      <ShortName>Stock-Based Compensation - Plan details (Details)</ShortName>
      <MenuCategory>Details</MenuCategory>
      <Position>43</Position>
    </Report>
    <Report instance="xncr-20171231.xml">
      <IsDefault>false</IsDefault>
      <HasEmbeddedReports>false</HasEmbeddedReports>
      <HtmlFileName>R44.htm</HtmlFileName>
      <LongName>40702 - Disclosure - Stock-Based Compensation - Stock Option Activity (Details)</LongName>
      <ReportType>Sheet</ReportType>
      <Role>http://www.xencor.com/role/DisclosureStockBasedCompensationStockOptionActivityDetails</Role>
      <ShortName>Stock-Based Compensation - Stock Option Activity (Details)</ShortName>
      <MenuCategory>Details</MenuCategory>
      <Position>44</Position>
    </Report>
    <Report instance="xncr-20171231.xml">
      <IsDefault>false</IsDefault>
      <HasEmbeddedReports>false</HasEmbeddedReports>
      <HtmlFileName>R45.htm</HtmlFileName>
      <LongName>40703 - Disclosure - Stock-Based Compensation - Options by exercise price (Details)</LongName>
      <ReportType>Sheet</ReportType>
      <Role>http://www.xencor.com/role/DisclosureStockBasedCompensationOptionsByExercisePriceDetails</Role>
      <ShortName>Stock-Based Compensation - Options by exercise price (Details)</ShortName>
      <MenuCategory>Details</MenuCategory>
      <Position>45</Position>
    </Report>
    <Report instance="xncr-20171231.xml">
      <IsDefault>false</IsDefault>
      <HasEmbeddedReports>false</HasEmbeddedReports>
      <HtmlFileName>R46.htm</HtmlFileName>
      <LongName>40704 - Disclosure - Stock-Based Compensation - FV of employee stock options (Details)</LongName>
      <ReportType>Sheet</ReportType>
      <Role>http://www.xencor.com/role/DisclosureStockBasedCompensationFvOfEmployeeStockOptionsDetails</Role>
      <ShortName>Stock-Based Compensation - FV of employee stock options (Details)</ShortName>
      <MenuCategory>Details</MenuCategory>
      <Position>46</Position>
    </Report>
    <Report instance="xncr-20171231.xml">
      <IsDefault>false</IsDefault>
      <HasEmbeddedReports>false</HasEmbeddedReports>
      <HtmlFileName>R47.htm</HtmlFileName>
      <LongName>40705 - Disclosure - Stock-Based Compensation - Employee expense (Details)</LongName>
      <ReportType>Sheet</ReportType>
      <Role>http://www.xencor.com/role/DisclosureStockBasedCompensationEmployeeExpenseDetails</Role>
      <ShortName>Stock-Based Compensation - Employee expense (Details)</ShortName>
      <MenuCategory>Details</MenuCategory>
      <Position>47</Position>
    </Report>
    <Report instance="xncr-20171231.xml">
      <IsDefault>false</IsDefault>
      <HasEmbeddedReports>false</HasEmbeddedReports>
      <HtmlFileName>R48.htm</HtmlFileName>
      <LongName>40801 - Disclosure - Commitments and Contingencies (Details)</LongName>
      <ReportType>Sheet</ReportType>
      <Role>http://www.xencor.com/role/DisclosureCommitmentsAndContingenciesDetails</Role>
      <ShortName>Commitments and Contingencies (Details)</ShortName>
      <MenuCategory>Details</MenuCategory>
      <ParentRole>http://www.xencor.com/role/DisclosureCommitmentsAndContingenciesTables</ParentRole>
      <Position>48</Position>
    </Report>
    <Report instance="xncr-20171231.xml">
      <IsDefault>false</IsDefault>
      <HasEmbeddedReports>false</HasEmbeddedReports>
      <HtmlFileName>R49.htm</HtmlFileName>
      <LongName>40802 - Disclosure - Commitments and Contingencies - Litigation (Details)</LongName>
      <ReportType>Sheet</ReportType>
      <Role>http://www.xencor.com/role/DisclosureCommitmentsAndContingenciesLitigationDetails</Role>
      <ShortName>Commitments and Contingencies - Litigation (Details)</ShortName>
      <MenuCategory>Details</MenuCategory>
      <Position>49</Position>
    </Report>
    <Report instance="xncr-20171231.xml">
      <IsDefault>false</IsDefault>
      <HasEmbeddedReports>false</HasEmbeddedReports>
      <HtmlFileName>R50.htm</HtmlFileName>
      <LongName>40901 - Disclosure - 401(k) Plan (Details)</LongName>
      <ReportType>Sheet</ReportType>
      <Role>http://www.xencor.com/role/Disclosure401KPlanDetails</Role>
      <ShortName>401(k) Plan (Details)</ShortName>
      <MenuCategory>Details</MenuCategory>
      <ParentRole>http://www.xencor.com/role/Disclosure401KPlan</ParentRole>
      <Position>50</Position>
    </Report>
    <Report instance="xncr-20171231.xml">
      <IsDefault>false</IsDefault>
      <HasEmbeddedReports>false</HasEmbeddedReports>
      <HtmlFileName>R51.htm</HtmlFileName>
      <LongName>41001 - Disclosure - Condensed Quarterly Financial Data (unaudited) (Details)</LongName>
      <ReportType>Sheet</ReportType>
      <Role>http://www.xencor.com/role/DisclosureCondensedQuarterlyFinancialDataUnauditedDetails</Role>
      <ShortName>Condensed Quarterly Financial Data (unaudited) (Details)</ShortName>
      <MenuCategory>Details</MenuCategory>
      <ParentRole>http://www.xencor.com/role/DisclosureCondensedQuarterlyFinancialDataUnauditedTables</ParentRole>
      <Position>51</Position>
    </Report>
    <Report>
      <IsDefault>false</IsDefault>
      <HasEmbeddedReports>false</HasEmbeddedReports>
      <LongName>All Reports</LongName>
      <ReportType>Book</ReportType>
      <ShortName>All Reports</ShortName>
    </Report>
  </MyReports>
  <InputFiles>
    <File>xncr-20171231.xml</File>
    <File>xncr-20171231.xsd</File>
    <File>xncr-20171231_cal.xml</File>
    <File>xncr-20171231_def.xml</File>
    <File>xncr-20171231_lab.xml</File>
    <File>xncr-20171231_pre.xml</File>
  </InputFiles>
  <SupplementalFiles/>
  <BaseTaxonomies>
    <BaseTaxonomy>http://fasb.org/us-gaap/2017-01-31</BaseTaxonomy>
    <BaseTaxonomy>http://xbrl.sec.gov/dei/2014-01-31</BaseTaxonomy>
    <BaseTaxonomy>http://xbrl.sec.gov/country/2017-01-31</BaseTaxonomy>
  </BaseTaxonomies>
  <HasPresentationLinkbase>true</HasPresentationLinkbase>
  <HasCalculationLinkbase>true</HasCalculationLinkbase>
</FilingSummary>
