<?xml version='1.0' encoding='utf-8'?>
<FilingSummary>
  <Version>3.25.3</Version>
  <ProcessingTime/>
  <ReportFormat>html</ReportFormat>
  <ContextCount>230</ContextCount>
  <ElementCount>300</ElementCount>
  <EntityCount>1</EntityCount>
  <FootnotesReported>true</FootnotesReported>
  <SegmentCount>71</SegmentCount>
  <ScenarioCount>0</ScenarioCount>
  <TuplesReported>false</TuplesReported>
  <UnitCount>4</UnitCount>
  <MyReports>
    <Report instance="xers-20250930.htm">
      <IsDefault>false</IsDefault>
      <HasEmbeddedReports>false</HasEmbeddedReports>
      <HtmlFileName>R1.htm</HtmlFileName>
      <LongName>0000001 - Document - Cover</LongName>
      <ReportType>Sheet</ReportType>
      <Role>http://www.xerispharma.com/role/Cover</Role>
      <ShortName>Cover</ShortName>
      <MenuCategory>Cover</MenuCategory>
      <Position>1</Position>
    </Report>
    <Report instance="xers-20250930.htm">
      <IsDefault>false</IsDefault>
      <HasEmbeddedReports>false</HasEmbeddedReports>
      <HtmlFileName>R2.htm</HtmlFileName>
      <LongName>9952151 - Statement - Consolidated Balance Sheets</LongName>
      <ReportType>Sheet</ReportType>
      <Role>http://www.xerispharma.com/role/ConsolidatedBalanceSheets</Role>
      <ShortName>Consolidated Balance Sheets</ShortName>
      <MenuCategory>Statements</MenuCategory>
      <Position>2</Position>
    </Report>
    <Report instance="xers-20250930.htm">
      <IsDefault>false</IsDefault>
      <HasEmbeddedReports>false</HasEmbeddedReports>
      <HtmlFileName>R3.htm</HtmlFileName>
      <LongName>9952152 - Statement - Condensed Consolidated Balance Sheets (Parenthetical)</LongName>
      <ReportType>Sheet</ReportType>
      <Role>http://www.xerispharma.com/role/CondensedConsolidatedBalanceSheetsParenthetical</Role>
      <ShortName>Condensed Consolidated Balance Sheets (Parenthetical)</ShortName>
      <MenuCategory>Statements</MenuCategory>
      <Position>3</Position>
    </Report>
    <Report instance="xers-20250930.htm">
      <IsDefault>false</IsDefault>
      <HasEmbeddedReports>false</HasEmbeddedReports>
      <HtmlFileName>R4.htm</HtmlFileName>
      <LongName>9952153 - Statement - Consolidated Statements of Operations and Comprehensive Loss</LongName>
      <ReportType>Sheet</ReportType>
      <Role>http://www.xerispharma.com/role/ConsolidatedStatementsofOperationsandComprehensiveLoss</Role>
      <ShortName>Consolidated Statements of Operations and Comprehensive Loss</ShortName>
      <MenuCategory>Statements</MenuCategory>
      <Position>4</Position>
    </Report>
    <Report instance="xers-20250930.htm">
      <IsDefault>false</IsDefault>
      <HasEmbeddedReports>false</HasEmbeddedReports>
      <HtmlFileName>R5.htm</HtmlFileName>
      <LongName>9952154 - Statement - Statements of Stockholders' Equity</LongName>
      <ReportType>Sheet</ReportType>
      <Role>http://www.xerispharma.com/role/StatementsofStockholdersEquity</Role>
      <ShortName>Statements of Stockholders' Equity</ShortName>
      <MenuCategory>Statements</MenuCategory>
      <Position>5</Position>
    </Report>
    <Report instance="xers-20250930.htm">
      <IsDefault>false</IsDefault>
      <HasEmbeddedReports>false</HasEmbeddedReports>
      <HtmlFileName>R6.htm</HtmlFileName>
      <LongName>9952155 - Statement - Consolidated Statement of Cash Flows</LongName>
      <ReportType>Sheet</ReportType>
      <Role>http://www.xerispharma.com/role/ConsolidatedStatementofCashFlows</Role>
      <ShortName>Consolidated Statement of Cash Flows</ShortName>
      <MenuCategory>Statements</MenuCategory>
      <Position>6</Position>
    </Report>
    <Report instance="xers-20250930.htm">
      <IsDefault>false</IsDefault>
      <HasEmbeddedReports>false</HasEmbeddedReports>
      <HtmlFileName>R7.htm</HtmlFileName>
      <LongName>9952156 - Statement - Statements of Stockholders' Equity (Parenthetical)</LongName>
      <ReportType>Sheet</ReportType>
      <Role>http://www.xerispharma.com/role/StatementsofStockholdersEquityParenthetical</Role>
      <ShortName>Statements of Stockholders' Equity (Parenthetical)</ShortName>
      <MenuCategory>Statements</MenuCategory>
      <Position>7</Position>
    </Report>
    <Report instance="xers-20250930.htm">
      <IsDefault>false</IsDefault>
      <HasEmbeddedReports>false</HasEmbeddedReports>
      <HtmlFileName>R8.htm</HtmlFileName>
      <LongName>9952157 - Disclosure - Organization and Business</LongName>
      <ReportType>Sheet</ReportType>
      <Role>http://www.xerispharma.com/role/OrganizationandBusiness</Role>
      <ShortName>Organization and Business</ShortName>
      <MenuCategory>Notes</MenuCategory>
      <Position>8</Position>
    </Report>
    <Report instance="xers-20250930.htm">
      <IsDefault>false</IsDefault>
      <HasEmbeddedReports>false</HasEmbeddedReports>
      <HtmlFileName>R9.htm</HtmlFileName>
      <LongName>9952158 - Disclosure - Basis of Presentation and Summary of Significant Accounting Policies and Estimates</LongName>
      <ReportType>Sheet</ReportType>
      <Role>http://www.xerispharma.com/role/BasisofPresentationandSummaryofSignificantAccountingPoliciesandEstimates</Role>
      <ShortName>Basis of Presentation and Summary of Significant Accounting Policies and Estimates</ShortName>
      <MenuCategory>Notes</MenuCategory>
      <Position>9</Position>
    </Report>
    <Report instance="xers-20250930.htm">
      <IsDefault>false</IsDefault>
      <HasEmbeddedReports>false</HasEmbeddedReports>
      <HtmlFileName>R10.htm</HtmlFileName>
      <LongName>9952159 - Disclosure - Disaggregated Revenue</LongName>
      <ReportType>Sheet</ReportType>
      <Role>http://www.xerispharma.com/role/DisaggregatedRevenue</Role>
      <ShortName>Disaggregated Revenue</ShortName>
      <MenuCategory>Notes</MenuCategory>
      <Position>10</Position>
    </Report>
    <Report instance="xers-20250930.htm">
      <IsDefault>false</IsDefault>
      <HasEmbeddedReports>false</HasEmbeddedReports>
      <HtmlFileName>R11.htm</HtmlFileName>
      <LongName>9952160 - Disclosure - Inventory</LongName>
      <ReportType>Sheet</ReportType>
      <Role>http://www.xerispharma.com/role/Inventory</Role>
      <ShortName>Inventory</ShortName>
      <MenuCategory>Notes</MenuCategory>
      <Position>11</Position>
    </Report>
    <Report instance="xers-20250930.htm">
      <IsDefault>false</IsDefault>
      <HasEmbeddedReports>false</HasEmbeddedReports>
      <HtmlFileName>R12.htm</HtmlFileName>
      <LongName>9952161 - Disclosure - Property and Equipment</LongName>
      <ReportType>Sheet</ReportType>
      <Role>http://www.xerispharma.com/role/PropertyandEquipment</Role>
      <ShortName>Property and Equipment</ShortName>
      <MenuCategory>Notes</MenuCategory>
      <Position>12</Position>
    </Report>
    <Report instance="xers-20250930.htm">
      <IsDefault>false</IsDefault>
      <HasEmbeddedReports>false</HasEmbeddedReports>
      <HtmlFileName>R13.htm</HtmlFileName>
      <LongName>9952162 - Disclosure - Intangible Assets</LongName>
      <ReportType>Sheet</ReportType>
      <Role>http://www.xerispharma.com/role/IntangibleAssets</Role>
      <ShortName>Intangible Assets</ShortName>
      <MenuCategory>Notes</MenuCategory>
      <Position>13</Position>
    </Report>
    <Report instance="xers-20250930.htm">
      <IsDefault>false</IsDefault>
      <HasEmbeddedReports>false</HasEmbeddedReports>
      <HtmlFileName>R14.htm</HtmlFileName>
      <LongName>9952163 - Disclosure - Other Accrued Liabilities</LongName>
      <ReportType>Sheet</ReportType>
      <Role>http://www.xerispharma.com/role/OtherAccruedLiabilities</Role>
      <ShortName>Other Accrued Liabilities</ShortName>
      <MenuCategory>Notes</MenuCategory>
      <Position>14</Position>
    </Report>
    <Report instance="xers-20250930.htm">
      <IsDefault>false</IsDefault>
      <HasEmbeddedReports>false</HasEmbeddedReports>
      <HtmlFileName>R15.htm</HtmlFileName>
      <LongName>9952164 - Disclosure - Debt</LongName>
      <ReportType>Sheet</ReportType>
      <Role>http://www.xerispharma.com/role/Debt</Role>
      <ShortName>Debt</ShortName>
      <MenuCategory>Notes</MenuCategory>
      <Position>15</Position>
    </Report>
    <Report instance="xers-20250930.htm">
      <IsDefault>false</IsDefault>
      <HasEmbeddedReports>false</HasEmbeddedReports>
      <HtmlFileName>R16.htm</HtmlFileName>
      <LongName>9952165 - Disclosure - Warrants</LongName>
      <ReportType>Sheet</ReportType>
      <Role>http://www.xerispharma.com/role/Warrants</Role>
      <ShortName>Warrants</ShortName>
      <MenuCategory>Notes</MenuCategory>
      <Position>16</Position>
    </Report>
    <Report instance="xers-20250930.htm">
      <IsDefault>false</IsDefault>
      <HasEmbeddedReports>false</HasEmbeddedReports>
      <HtmlFileName>R17.htm</HtmlFileName>
      <LongName>9952166 - Disclosure - Fair Value Measurements</LongName>
      <ReportType>Sheet</ReportType>
      <Role>http://www.xerispharma.com/role/FairValueMeasurements</Role>
      <ShortName>Fair Value Measurements</ShortName>
      <MenuCategory>Notes</MenuCategory>
      <Position>17</Position>
    </Report>
    <Report instance="xers-20250930.htm">
      <IsDefault>false</IsDefault>
      <HasEmbeddedReports>false</HasEmbeddedReports>
      <HtmlFileName>R18.htm</HtmlFileName>
      <LongName>9952167 - Disclosure - Stock Compensation Plan</LongName>
      <ReportType>Sheet</ReportType>
      <Role>http://www.xerispharma.com/role/StockCompensationPlan</Role>
      <ShortName>Stock Compensation Plan</ShortName>
      <MenuCategory>Notes</MenuCategory>
      <Position>18</Position>
    </Report>
    <Report instance="xers-20250930.htm">
      <IsDefault>false</IsDefault>
      <HasEmbeddedReports>false</HasEmbeddedReports>
      <HtmlFileName>R19.htm</HtmlFileName>
      <LongName>9952168 - Disclosure - Leases</LongName>
      <ReportType>Sheet</ReportType>
      <Role>http://www.xerispharma.com/role/Leases</Role>
      <ShortName>Leases</ShortName>
      <MenuCategory>Notes</MenuCategory>
      <Position>19</Position>
    </Report>
    <Report instance="xers-20250930.htm">
      <IsDefault>false</IsDefault>
      <HasEmbeddedReports>false</HasEmbeddedReports>
      <HtmlFileName>R20.htm</HtmlFileName>
      <LongName>9952169 - Disclosure - Commitments and Contingencies</LongName>
      <ReportType>Sheet</ReportType>
      <Role>http://www.xerispharma.com/role/CommitmentsandContingencies</Role>
      <ShortName>Commitments and Contingencies</ShortName>
      <MenuCategory>Notes</MenuCategory>
      <Position>20</Position>
    </Report>
    <Report instance="xers-20250930.htm">
      <IsDefault>false</IsDefault>
      <HasEmbeddedReports>false</HasEmbeddedReports>
      <HtmlFileName>R21.htm</HtmlFileName>
      <LongName>9952170 - Disclosure - Net Loss Per Common Share</LongName>
      <ReportType>Sheet</ReportType>
      <Role>http://www.xerispharma.com/role/NetLossPerCommonShare</Role>
      <ShortName>Net Loss Per Common Share</ShortName>
      <MenuCategory>Notes</MenuCategory>
      <Position>21</Position>
    </Report>
    <Report instance="xers-20250930.htm">
      <IsDefault>false</IsDefault>
      <HasEmbeddedReports>false</HasEmbeddedReports>
      <HtmlFileName>R22.htm</HtmlFileName>
      <LongName>9952171 - Disclosure - Segment Reporting</LongName>
      <ReportType>Sheet</ReportType>
      <Role>http://www.xerispharma.com/role/SegmentReporting</Role>
      <ShortName>Segment Reporting</ShortName>
      <MenuCategory>Notes</MenuCategory>
      <Position>22</Position>
    </Report>
    <Report instance="xers-20250930.htm">
      <IsDefault>false</IsDefault>
      <HasEmbeddedReports>false</HasEmbeddedReports>
      <HtmlFileName>R23.htm</HtmlFileName>
      <LongName>995445 - Disclosure - Insider Trading Arrangements</LongName>
      <ReportType>Sheet</ReportType>
      <Role>http://xbrl.sec.gov/ecd/role/InsiderTradingArrangements</Role>
      <ShortName>Insider Trading Arrangements</ShortName>
      <MenuCategory>Notes</MenuCategory>
      <Position>23</Position>
    </Report>
    <Report instance="xers-20250930.htm">
      <IsDefault>false</IsDefault>
      <HasEmbeddedReports>false</HasEmbeddedReports>
      <HtmlFileName>R24.htm</HtmlFileName>
      <LongName>9955511 - Disclosure - Basis of Presentation and Summary of Significant Accounting Policies and Estimates (Policies)</LongName>
      <ReportType>Sheet</ReportType>
      <Role>http://www.xerispharma.com/role/BasisofPresentationandSummaryofSignificantAccountingPoliciesandEstimatesPolicies</Role>
      <ShortName>Basis of Presentation and Summary of Significant Accounting Policies and Estimates (Policies)</ShortName>
      <MenuCategory>Policies</MenuCategory>
      <ParentRole>http://www.xerispharma.com/role/BasisofPresentationandSummaryofSignificantAccountingPoliciesandEstimates</ParentRole>
      <Position>24</Position>
    </Report>
    <Report instance="xers-20250930.htm">
      <IsDefault>false</IsDefault>
      <HasEmbeddedReports>false</HasEmbeddedReports>
      <HtmlFileName>R25.htm</HtmlFileName>
      <LongName>9955512 - Disclosure - Basis of Presentation and Summary of Significant Accounting Policies and Estimates (Tables)</LongName>
      <ReportType>Sheet</ReportType>
      <Role>http://www.xerispharma.com/role/BasisofPresentationandSummaryofSignificantAccountingPoliciesandEstimatesTables</Role>
      <ShortName>Basis of Presentation and Summary of Significant Accounting Policies and Estimates (Tables)</ShortName>
      <MenuCategory>Tables</MenuCategory>
      <ParentRole>http://www.xerispharma.com/role/BasisofPresentationandSummaryofSignificantAccountingPoliciesandEstimates</ParentRole>
      <Position>25</Position>
    </Report>
    <Report instance="xers-20250930.htm">
      <IsDefault>false</IsDefault>
      <HasEmbeddedReports>false</HasEmbeddedReports>
      <HtmlFileName>R26.htm</HtmlFileName>
      <LongName>9955513 - Disclosure - Disaggregated Revenue (Tables)</LongName>
      <ReportType>Sheet</ReportType>
      <Role>http://www.xerispharma.com/role/DisaggregatedRevenueTables</Role>
      <ShortName>Disaggregated Revenue (Tables)</ShortName>
      <MenuCategory>Tables</MenuCategory>
      <ParentRole>http://www.xerispharma.com/role/DisaggregatedRevenue</ParentRole>
      <Position>26</Position>
    </Report>
    <Report instance="xers-20250930.htm">
      <IsDefault>false</IsDefault>
      <HasEmbeddedReports>false</HasEmbeddedReports>
      <HtmlFileName>R27.htm</HtmlFileName>
      <LongName>9955514 - Disclosure - Inventory (Tables)</LongName>
      <ReportType>Sheet</ReportType>
      <Role>http://www.xerispharma.com/role/InventoryTables</Role>
      <ShortName>Inventory (Tables)</ShortName>
      <MenuCategory>Tables</MenuCategory>
      <ParentRole>http://www.xerispharma.com/role/Inventory</ParentRole>
      <Position>27</Position>
    </Report>
    <Report instance="xers-20250930.htm">
      <IsDefault>false</IsDefault>
      <HasEmbeddedReports>false</HasEmbeddedReports>
      <HtmlFileName>R28.htm</HtmlFileName>
      <LongName>9955515 - Disclosure - Property and Equipment (Tables)</LongName>
      <ReportType>Sheet</ReportType>
      <Role>http://www.xerispharma.com/role/PropertyandEquipmentTables</Role>
      <ShortName>Property and Equipment (Tables)</ShortName>
      <MenuCategory>Tables</MenuCategory>
      <ParentRole>http://www.xerispharma.com/role/PropertyandEquipment</ParentRole>
      <Position>28</Position>
    </Report>
    <Report instance="xers-20250930.htm">
      <IsDefault>false</IsDefault>
      <HasEmbeddedReports>false</HasEmbeddedReports>
      <HtmlFileName>R29.htm</HtmlFileName>
      <LongName>9955516 - Disclosure - Intangible Assets (Tables)</LongName>
      <ReportType>Sheet</ReportType>
      <Role>http://www.xerispharma.com/role/IntangibleAssetsTables</Role>
      <ShortName>Intangible Assets (Tables)</ShortName>
      <MenuCategory>Tables</MenuCategory>
      <ParentRole>http://www.xerispharma.com/role/IntangibleAssets</ParentRole>
      <Position>29</Position>
    </Report>
    <Report instance="xers-20250930.htm">
      <IsDefault>false</IsDefault>
      <HasEmbeddedReports>false</HasEmbeddedReports>
      <HtmlFileName>R30.htm</HtmlFileName>
      <LongName>9955517 - Disclosure - Other Accrued Liabilities (Tables)</LongName>
      <ReportType>Sheet</ReportType>
      <Role>http://www.xerispharma.com/role/OtherAccruedLiabilitiesTables</Role>
      <ShortName>Other Accrued Liabilities (Tables)</ShortName>
      <MenuCategory>Tables</MenuCategory>
      <ParentRole>http://www.xerispharma.com/role/OtherAccruedLiabilities</ParentRole>
      <Position>30</Position>
    </Report>
    <Report instance="xers-20250930.htm">
      <IsDefault>false</IsDefault>
      <HasEmbeddedReports>false</HasEmbeddedReports>
      <HtmlFileName>R31.htm</HtmlFileName>
      <LongName>9955518 - Disclosure - Debt (Tables)</LongName>
      <ReportType>Sheet</ReportType>
      <Role>http://www.xerispharma.com/role/DebtTables</Role>
      <ShortName>Debt (Tables)</ShortName>
      <MenuCategory>Tables</MenuCategory>
      <ParentRole>http://www.xerispharma.com/role/Debt</ParentRole>
      <Position>31</Position>
    </Report>
    <Report instance="xers-20250930.htm">
      <IsDefault>false</IsDefault>
      <HasEmbeddedReports>false</HasEmbeddedReports>
      <HtmlFileName>R32.htm</HtmlFileName>
      <LongName>9955519 - Disclosure - Warrants (Tables)</LongName>
      <ReportType>Sheet</ReportType>
      <Role>http://www.xerispharma.com/role/WarrantsTables</Role>
      <ShortName>Warrants (Tables)</ShortName>
      <MenuCategory>Tables</MenuCategory>
      <ParentRole>http://www.xerispharma.com/role/Warrants</ParentRole>
      <Position>32</Position>
    </Report>
    <Report instance="xers-20250930.htm">
      <IsDefault>false</IsDefault>
      <HasEmbeddedReports>false</HasEmbeddedReports>
      <HtmlFileName>R33.htm</HtmlFileName>
      <LongName>9955520 - Disclosure - Fair Value Measurements (Tables)</LongName>
      <ReportType>Sheet</ReportType>
      <Role>http://www.xerispharma.com/role/FairValueMeasurementsTables</Role>
      <ShortName>Fair Value Measurements (Tables)</ShortName>
      <MenuCategory>Tables</MenuCategory>
      <ParentRole>http://www.xerispharma.com/role/FairValueMeasurements</ParentRole>
      <Position>33</Position>
    </Report>
    <Report instance="xers-20250930.htm">
      <IsDefault>false</IsDefault>
      <HasEmbeddedReports>false</HasEmbeddedReports>
      <HtmlFileName>R34.htm</HtmlFileName>
      <LongName>9955521 - Disclosure - Stock Compensation Plan (Tables)</LongName>
      <ReportType>Sheet</ReportType>
      <Role>http://www.xerispharma.com/role/StockCompensationPlanTables</Role>
      <ShortName>Stock Compensation Plan (Tables)</ShortName>
      <MenuCategory>Tables</MenuCategory>
      <ParentRole>http://www.xerispharma.com/role/StockCompensationPlan</ParentRole>
      <Position>34</Position>
    </Report>
    <Report instance="xers-20250930.htm">
      <IsDefault>false</IsDefault>
      <HasEmbeddedReports>false</HasEmbeddedReports>
      <HtmlFileName>R35.htm</HtmlFileName>
      <LongName>9955522 - Disclosure - Leases (Tables)</LongName>
      <ReportType>Sheet</ReportType>
      <Role>http://www.xerispharma.com/role/LeasesTables</Role>
      <ShortName>Leases (Tables)</ShortName>
      <MenuCategory>Tables</MenuCategory>
      <ParentRole>http://www.xerispharma.com/role/Leases</ParentRole>
      <Position>35</Position>
    </Report>
    <Report instance="xers-20250930.htm">
      <IsDefault>false</IsDefault>
      <HasEmbeddedReports>false</HasEmbeddedReports>
      <HtmlFileName>R36.htm</HtmlFileName>
      <LongName>9955523 - Disclosure - Net Loss Per Common Share (Tables)</LongName>
      <ReportType>Sheet</ReportType>
      <Role>http://www.xerispharma.com/role/NetLossPerCommonShareTables</Role>
      <ShortName>Net Loss Per Common Share (Tables)</ShortName>
      <MenuCategory>Tables</MenuCategory>
      <ParentRole>http://www.xerispharma.com/role/NetLossPerCommonShare</ParentRole>
      <Position>36</Position>
    </Report>
    <Report instance="xers-20250930.htm">
      <IsDefault>false</IsDefault>
      <HasEmbeddedReports>false</HasEmbeddedReports>
      <HtmlFileName>R37.htm</HtmlFileName>
      <LongName>9955524 - Disclosure - Organization and Business - Narrative (Details)</LongName>
      <ReportType>Sheet</ReportType>
      <Role>http://www.xerispharma.com/role/OrganizationandBusinessNarrativeDetails</Role>
      <ShortName>Organization and Business - Narrative (Details)</ShortName>
      <MenuCategory>Details</MenuCategory>
      <Position>37</Position>
    </Report>
    <Report instance="xers-20250930.htm">
      <IsDefault>false</IsDefault>
      <HasEmbeddedReports>false</HasEmbeddedReports>
      <HtmlFileName>R38.htm</HtmlFileName>
      <LongName>9955525 - Disclosure - Basis of Presentation and Summary of Significant Accounting Policies and Estimates - Narrative (Details)</LongName>
      <ReportType>Sheet</ReportType>
      <Role>http://www.xerispharma.com/role/BasisofPresentationandSummaryofSignificantAccountingPoliciesandEstimatesNarrativeDetails</Role>
      <ShortName>Basis of Presentation and Summary of Significant Accounting Policies and Estimates - Narrative (Details)</ShortName>
      <MenuCategory>Details</MenuCategory>
      <ParentRole>http://www.xerispharma.com/role/BasisofPresentationandSummaryofSignificantAccountingPoliciesandEstimatesTables</ParentRole>
      <Position>38</Position>
    </Report>
    <Report instance="xers-20250930.htm">
      <IsDefault>false</IsDefault>
      <HasEmbeddedReports>false</HasEmbeddedReports>
      <HtmlFileName>R39.htm</HtmlFileName>
      <LongName>9955526 - Disclosure - Disaggregated Revenue (Details)</LongName>
      <ReportType>Sheet</ReportType>
      <Role>http://www.xerispharma.com/role/DisaggregatedRevenueDetails</Role>
      <ShortName>Disaggregated Revenue (Details)</ShortName>
      <MenuCategory>Details</MenuCategory>
      <ParentRole>http://www.xerispharma.com/role/DisaggregatedRevenueTables</ParentRole>
      <Position>39</Position>
    </Report>
    <Report instance="xers-20250930.htm">
      <IsDefault>false</IsDefault>
      <HasEmbeddedReports>false</HasEmbeddedReports>
      <HtmlFileName>R40.htm</HtmlFileName>
      <LongName>9955527 - Disclosure - Inventory (Details)</LongName>
      <ReportType>Sheet</ReportType>
      <Role>http://www.xerispharma.com/role/InventoryDetails</Role>
      <ShortName>Inventory (Details)</ShortName>
      <MenuCategory>Details</MenuCategory>
      <ParentRole>http://www.xerispharma.com/role/InventoryTables</ParentRole>
      <Position>40</Position>
    </Report>
    <Report instance="xers-20250930.htm">
      <IsDefault>false</IsDefault>
      <HasEmbeddedReports>false</HasEmbeddedReports>
      <HtmlFileName>R41.htm</HtmlFileName>
      <LongName>9955528 - Disclosure - Inventory Components of Inventory (Details)</LongName>
      <ReportType>Sheet</ReportType>
      <Role>http://www.xerispharma.com/role/InventoryComponentsofInventoryDetails</Role>
      <ShortName>Inventory Components of Inventory (Details)</ShortName>
      <MenuCategory>Details</MenuCategory>
      <Position>41</Position>
    </Report>
    <Report instance="xers-20250930.htm">
      <IsDefault>false</IsDefault>
      <HasEmbeddedReports>false</HasEmbeddedReports>
      <HtmlFileName>R42.htm</HtmlFileName>
      <LongName>9955529 - Disclosure - Property and Equipment - Schedule of Property and Equipment (Details)</LongName>
      <ReportType>Sheet</ReportType>
      <Role>http://www.xerispharma.com/role/PropertyandEquipmentScheduleofPropertyandEquipmentDetails</Role>
      <ShortName>Property and Equipment - Schedule of Property and Equipment (Details)</ShortName>
      <MenuCategory>Details</MenuCategory>
      <Position>42</Position>
    </Report>
    <Report instance="xers-20250930.htm">
      <IsDefault>false</IsDefault>
      <HasEmbeddedReports>false</HasEmbeddedReports>
      <HtmlFileName>R43.htm</HtmlFileName>
      <LongName>9955530 - Disclosure - Property and Equipment - Narrative (Details)</LongName>
      <ReportType>Sheet</ReportType>
      <Role>http://www.xerispharma.com/role/PropertyandEquipmentNarrativeDetails</Role>
      <ShortName>Property and Equipment - Narrative (Details)</ShortName>
      <MenuCategory>Details</MenuCategory>
      <Position>43</Position>
    </Report>
    <Report instance="xers-20250930.htm">
      <IsDefault>false</IsDefault>
      <HasEmbeddedReports>false</HasEmbeddedReports>
      <HtmlFileName>R44.htm</HtmlFileName>
      <LongName>9955531 - Disclosure - Intangible Assets - Schedule of Intangible Assets (Details)</LongName>
      <ReportType>Sheet</ReportType>
      <Role>http://www.xerispharma.com/role/IntangibleAssetsScheduleofIntangibleAssetsDetails</Role>
      <ShortName>Intangible Assets - Schedule of Intangible Assets (Details)</ShortName>
      <MenuCategory>Details</MenuCategory>
      <Position>44</Position>
    </Report>
    <Report instance="xers-20250930.htm">
      <IsDefault>false</IsDefault>
      <HasEmbeddedReports>false</HasEmbeddedReports>
      <HtmlFileName>R45.htm</HtmlFileName>
      <LongName>9955532 - Disclosure - Intangible Assets - Expected Amortization (Details)</LongName>
      <ReportType>Sheet</ReportType>
      <Role>http://www.xerispharma.com/role/IntangibleAssetsExpectedAmortizationDetails</Role>
      <ShortName>Intangible Assets - Expected Amortization (Details)</ShortName>
      <MenuCategory>Details</MenuCategory>
      <Position>45</Position>
    </Report>
    <Report instance="xers-20250930.htm">
      <IsDefault>false</IsDefault>
      <HasEmbeddedReports>false</HasEmbeddedReports>
      <HtmlFileName>R46.htm</HtmlFileName>
      <LongName>9955533 - Disclosure - Other Accrued Liabilities (Details)</LongName>
      <ReportType>Sheet</ReportType>
      <Role>http://www.xerispharma.com/role/OtherAccruedLiabilitiesDetails</Role>
      <ShortName>Other Accrued Liabilities (Details)</ShortName>
      <MenuCategory>Details</MenuCategory>
      <ParentRole>http://www.xerispharma.com/role/OtherAccruedLiabilitiesTables</ParentRole>
      <Position>46</Position>
    </Report>
    <Report instance="xers-20250930.htm">
      <IsDefault>false</IsDefault>
      <HasEmbeddedReports>false</HasEmbeddedReports>
      <HtmlFileName>R47.htm</HtmlFileName>
      <LongName>9955534 - Disclosure - Debt - Components of Debt (Details)</LongName>
      <ReportType>Sheet</ReportType>
      <Role>http://www.xerispharma.com/role/DebtComponentsofDebtDetails</Role>
      <ShortName>Debt - Components of Debt (Details)</ShortName>
      <MenuCategory>Details</MenuCategory>
      <Position>47</Position>
    </Report>
    <Report instance="xers-20250930.htm">
      <IsDefault>false</IsDefault>
      <HasEmbeddedReports>false</HasEmbeddedReports>
      <HtmlFileName>R48.htm</HtmlFileName>
      <LongName>9955535 - Disclosure - Debt - Narrative (Details)</LongName>
      <ReportType>Sheet</ReportType>
      <Role>http://www.xerispharma.com/role/DebtNarrativeDetails</Role>
      <ShortName>Debt - Narrative (Details)</ShortName>
      <MenuCategory>Details</MenuCategory>
      <Position>48</Position>
    </Report>
    <Report instance="xers-20250930.htm">
      <IsDefault>false</IsDefault>
      <HasEmbeddedReports>false</HasEmbeddedReports>
      <HtmlFileName>R49.htm</HtmlFileName>
      <LongName>9955536 - Disclosure - Debt - Future Principal Payments (Details)</LongName>
      <ReportType>Sheet</ReportType>
      <Role>http://www.xerispharma.com/role/DebtFuturePrincipalPaymentsDetails</Role>
      <ShortName>Debt - Future Principal Payments (Details)</ShortName>
      <MenuCategory>Details</MenuCategory>
      <Position>49</Position>
    </Report>
    <Report instance="xers-20250930.htm">
      <IsDefault>false</IsDefault>
      <HasEmbeddedReports>false</HasEmbeddedReports>
      <HtmlFileName>R50.htm</HtmlFileName>
      <LongName>9955537 - Disclosure - Warrants - Schedule of Stockholders' Equity Note, Warrants or Rights (Details)</LongName>
      <ReportType>Sheet</ReportType>
      <Role>http://www.xerispharma.com/role/WarrantsScheduleofStockholdersEquityNoteWarrantsorRightsDetails</Role>
      <ShortName>Warrants - Schedule of Stockholders' Equity Note, Warrants or Rights (Details)</ShortName>
      <MenuCategory>Details</MenuCategory>
      <Position>50</Position>
    </Report>
    <Report instance="xers-20250930.htm">
      <IsDefault>false</IsDefault>
      <HasEmbeddedReports>false</HasEmbeddedReports>
      <HtmlFileName>R51.htm</HtmlFileName>
      <LongName>9955538 - Disclosure - Fair Value Measurements - Fair Value, Liabilities Measured on Recurring Basis, Unobservable Input Reconciliation (Details)</LongName>
      <ReportType>Sheet</ReportType>
      <Role>http://www.xerispharma.com/role/FairValueMeasurementsFairValueLiabilitiesMeasuredonRecurringBasisUnobservableInputReconciliationDetails</Role>
      <ShortName>Fair Value Measurements - Fair Value, Liabilities Measured on Recurring Basis, Unobservable Input Reconciliation (Details)</ShortName>
      <MenuCategory>Details</MenuCategory>
      <Position>51</Position>
    </Report>
    <Report instance="xers-20250930.htm">
      <IsDefault>false</IsDefault>
      <HasEmbeddedReports>false</HasEmbeddedReports>
      <HtmlFileName>R52.htm</HtmlFileName>
      <LongName>9955539 - Disclosure - Fair Value Measurements - Narrative (Details)</LongName>
      <ReportType>Sheet</ReportType>
      <Role>http://www.xerispharma.com/role/FairValueMeasurementsNarrativeDetails</Role>
      <ShortName>Fair Value Measurements - Narrative (Details)</ShortName>
      <MenuCategory>Details</MenuCategory>
      <Position>52</Position>
    </Report>
    <Report instance="xers-20250930.htm">
      <IsDefault>false</IsDefault>
      <HasEmbeddedReports>false</HasEmbeddedReports>
      <HtmlFileName>R53.htm</HtmlFileName>
      <LongName>9955540 - Disclosure - Fair Value Measurements - CVR Rollforward (Details)</LongName>
      <ReportType>Sheet</ReportType>
      <Role>http://www.xerispharma.com/role/FairValueMeasurementsCVRRollforwardDetails</Role>
      <ShortName>Fair Value Measurements - CVR Rollforward (Details)</ShortName>
      <MenuCategory>Details</MenuCategory>
      <Position>53</Position>
    </Report>
    <Report instance="xers-20250930.htm">
      <IsDefault>false</IsDefault>
      <HasEmbeddedReports>false</HasEmbeddedReports>
      <HtmlFileName>R54.htm</HtmlFileName>
      <LongName>9955541 - Disclosure - Stock Compensation Plan - Narrative (Details)</LongName>
      <ReportType>Sheet</ReportType>
      <Role>http://www.xerispharma.com/role/StockCompensationPlanNarrativeDetails</Role>
      <ShortName>Stock Compensation Plan - Narrative (Details)</ShortName>
      <MenuCategory>Details</MenuCategory>
      <Position>54</Position>
    </Report>
    <Report instance="xers-20250930.htm">
      <IsDefault>false</IsDefault>
      <HasEmbeddedReports>false</HasEmbeddedReports>
      <HtmlFileName>R55.htm</HtmlFileName>
      <LongName>9955542 - Disclosure - Stock Compensation Plan - Employee Stock Award Activity (Details)</LongName>
      <ReportType>Sheet</ReportType>
      <Role>http://www.xerispharma.com/role/StockCompensationPlanEmployeeStockAwardActivityDetails</Role>
      <ShortName>Stock Compensation Plan - Employee Stock Award Activity (Details)</ShortName>
      <MenuCategory>Details</MenuCategory>
      <Position>55</Position>
    </Report>
    <Report instance="xers-20250930.htm">
      <IsDefault>false</IsDefault>
      <HasEmbeddedReports>false</HasEmbeddedReports>
      <HtmlFileName>R56.htm</HtmlFileName>
      <LongName>9955543 - Disclosure - Stock Compensation Plan - Stock-Based Compensation Expense (Details)</LongName>
      <ReportType>Sheet</ReportType>
      <Role>http://www.xerispharma.com/role/StockCompensationPlanStockBasedCompensationExpenseDetails</Role>
      <ShortName>Stock Compensation Plan - Stock-Based Compensation Expense (Details)</ShortName>
      <MenuCategory>Details</MenuCategory>
      <Position>56</Position>
    </Report>
    <Report instance="xers-20250930.htm">
      <IsDefault>false</IsDefault>
      <HasEmbeddedReports>false</HasEmbeddedReports>
      <HtmlFileName>R57.htm</HtmlFileName>
      <LongName>9955544 - Disclosure - Stock Compensation Plan - Restricted Stock Units Activity (Details)</LongName>
      <ReportType>Sheet</ReportType>
      <Role>http://www.xerispharma.com/role/StockCompensationPlanRestrictedStockUnitsActivityDetails</Role>
      <ShortName>Stock Compensation Plan - Restricted Stock Units Activity (Details)</ShortName>
      <MenuCategory>Details</MenuCategory>
      <Position>57</Position>
    </Report>
    <Report instance="xers-20250930.htm">
      <IsDefault>false</IsDefault>
      <HasEmbeddedReports>false</HasEmbeddedReports>
      <HtmlFileName>R58.htm</HtmlFileName>
      <LongName>9955545 - Disclosure - Leases - Narrative (Details)</LongName>
      <ReportType>Sheet</ReportType>
      <Role>http://www.xerispharma.com/role/LeasesNarrativeDetails</Role>
      <ShortName>Leases - Narrative (Details)</ShortName>
      <MenuCategory>Details</MenuCategory>
      <Position>58</Position>
    </Report>
    <Report instance="xers-20250930.htm">
      <IsDefault>false</IsDefault>
      <HasEmbeddedReports>false</HasEmbeddedReports>
      <HtmlFileName>R59.htm</HtmlFileName>
      <LongName>9955546 - Disclosure - Leases - Summary of Lease Cost Information (Details)</LongName>
      <ReportType>Sheet</ReportType>
      <Role>http://www.xerispharma.com/role/LeasesSummaryofLeaseCostInformationDetails</Role>
      <ShortName>Leases - Summary of Lease Cost Information (Details)</ShortName>
      <MenuCategory>Details</MenuCategory>
      <Position>59</Position>
    </Report>
    <Report instance="xers-20250930.htm">
      <IsDefault>false</IsDefault>
      <HasEmbeddedReports>false</HasEmbeddedReports>
      <HtmlFileName>R60.htm</HtmlFileName>
      <LongName>9955547 - Disclosure - Leases - Schedule of Operating Lease Maturities (Details)</LongName>
      <ReportType>Sheet</ReportType>
      <Role>http://www.xerispharma.com/role/LeasesScheduleofOperatingLeaseMaturitiesDetails</Role>
      <ShortName>Leases - Schedule of Operating Lease Maturities (Details)</ShortName>
      <MenuCategory>Details</MenuCategory>
      <Position>60</Position>
    </Report>
    <Report instance="xers-20250930.htm">
      <IsDefault>false</IsDefault>
      <HasEmbeddedReports>false</HasEmbeddedReports>
      <HtmlFileName>R61.htm</HtmlFileName>
      <LongName>9955548 - Disclosure - Commitments and Contingencies (Details)</LongName>
      <ReportType>Sheet</ReportType>
      <Role>http://www.xerispharma.com/role/CommitmentsandContingenciesDetails</Role>
      <ShortName>Commitments and Contingencies (Details)</ShortName>
      <MenuCategory>Details</MenuCategory>
      <ParentRole>http://www.xerispharma.com/role/CommitmentsandContingencies</ParentRole>
      <Position>61</Position>
    </Report>
    <Report instance="xers-20250930.htm">
      <IsDefault>false</IsDefault>
      <HasEmbeddedReports>false</HasEmbeddedReports>
      <HtmlFileName>R62.htm</HtmlFileName>
      <LongName>9955549 - Disclosure - Net Loss Per Common Share (Details)</LongName>
      <ReportType>Sheet</ReportType>
      <Role>http://www.xerispharma.com/role/NetLossPerCommonShareDetails</Role>
      <ShortName>Net Loss Per Common Share (Details)</ShortName>
      <MenuCategory>Details</MenuCategory>
      <ParentRole>http://www.xerispharma.com/role/NetLossPerCommonShareTables</ParentRole>
      <Position>62</Position>
    </Report>
    <Report instance="xers-20250930.htm">
      <IsDefault>false</IsDefault>
      <HasEmbeddedReports>false</HasEmbeddedReports>
      <HtmlFileName>R63.htm</HtmlFileName>
      <LongName>9955550 - Disclosure - Net Loss Per Common Share - Antidilutive Securities Excluded from Computation of Earnings Per Share (Details)</LongName>
      <ReportType>Sheet</ReportType>
      <Role>http://www.xerispharma.com/role/NetLossPerCommonShareAntidilutiveSecuritiesExcludedfromComputationofEarningsPerShareDetails</Role>
      <ShortName>Net Loss Per Common Share - Antidilutive Securities Excluded from Computation of Earnings Per Share (Details)</ShortName>
      <MenuCategory>Details</MenuCategory>
      <Position>63</Position>
    </Report>
    <Report>
      <IsDefault>false</IsDefault>
      <HasEmbeddedReports>false</HasEmbeddedReports>
      <LongName>All Reports</LongName>
      <ReportType>Book</ReportType>
      <ShortName>All Reports</ShortName>
    </Report>
  </MyReports>
  <InputFiles>
    <File doctype="10-Q" isDefinitelyFs="true" isUsgaap="true" original="xers-20250930.htm">xers-20250930.htm</File>
    <File>xers-20250930.xsd</File>
    <File>xers-20250930_cal.xml</File>
    <File>xers-20250930_def.xml</File>
    <File>xers-20250930_lab.xml</File>
    <File>xers-20250930_pre.xml</File>
  </InputFiles>
  <SupplementalFiles/>
  <BaseTaxonomies>
    <BaseTaxonomy items="709">http://fasb.org/us-gaap/2025</BaseTaxonomy>
    <BaseTaxonomy items="30">http://xbrl.sec.gov/dei/2025</BaseTaxonomy>
    <BaseTaxonomy items="46">http://xbrl.sec.gov/ecd/2025</BaseTaxonomy>
  </BaseTaxonomies>
  <HasPresentationLinkbase>true</HasPresentationLinkbase>
  <HasCalculationLinkbase>true</HasCalculationLinkbase>
</FilingSummary>
