<?xml version='1.0' encoding='utf-8'?>
<FilingSummary>
  <Version>3.22.4</Version>
  <ProcessingTime/>
  <ReportFormat>html</ReportFormat>
  <ContextCount>539</ContextCount>
  <ElementCount>564</ElementCount>
  <EntityCount>1</EntityCount>
  <FootnotesReported>true</FootnotesReported>
  <SegmentCount>135</SegmentCount>
  <ScenarioCount>0</ScenarioCount>
  <TuplesReported>false</TuplesReported>
  <UnitCount>9</UnitCount>
  <MyReports>
    <Report instance="xyl-20221231.htm">
      <IsDefault>false</IsDefault>
      <HasEmbeddedReports>false</HasEmbeddedReports>
      <HtmlFileName>R1.htm</HtmlFileName>
      <LongName>0000001 - Document - Cover Page</LongName>
      <ReportType>Sheet</ReportType>
      <Role>http://www.xyleminc.com/role/CoverPage</Role>
      <ShortName>Cover Page</ShortName>
      <MenuCategory>Cover</MenuCategory>
      <Position>1</Position>
    </Report>
    <Report instance="xyl-20221231.htm">
      <IsDefault>false</IsDefault>
      <HasEmbeddedReports>false</HasEmbeddedReports>
      <HtmlFileName>R2.htm</HtmlFileName>
      <LongName>0000002 - Document - Audit Information</LongName>
      <ReportType>Sheet</ReportType>
      <Role>http://www.xyleminc.com/role/AuditInformation</Role>
      <ShortName>Audit Information</ShortName>
      <MenuCategory>Cover</MenuCategory>
      <Position>2</Position>
    </Report>
    <Report instance="xyl-20221231.htm">
      <IsDefault>false</IsDefault>
      <HasEmbeddedReports>false</HasEmbeddedReports>
      <HtmlFileName>R3.htm</HtmlFileName>
      <LongName>0000003 - Statement - Consolidated Income Statements</LongName>
      <ReportType>Sheet</ReportType>
      <Role>http://www.xyleminc.com/role/ConsolidatedIncomeStatements</Role>
      <ShortName>Consolidated Income Statements</ShortName>
      <MenuCategory>Statements</MenuCategory>
      <Position>3</Position>
    </Report>
    <Report instance="xyl-20221231.htm">
      <IsDefault>false</IsDefault>
      <HasEmbeddedReports>false</HasEmbeddedReports>
      <HtmlFileName>R4.htm</HtmlFileName>
      <LongName>0000004 - Statement - Consolidated Statements of Comprehensive Income</LongName>
      <ReportType>Sheet</ReportType>
      <Role>http://www.xyleminc.com/role/ConsolidatedStatementsofComprehensiveIncome</Role>
      <ShortName>Consolidated Statements of Comprehensive Income</ShortName>
      <MenuCategory>Statements</MenuCategory>
      <Position>4</Position>
    </Report>
    <Report instance="xyl-20221231.htm">
      <IsDefault>false</IsDefault>
      <HasEmbeddedReports>false</HasEmbeddedReports>
      <HtmlFileName>R5.htm</HtmlFileName>
      <LongName>0000005 - Statement - Consolidated Balance Sheets</LongName>
      <ReportType>Sheet</ReportType>
      <Role>http://www.xyleminc.com/role/ConsolidatedBalanceSheets</Role>
      <ShortName>Consolidated Balance Sheets</ShortName>
      <MenuCategory>Statements</MenuCategory>
      <Position>5</Position>
    </Report>
    <Report instance="xyl-20221231.htm">
      <IsDefault>false</IsDefault>
      <HasEmbeddedReports>false</HasEmbeddedReports>
      <HtmlFileName>R6.htm</HtmlFileName>
      <LongName>0000006 - Statement - Consolidated Balance Sheets (Parenthetical)</LongName>
      <ReportType>Sheet</ReportType>
      <Role>http://www.xyleminc.com/role/ConsolidatedBalanceSheetsParenthetical</Role>
      <ShortName>Consolidated Balance Sheets (Parenthetical)</ShortName>
      <MenuCategory>Statements</MenuCategory>
      <Position>6</Position>
    </Report>
    <Report instance="xyl-20221231.htm">
      <IsDefault>false</IsDefault>
      <HasEmbeddedReports>false</HasEmbeddedReports>
      <HtmlFileName>R7.htm</HtmlFileName>
      <LongName>0000007 - Statement - Consolidated Statements of Cash Flows</LongName>
      <ReportType>Sheet</ReportType>
      <Role>http://www.xyleminc.com/role/ConsolidatedStatementsofCashFlows</Role>
      <ShortName>Consolidated Statements of Cash Flows</ShortName>
      <MenuCategory>Statements</MenuCategory>
      <Position>7</Position>
    </Report>
    <Report instance="xyl-20221231.htm">
      <IsDefault>false</IsDefault>
      <HasEmbeddedReports>false</HasEmbeddedReports>
      <HtmlFileName>R8.htm</HtmlFileName>
      <LongName>0000008 - Statement - Consolidated Statements of Changes in Stockholders' Equity</LongName>
      <ReportType>Sheet</ReportType>
      <Role>http://www.xyleminc.com/role/ConsolidatedStatementsofChangesinStockholdersEquity</Role>
      <ShortName>Consolidated Statements of Changes in Stockholders' Equity</ShortName>
      <MenuCategory>Statements</MenuCategory>
      <Position>8</Position>
    </Report>
    <Report instance="xyl-20221231.htm">
      <IsDefault>false</IsDefault>
      <HasEmbeddedReports>false</HasEmbeddedReports>
      <HtmlFileName>R9.htm</HtmlFileName>
      <LongName>0000009 - Statement - Consolidated Statements of Changes in Stockholders' Equity (Parenthetical)</LongName>
      <ReportType>Sheet</ReportType>
      <Role>http://www.xyleminc.com/role/ConsolidatedStatementsofChangesinStockholdersEquityParenthetical</Role>
      <ShortName>Consolidated Statements of Changes in Stockholders' Equity (Parenthetical)</ShortName>
      <MenuCategory>Statements</MenuCategory>
      <Position>9</Position>
    </Report>
    <Report instance="xyl-20221231.htm">
      <IsDefault>false</IsDefault>
      <HasEmbeddedReports>false</HasEmbeddedReports>
      <HtmlFileName>R10.htm</HtmlFileName>
      <LongName>0000010 - Disclosure - Summary of Significant Accounting Policies</LongName>
      <ReportType>Sheet</ReportType>
      <Role>http://www.xyleminc.com/role/SummaryofSignificantAccountingPolicies</Role>
      <ShortName>Summary of Significant Accounting Policies</ShortName>
      <MenuCategory>Notes</MenuCategory>
      <Position>10</Position>
    </Report>
    <Report instance="xyl-20221231.htm">
      <IsDefault>false</IsDefault>
      <HasEmbeddedReports>false</HasEmbeddedReports>
      <HtmlFileName>R11.htm</HtmlFileName>
      <LongName>0000011 - Disclosure - Recently Issued Accounting Pronouncements</LongName>
      <ReportType>Sheet</ReportType>
      <Role>http://www.xyleminc.com/role/RecentlyIssuedAccountingPronouncements</Role>
      <ShortName>Recently Issued Accounting Pronouncements</ShortName>
      <MenuCategory>Notes</MenuCategory>
      <Position>11</Position>
    </Report>
    <Report instance="xyl-20221231.htm">
      <IsDefault>false</IsDefault>
      <HasEmbeddedReports>false</HasEmbeddedReports>
      <HtmlFileName>R12.htm</HtmlFileName>
      <LongName>0000012 - Disclosure - Restructuring and Asset Impairment Charges</LongName>
      <ReportType>Sheet</ReportType>
      <Role>http://www.xyleminc.com/role/RestructuringandAssetImpairmentCharges</Role>
      <ShortName>Restructuring and Asset Impairment Charges</ShortName>
      <MenuCategory>Notes</MenuCategory>
      <Position>12</Position>
    </Report>
    <Report instance="xyl-20221231.htm">
      <IsDefault>false</IsDefault>
      <HasEmbeddedReports>false</HasEmbeddedReports>
      <HtmlFileName>R13.htm</HtmlFileName>
      <LongName>0000013 - Disclosure - Revenue</LongName>
      <ReportType>Sheet</ReportType>
      <Role>http://www.xyleminc.com/role/Revenue</Role>
      <ShortName>Revenue</ShortName>
      <MenuCategory>Notes</MenuCategory>
      <Position>13</Position>
    </Report>
    <Report instance="xyl-20221231.htm">
      <IsDefault>false</IsDefault>
      <HasEmbeddedReports>false</HasEmbeddedReports>
      <HtmlFileName>R14.htm</HtmlFileName>
      <LongName>0000014 - Disclosure - Other Non-Operating Income, Net</LongName>
      <ReportType>Sheet</ReportType>
      <Role>http://www.xyleminc.com/role/OtherNonOperatingIncomeNet</Role>
      <ShortName>Other Non-Operating Income, Net</ShortName>
      <MenuCategory>Notes</MenuCategory>
      <Position>14</Position>
    </Report>
    <Report instance="xyl-20221231.htm">
      <IsDefault>false</IsDefault>
      <HasEmbeddedReports>false</HasEmbeddedReports>
      <HtmlFileName>R15.htm</HtmlFileName>
      <LongName>0000015 - Disclosure - Income Taxes</LongName>
      <ReportType>Sheet</ReportType>
      <Role>http://www.xyleminc.com/role/IncomeTaxes</Role>
      <ShortName>Income Taxes</ShortName>
      <MenuCategory>Notes</MenuCategory>
      <Position>15</Position>
    </Report>
    <Report instance="xyl-20221231.htm">
      <IsDefault>false</IsDefault>
      <HasEmbeddedReports>false</HasEmbeddedReports>
      <HtmlFileName>R16.htm</HtmlFileName>
      <LongName>0000016 - Disclosure - Earnings Per Share</LongName>
      <ReportType>Sheet</ReportType>
      <Role>http://www.xyleminc.com/role/EarningsPerShare</Role>
      <ShortName>Earnings Per Share</ShortName>
      <MenuCategory>Notes</MenuCategory>
      <Position>16</Position>
    </Report>
    <Report instance="xyl-20221231.htm">
      <IsDefault>false</IsDefault>
      <HasEmbeddedReports>false</HasEmbeddedReports>
      <HtmlFileName>R17.htm</HtmlFileName>
      <LongName>0000017 - Disclosure - Inventories</LongName>
      <ReportType>Sheet</ReportType>
      <Role>http://www.xyleminc.com/role/Inventories</Role>
      <ShortName>Inventories</ShortName>
      <MenuCategory>Notes</MenuCategory>
      <Position>17</Position>
    </Report>
    <Report instance="xyl-20221231.htm">
      <IsDefault>false</IsDefault>
      <HasEmbeddedReports>false</HasEmbeddedReports>
      <HtmlFileName>R18.htm</HtmlFileName>
      <LongName>0000018 - Disclosure - Property, Plant and Equipment</LongName>
      <ReportType>Sheet</ReportType>
      <Role>http://www.xyleminc.com/role/PropertyPlantandEquipment</Role>
      <ShortName>Property, Plant and Equipment</ShortName>
      <MenuCategory>Notes</MenuCategory>
      <Position>18</Position>
    </Report>
    <Report instance="xyl-20221231.htm">
      <IsDefault>false</IsDefault>
      <HasEmbeddedReports>false</HasEmbeddedReports>
      <HtmlFileName>R19.htm</HtmlFileName>
      <LongName>0000019 - Disclosure - Leases</LongName>
      <ReportType>Sheet</ReportType>
      <Role>http://www.xyleminc.com/role/Leases</Role>
      <ShortName>Leases</ShortName>
      <MenuCategory>Notes</MenuCategory>
      <Position>19</Position>
    </Report>
    <Report instance="xyl-20221231.htm">
      <IsDefault>false</IsDefault>
      <HasEmbeddedReports>false</HasEmbeddedReports>
      <HtmlFileName>R20.htm</HtmlFileName>
      <LongName>0000020 - Disclosure - Goodwill and Other Intangible Assets</LongName>
      <ReportType>Sheet</ReportType>
      <Role>http://www.xyleminc.com/role/GoodwillandOtherIntangibleAssets</Role>
      <ShortName>Goodwill and Other Intangible Assets</ShortName>
      <MenuCategory>Notes</MenuCategory>
      <Position>20</Position>
    </Report>
    <Report instance="xyl-20221231.htm">
      <IsDefault>false</IsDefault>
      <HasEmbeddedReports>false</HasEmbeddedReports>
      <HtmlFileName>R21.htm</HtmlFileName>
      <LongName>0000021 - Disclosure - Accrued and Other Current Liabilities</LongName>
      <ReportType>Sheet</ReportType>
      <Role>http://www.xyleminc.com/role/AccruedandOtherCurrentLiabilities</Role>
      <ShortName>Accrued and Other Current Liabilities</ShortName>
      <MenuCategory>Notes</MenuCategory>
      <Position>21</Position>
    </Report>
    <Report instance="xyl-20221231.htm">
      <IsDefault>false</IsDefault>
      <HasEmbeddedReports>false</HasEmbeddedReports>
      <HtmlFileName>R22.htm</HtmlFileName>
      <LongName>0000022 - Disclosure - Credit Facilities and Long-Term Debt</LongName>
      <ReportType>Sheet</ReportType>
      <Role>http://www.xyleminc.com/role/CreditFacilitiesandLongTermDebt</Role>
      <ShortName>Credit Facilities and Long-Term Debt</ShortName>
      <MenuCategory>Notes</MenuCategory>
      <Position>22</Position>
    </Report>
    <Report instance="xyl-20221231.htm">
      <IsDefault>false</IsDefault>
      <HasEmbeddedReports>false</HasEmbeddedReports>
      <HtmlFileName>R23.htm</HtmlFileName>
      <LongName>0000023 - Disclosure - Derivative Financial Instruments</LongName>
      <ReportType>Sheet</ReportType>
      <Role>http://www.xyleminc.com/role/DerivativeFinancialInstruments</Role>
      <ShortName>Derivative Financial Instruments</ShortName>
      <MenuCategory>Notes</MenuCategory>
      <Position>23</Position>
    </Report>
    <Report instance="xyl-20221231.htm">
      <IsDefault>false</IsDefault>
      <HasEmbeddedReports>false</HasEmbeddedReports>
      <HtmlFileName>R24.htm</HtmlFileName>
      <LongName>0000024 - Disclosure - Postretirement Benefit Plans</LongName>
      <ReportType>Sheet</ReportType>
      <Role>http://www.xyleminc.com/role/PostretirementBenefitPlans</Role>
      <ShortName>Postretirement Benefit Plans</ShortName>
      <MenuCategory>Notes</MenuCategory>
      <Position>24</Position>
    </Report>
    <Report instance="xyl-20221231.htm">
      <IsDefault>false</IsDefault>
      <HasEmbeddedReports>false</HasEmbeddedReports>
      <HtmlFileName>R25.htm</HtmlFileName>
      <LongName>0000025 - Disclosure - Share-Based Compensation Plans</LongName>
      <ReportType>Sheet</ReportType>
      <Role>http://www.xyleminc.com/role/ShareBasedCompensationPlans</Role>
      <ShortName>Share-Based Compensation Plans</ShortName>
      <MenuCategory>Notes</MenuCategory>
      <Position>25</Position>
    </Report>
    <Report instance="xyl-20221231.htm">
      <IsDefault>false</IsDefault>
      <HasEmbeddedReports>false</HasEmbeddedReports>
      <HtmlFileName>R26.htm</HtmlFileName>
      <LongName>0000026 - Disclosure - Capital Stock</LongName>
      <ReportType>Sheet</ReportType>
      <Role>http://www.xyleminc.com/role/CapitalStock</Role>
      <ShortName>Capital Stock</ShortName>
      <MenuCategory>Notes</MenuCategory>
      <Position>26</Position>
    </Report>
    <Report instance="xyl-20221231.htm">
      <IsDefault>false</IsDefault>
      <HasEmbeddedReports>false</HasEmbeddedReports>
      <HtmlFileName>R27.htm</HtmlFileName>
      <LongName>0000027 - Disclosure - Accumulated Other Comprehensive Loss</LongName>
      <ReportType>Sheet</ReportType>
      <Role>http://www.xyleminc.com/role/AccumulatedOtherComprehensiveLoss</Role>
      <ShortName>Accumulated Other Comprehensive Loss</ShortName>
      <MenuCategory>Notes</MenuCategory>
      <Position>27</Position>
    </Report>
    <Report instance="xyl-20221231.htm">
      <IsDefault>false</IsDefault>
      <HasEmbeddedReports>false</HasEmbeddedReports>
      <HtmlFileName>R28.htm</HtmlFileName>
      <LongName>0000028 - Disclosure - Commitments and Contingencies</LongName>
      <ReportType>Sheet</ReportType>
      <Role>http://www.xyleminc.com/role/CommitmentsandContingencies</Role>
      <ShortName>Commitments and Contingencies</ShortName>
      <MenuCategory>Notes</MenuCategory>
      <Position>28</Position>
    </Report>
    <Report instance="xyl-20221231.htm">
      <IsDefault>false</IsDefault>
      <HasEmbeddedReports>false</HasEmbeddedReports>
      <HtmlFileName>R29.htm</HtmlFileName>
      <LongName>0000029 - Disclosure - Related Party Transactions</LongName>
      <ReportType>Sheet</ReportType>
      <Role>http://www.xyleminc.com/role/RelatedPartyTransactions</Role>
      <ShortName>Related Party Transactions</ShortName>
      <MenuCategory>Notes</MenuCategory>
      <Position>29</Position>
    </Report>
    <Report instance="xyl-20221231.htm">
      <IsDefault>false</IsDefault>
      <HasEmbeddedReports>false</HasEmbeddedReports>
      <HtmlFileName>R30.htm</HtmlFileName>
      <LongName>0000030 - Disclosure - Segment and Geographic Data</LongName>
      <ReportType>Sheet</ReportType>
      <Role>http://www.xyleminc.com/role/SegmentandGeographicData</Role>
      <ShortName>Segment and Geographic Data</ShortName>
      <MenuCategory>Notes</MenuCategory>
      <Position>30</Position>
    </Report>
    <Report instance="xyl-20221231.htm">
      <IsDefault>false</IsDefault>
      <HasEmbeddedReports>false</HasEmbeddedReports>
      <HtmlFileName>R31.htm</HtmlFileName>
      <LongName>0000031 - Disclosure - Valuation and Qualifying Accounts</LongName>
      <ReportType>Sheet</ReportType>
      <Role>http://www.xyleminc.com/role/ValuationandQualifyingAccounts</Role>
      <ShortName>Valuation and Qualifying Accounts</ShortName>
      <MenuCategory>Notes</MenuCategory>
      <Position>31</Position>
    </Report>
    <Report instance="xyl-20221231.htm">
      <IsDefault>false</IsDefault>
      <HasEmbeddedReports>false</HasEmbeddedReports>
      <HtmlFileName>R32.htm</HtmlFileName>
      <LongName>0000032 - Disclosure - Subsequent Events</LongName>
      <ReportType>Sheet</ReportType>
      <Role>http://www.xyleminc.com/role/SubsequentEvents</Role>
      <ShortName>Subsequent Events</ShortName>
      <MenuCategory>Notes</MenuCategory>
      <Position>32</Position>
    </Report>
    <Report instance="xyl-20221231.htm">
      <IsDefault>false</IsDefault>
      <HasEmbeddedReports>false</HasEmbeddedReports>
      <HtmlFileName>R33.htm</HtmlFileName>
      <LongName>0000033 - Disclosure - Summary of Significant Accounting Policies (Policies)</LongName>
      <ReportType>Sheet</ReportType>
      <Role>http://www.xyleminc.com/role/SummaryofSignificantAccountingPoliciesPolicies</Role>
      <ShortName>Summary of Significant Accounting Policies (Policies)</ShortName>
      <MenuCategory>Policies</MenuCategory>
      <ParentRole>http://www.xyleminc.com/role/SummaryofSignificantAccountingPolicies</ParentRole>
      <Position>33</Position>
    </Report>
    <Report instance="xyl-20221231.htm">
      <IsDefault>false</IsDefault>
      <HasEmbeddedReports>false</HasEmbeddedReports>
      <HtmlFileName>R34.htm</HtmlFileName>
      <LongName>0000034 - Disclosure - Summary of Significant Accounting Policies (Tables)</LongName>
      <ReportType>Sheet</ReportType>
      <Role>http://www.xyleminc.com/role/SummaryofSignificantAccountingPoliciesTables</Role>
      <ShortName>Summary of Significant Accounting Policies (Tables)</ShortName>
      <MenuCategory>Tables</MenuCategory>
      <ParentRole>http://www.xyleminc.com/role/SummaryofSignificantAccountingPolicies</ParentRole>
      <Position>34</Position>
    </Report>
    <Report instance="xyl-20221231.htm">
      <IsDefault>false</IsDefault>
      <HasEmbeddedReports>false</HasEmbeddedReports>
      <HtmlFileName>R35.htm</HtmlFileName>
      <LongName>0000035 - Disclosure - Restructuring and Asset Impairment Charges (Tables)</LongName>
      <ReportType>Sheet</ReportType>
      <Role>http://www.xyleminc.com/role/RestructuringandAssetImpairmentChargesTables</Role>
      <ShortName>Restructuring and Asset Impairment Charges (Tables)</ShortName>
      <MenuCategory>Tables</MenuCategory>
      <ParentRole>http://www.xyleminc.com/role/RestructuringandAssetImpairmentCharges</ParentRole>
      <Position>35</Position>
    </Report>
    <Report instance="xyl-20221231.htm">
      <IsDefault>false</IsDefault>
      <HasEmbeddedReports>false</HasEmbeddedReports>
      <HtmlFileName>R36.htm</HtmlFileName>
      <LongName>0000036 - Disclosure - Revenue (Tables)</LongName>
      <ReportType>Sheet</ReportType>
      <Role>http://www.xyleminc.com/role/RevenueTables</Role>
      <ShortName>Revenue (Tables)</ShortName>
      <MenuCategory>Tables</MenuCategory>
      <ParentRole>http://www.xyleminc.com/role/Revenue</ParentRole>
      <Position>36</Position>
    </Report>
    <Report instance="xyl-20221231.htm">
      <IsDefault>false</IsDefault>
      <HasEmbeddedReports>false</HasEmbeddedReports>
      <HtmlFileName>R37.htm</HtmlFileName>
      <LongName>0000037 - Disclosure - Other Non-Operating Income, Net (Tables)</LongName>
      <ReportType>Sheet</ReportType>
      <Role>http://www.xyleminc.com/role/OtherNonOperatingIncomeNetTables</Role>
      <ShortName>Other Non-Operating Income, Net (Tables)</ShortName>
      <MenuCategory>Tables</MenuCategory>
      <ParentRole>http://www.xyleminc.com/role/OtherNonOperatingIncomeNet</ParentRole>
      <Position>37</Position>
    </Report>
    <Report instance="xyl-20221231.htm">
      <IsDefault>false</IsDefault>
      <HasEmbeddedReports>false</HasEmbeddedReports>
      <HtmlFileName>R38.htm</HtmlFileName>
      <LongName>0000038 - Disclosure - Income Taxes (Tables)</LongName>
      <ReportType>Sheet</ReportType>
      <Role>http://www.xyleminc.com/role/IncomeTaxesTables</Role>
      <ShortName>Income Taxes (Tables)</ShortName>
      <MenuCategory>Tables</MenuCategory>
      <ParentRole>http://www.xyleminc.com/role/IncomeTaxes</ParentRole>
      <Position>38</Position>
    </Report>
    <Report instance="xyl-20221231.htm">
      <IsDefault>false</IsDefault>
      <HasEmbeddedReports>false</HasEmbeddedReports>
      <HtmlFileName>R39.htm</HtmlFileName>
      <LongName>0000039 - Disclosure - Earnings Per Share (Tables)</LongName>
      <ReportType>Sheet</ReportType>
      <Role>http://www.xyleminc.com/role/EarningsPerShareTables</Role>
      <ShortName>Earnings Per Share (Tables)</ShortName>
      <MenuCategory>Tables</MenuCategory>
      <ParentRole>http://www.xyleminc.com/role/EarningsPerShare</ParentRole>
      <Position>39</Position>
    </Report>
    <Report instance="xyl-20221231.htm">
      <IsDefault>false</IsDefault>
      <HasEmbeddedReports>false</HasEmbeddedReports>
      <HtmlFileName>R40.htm</HtmlFileName>
      <LongName>0000040 - Disclosure - Inventories (Tables)</LongName>
      <ReportType>Sheet</ReportType>
      <Role>http://www.xyleminc.com/role/InventoriesTables</Role>
      <ShortName>Inventories (Tables)</ShortName>
      <MenuCategory>Tables</MenuCategory>
      <ParentRole>http://www.xyleminc.com/role/Inventories</ParentRole>
      <Position>40</Position>
    </Report>
    <Report instance="xyl-20221231.htm">
      <IsDefault>false</IsDefault>
      <HasEmbeddedReports>false</HasEmbeddedReports>
      <HtmlFileName>R41.htm</HtmlFileName>
      <LongName>0000041 - Disclosure - Property, Plant and Equipment (Tables)</LongName>
      <ReportType>Sheet</ReportType>
      <Role>http://www.xyleminc.com/role/PropertyPlantandEquipmentTables</Role>
      <ShortName>Property, Plant and Equipment (Tables)</ShortName>
      <MenuCategory>Tables</MenuCategory>
      <ParentRole>http://www.xyleminc.com/role/PropertyPlantandEquipment</ParentRole>
      <Position>41</Position>
    </Report>
    <Report instance="xyl-20221231.htm">
      <IsDefault>false</IsDefault>
      <HasEmbeddedReports>false</HasEmbeddedReports>
      <HtmlFileName>R42.htm</HtmlFileName>
      <LongName>0000042 - Disclosure - Leases (Tables)</LongName>
      <ReportType>Sheet</ReportType>
      <Role>http://www.xyleminc.com/role/LeasesTables</Role>
      <ShortName>Leases (Tables)</ShortName>
      <MenuCategory>Tables</MenuCategory>
      <ParentRole>http://www.xyleminc.com/role/Leases</ParentRole>
      <Position>42</Position>
    </Report>
    <Report instance="xyl-20221231.htm">
      <IsDefault>false</IsDefault>
      <HasEmbeddedReports>false</HasEmbeddedReports>
      <HtmlFileName>R43.htm</HtmlFileName>
      <LongName>0000043 - Disclosure - Goodwill and Other Intangible Assets (Tables)</LongName>
      <ReportType>Sheet</ReportType>
      <Role>http://www.xyleminc.com/role/GoodwillandOtherIntangibleAssetsTables</Role>
      <ShortName>Goodwill and Other Intangible Assets (Tables)</ShortName>
      <MenuCategory>Tables</MenuCategory>
      <ParentRole>http://www.xyleminc.com/role/GoodwillandOtherIntangibleAssets</ParentRole>
      <Position>43</Position>
    </Report>
    <Report instance="xyl-20221231.htm">
      <IsDefault>false</IsDefault>
      <HasEmbeddedReports>false</HasEmbeddedReports>
      <HtmlFileName>R44.htm</HtmlFileName>
      <LongName>0000044 - Disclosure - Accrued and Other Current Liabilities (Tables)</LongName>
      <ReportType>Sheet</ReportType>
      <Role>http://www.xyleminc.com/role/AccruedandOtherCurrentLiabilitiesTables</Role>
      <ShortName>Accrued and Other Current Liabilities (Tables)</ShortName>
      <MenuCategory>Tables</MenuCategory>
      <ParentRole>http://www.xyleminc.com/role/AccruedandOtherCurrentLiabilities</ParentRole>
      <Position>44</Position>
    </Report>
    <Report instance="xyl-20221231.htm">
      <IsDefault>false</IsDefault>
      <HasEmbeddedReports>false</HasEmbeddedReports>
      <HtmlFileName>R45.htm</HtmlFileName>
      <LongName>0000045 - Disclosure - Credit Facilities and Long-Term Debt (Tables)</LongName>
      <ReportType>Sheet</ReportType>
      <Role>http://www.xyleminc.com/role/CreditFacilitiesandLongTermDebtTables</Role>
      <ShortName>Credit Facilities and Long-Term Debt (Tables)</ShortName>
      <MenuCategory>Tables</MenuCategory>
      <ParentRole>http://www.xyleminc.com/role/CreditFacilitiesandLongTermDebt</ParentRole>
      <Position>45</Position>
    </Report>
    <Report instance="xyl-20221231.htm">
      <IsDefault>false</IsDefault>
      <HasEmbeddedReports>false</HasEmbeddedReports>
      <HtmlFileName>R46.htm</HtmlFileName>
      <LongName>0000046 - Disclosure - Derivative Financial Instruments (Tables)</LongName>
      <ReportType>Sheet</ReportType>
      <Role>http://www.xyleminc.com/role/DerivativeFinancialInstrumentsTables</Role>
      <ShortName>Derivative Financial Instruments (Tables)</ShortName>
      <MenuCategory>Tables</MenuCategory>
      <ParentRole>http://www.xyleminc.com/role/DerivativeFinancialInstruments</ParentRole>
      <Position>46</Position>
    </Report>
    <Report instance="xyl-20221231.htm">
      <IsDefault>false</IsDefault>
      <HasEmbeddedReports>false</HasEmbeddedReports>
      <HtmlFileName>R47.htm</HtmlFileName>
      <LongName>0000047 - Disclosure - Postretirement Benefit Plans (Tables)</LongName>
      <ReportType>Sheet</ReportType>
      <Role>http://www.xyleminc.com/role/PostretirementBenefitPlansTables</Role>
      <ShortName>Postretirement Benefit Plans (Tables)</ShortName>
      <MenuCategory>Tables</MenuCategory>
      <ParentRole>http://www.xyleminc.com/role/PostretirementBenefitPlans</ParentRole>
      <Position>47</Position>
    </Report>
    <Report instance="xyl-20221231.htm">
      <IsDefault>false</IsDefault>
      <HasEmbeddedReports>false</HasEmbeddedReports>
      <HtmlFileName>R48.htm</HtmlFileName>
      <LongName>0000048 - Disclosure - Share-Based Compensation Plans (Tables)</LongName>
      <ReportType>Sheet</ReportType>
      <Role>http://www.xyleminc.com/role/ShareBasedCompensationPlansTables</Role>
      <ShortName>Share-Based Compensation Plans (Tables)</ShortName>
      <MenuCategory>Tables</MenuCategory>
      <ParentRole>http://www.xyleminc.com/role/ShareBasedCompensationPlans</ParentRole>
      <Position>48</Position>
    </Report>
    <Report instance="xyl-20221231.htm">
      <IsDefault>false</IsDefault>
      <HasEmbeddedReports>false</HasEmbeddedReports>
      <HtmlFileName>R49.htm</HtmlFileName>
      <LongName>0000049 - Disclosure - Capital Stock (Tables)</LongName>
      <ReportType>Sheet</ReportType>
      <Role>http://www.xyleminc.com/role/CapitalStockTables</Role>
      <ShortName>Capital Stock (Tables)</ShortName>
      <MenuCategory>Tables</MenuCategory>
      <ParentRole>http://www.xyleminc.com/role/CapitalStock</ParentRole>
      <Position>49</Position>
    </Report>
    <Report instance="xyl-20221231.htm">
      <IsDefault>false</IsDefault>
      <HasEmbeddedReports>false</HasEmbeddedReports>
      <HtmlFileName>R50.htm</HtmlFileName>
      <LongName>0000050 - Disclosure - Accumulated Other Comprehensive Loss (Tables)</LongName>
      <ReportType>Sheet</ReportType>
      <Role>http://www.xyleminc.com/role/AccumulatedOtherComprehensiveLossTables</Role>
      <ShortName>Accumulated Other Comprehensive Loss (Tables)</ShortName>
      <MenuCategory>Tables</MenuCategory>
      <ParentRole>http://www.xyleminc.com/role/AccumulatedOtherComprehensiveLoss</ParentRole>
      <Position>50</Position>
    </Report>
    <Report instance="xyl-20221231.htm">
      <IsDefault>false</IsDefault>
      <HasEmbeddedReports>false</HasEmbeddedReports>
      <HtmlFileName>R51.htm</HtmlFileName>
      <LongName>0000051 - Disclosure - Commitments and Contingencies (Tables)</LongName>
      <ReportType>Sheet</ReportType>
      <Role>http://www.xyleminc.com/role/CommitmentsandContingenciesTables</Role>
      <ShortName>Commitments and Contingencies (Tables)</ShortName>
      <MenuCategory>Tables</MenuCategory>
      <ParentRole>http://www.xyleminc.com/role/CommitmentsandContingencies</ParentRole>
      <Position>51</Position>
    </Report>
    <Report instance="xyl-20221231.htm">
      <IsDefault>false</IsDefault>
      <HasEmbeddedReports>false</HasEmbeddedReports>
      <HtmlFileName>R52.htm</HtmlFileName>
      <LongName>0000052 - Disclosure - Related Party Transactions (Tables)</LongName>
      <ReportType>Sheet</ReportType>
      <Role>http://www.xyleminc.com/role/RelatedPartyTransactionsTables</Role>
      <ShortName>Related Party Transactions (Tables)</ShortName>
      <MenuCategory>Tables</MenuCategory>
      <ParentRole>http://www.xyleminc.com/role/RelatedPartyTransactions</ParentRole>
      <Position>52</Position>
    </Report>
    <Report instance="xyl-20221231.htm">
      <IsDefault>false</IsDefault>
      <HasEmbeddedReports>false</HasEmbeddedReports>
      <HtmlFileName>R53.htm</HtmlFileName>
      <LongName>0000053 - Disclosure - Segment and Geographic Data (Tables)</LongName>
      <ReportType>Sheet</ReportType>
      <Role>http://www.xyleminc.com/role/SegmentandGeographicDataTables</Role>
      <ShortName>Segment and Geographic Data (Tables)</ShortName>
      <MenuCategory>Tables</MenuCategory>
      <ParentRole>http://www.xyleminc.com/role/SegmentandGeographicData</ParentRole>
      <Position>53</Position>
    </Report>
    <Report instance="xyl-20221231.htm">
      <IsDefault>false</IsDefault>
      <HasEmbeddedReports>false</HasEmbeddedReports>
      <HtmlFileName>R54.htm</HtmlFileName>
      <LongName>0000054 - Disclosure - Valuation and Qualifying Accounts (Tables)</LongName>
      <ReportType>Sheet</ReportType>
      <Role>http://www.xyleminc.com/role/ValuationandQualifyingAccountsTables</Role>
      <ShortName>Valuation and Qualifying Accounts (Tables)</ShortName>
      <MenuCategory>Tables</MenuCategory>
      <ParentRole>http://www.xyleminc.com/role/ValuationandQualifyingAccounts</ParentRole>
      <Position>54</Position>
    </Report>
    <Report instance="xyl-20221231.htm">
      <IsDefault>false</IsDefault>
      <HasEmbeddedReports>false</HasEmbeddedReports>
      <HtmlFileName>R55.htm</HtmlFileName>
      <LongName>0000055 - Disclosure - Summary of Significant Accounting Policies (Property, Plant and Equipment, Useful Lives) (Details)</LongName>
      <ReportType>Sheet</ReportType>
      <Role>http://www.xyleminc.com/role/SummaryofSignificantAccountingPoliciesPropertyPlantandEquipmentUsefulLivesDetails</Role>
      <ShortName>Summary of Significant Accounting Policies (Property, Plant and Equipment, Useful Lives) (Details)</ShortName>
      <MenuCategory>Details</MenuCategory>
      <ParentRole>http://www.xyleminc.com/role/SummaryofSignificantAccountingPoliciesTables</ParentRole>
      <Position>55</Position>
    </Report>
    <Report instance="xyl-20221231.htm">
      <IsDefault>false</IsDefault>
      <HasEmbeddedReports>false</HasEmbeddedReports>
      <HtmlFileName>R56.htm</HtmlFileName>
      <LongName>0000056 - Disclosure - Summary of Significant Accounting Policies (Details Textual)</LongName>
      <ReportType>Sheet</ReportType>
      <Role>http://www.xyleminc.com/role/SummaryofSignificantAccountingPoliciesDetailsTextual</Role>
      <ShortName>Summary of Significant Accounting Policies (Details Textual)</ShortName>
      <MenuCategory>Details</MenuCategory>
      <ParentRole>http://www.xyleminc.com/role/SummaryofSignificantAccountingPoliciesTables</ParentRole>
      <Position>56</Position>
    </Report>
    <Report instance="xyl-20221231.htm">
      <IsDefault>false</IsDefault>
      <HasEmbeddedReports>false</HasEmbeddedReports>
      <HtmlFileName>R57.htm</HtmlFileName>
      <LongName>0000057 - Disclosure - Restructuring and Asset Impairment Charges (Components of Restructuring Charges and Segment Allocation) (Details)</LongName>
      <ReportType>Sheet</ReportType>
      <Role>http://www.xyleminc.com/role/RestructuringandAssetImpairmentChargesComponentsofRestructuringChargesandSegmentAllocationDetails</Role>
      <ShortName>Restructuring and Asset Impairment Charges (Components of Restructuring Charges and Segment Allocation) (Details)</ShortName>
      <MenuCategory>Details</MenuCategory>
      <ParentRole>http://www.xyleminc.com/role/RestructuringandAssetImpairmentChargesTables</ParentRole>
      <Position>57</Position>
    </Report>
    <Report instance="xyl-20221231.htm">
      <IsDefault>false</IsDefault>
      <HasEmbeddedReports>false</HasEmbeddedReports>
      <HtmlFileName>R58.htm</HtmlFileName>
      <LongName>0000058 - Disclosure - Restructuring and Asset Impairment Charges (Restructuring Reserve Rollforward) (Details)</LongName>
      <ReportType>Sheet</ReportType>
      <Role>http://www.xyleminc.com/role/RestructuringandAssetImpairmentChargesRestructuringReserveRollforwardDetails</Role>
      <ShortName>Restructuring and Asset Impairment Charges (Restructuring Reserve Rollforward) (Details)</ShortName>
      <MenuCategory>Details</MenuCategory>
      <ParentRole>http://www.xyleminc.com/role/RestructuringandAssetImpairmentChargesTables</ParentRole>
      <Position>58</Position>
    </Report>
    <Report instance="xyl-20221231.htm">
      <IsDefault>false</IsDefault>
      <HasEmbeddedReports>false</HasEmbeddedReports>
      <HtmlFileName>R59.htm</HtmlFileName>
      <LongName>0000059 - Disclosure - Restructuring and Asset Impairment Charges - Narrative (Details)</LongName>
      <ReportType>Sheet</ReportType>
      <Role>http://www.xyleminc.com/role/RestructuringandAssetImpairmentChargesNarrativeDetails</Role>
      <ShortName>Restructuring and Asset Impairment Charges - Narrative (Details)</ShortName>
      <MenuCategory>Details</MenuCategory>
      <Position>59</Position>
    </Report>
    <Report instance="xyl-20221231.htm">
      <IsDefault>false</IsDefault>
      <HasEmbeddedReports>false</HasEmbeddedReports>
      <HtmlFileName>R60.htm</HtmlFileName>
      <LongName>0000060 - Disclosure - Restructuring and Asset Impairment Charges - Estimated Restructuring Costs (Details)</LongName>
      <ReportType>Sheet</ReportType>
      <Role>http://www.xyleminc.com/role/RestructuringandAssetImpairmentChargesEstimatedRestructuringCostsDetails</Role>
      <ShortName>Restructuring and Asset Impairment Charges - Estimated Restructuring Costs (Details)</ShortName>
      <MenuCategory>Details</MenuCategory>
      <Position>60</Position>
    </Report>
    <Report instance="xyl-20221231.htm">
      <IsDefault>false</IsDefault>
      <HasEmbeddedReports>false</HasEmbeddedReports>
      <HtmlFileName>R61.htm</HtmlFileName>
      <LongName>0000061 - Disclosure - Revenue (Details)</LongName>
      <ReportType>Sheet</ReportType>
      <Role>http://www.xyleminc.com/role/RevenueDetails</Role>
      <ShortName>Revenue (Details)</ShortName>
      <MenuCategory>Details</MenuCategory>
      <ParentRole>http://www.xyleminc.com/role/RevenueTables</ParentRole>
      <Position>61</Position>
    </Report>
    <Report instance="xyl-20221231.htm">
      <IsDefault>false</IsDefault>
      <HasEmbeddedReports>false</HasEmbeddedReports>
      <HtmlFileName>R62.htm</HtmlFileName>
      <LongName>0000062 - Disclosure - Revenue - Disaggregation of Revenue (Details)</LongName>
      <ReportType>Sheet</ReportType>
      <Role>http://www.xyleminc.com/role/RevenueDisaggregationofRevenueDetails</Role>
      <ShortName>Revenue - Disaggregation of Revenue (Details)</ShortName>
      <MenuCategory>Details</MenuCategory>
      <Position>62</Position>
    </Report>
    <Report instance="xyl-20221231.htm">
      <IsDefault>false</IsDefault>
      <HasEmbeddedReports>false</HasEmbeddedReports>
      <HtmlFileName>R63.htm</HtmlFileName>
      <LongName>0000063 - Disclosure - Revenue (Narrative) (Details)</LongName>
      <ReportType>Sheet</ReportType>
      <Role>http://www.xyleminc.com/role/RevenueNarrativeDetails</Role>
      <ShortName>Revenue (Narrative) (Details)</ShortName>
      <MenuCategory>Details</MenuCategory>
      <ParentRole>http://www.xyleminc.com/role/RevenueTables</ParentRole>
      <Position>63</Position>
    </Report>
    <Report instance="xyl-20221231.htm">
      <IsDefault>false</IsDefault>
      <HasEmbeddedReports>false</HasEmbeddedReports>
      <HtmlFileName>R64.htm</HtmlFileName>
      <LongName>0000064 - Disclosure - Other Non-Operating Income, Net (Details)</LongName>
      <ReportType>Sheet</ReportType>
      <Role>http://www.xyleminc.com/role/OtherNonOperatingIncomeNetDetails</Role>
      <ShortName>Other Non-Operating Income, Net (Details)</ShortName>
      <MenuCategory>Details</MenuCategory>
      <ParentRole>http://www.xyleminc.com/role/OtherNonOperatingIncomeNetTables</ParentRole>
      <Position>64</Position>
    </Report>
    <Report instance="xyl-20221231.htm">
      <IsDefault>false</IsDefault>
      <HasEmbeddedReports>false</HasEmbeddedReports>
      <HtmlFileName>R65.htm</HtmlFileName>
      <LongName>0000065 - Disclosure - Income Taxes (Components of Income Tax Expense) (Details)</LongName>
      <ReportType>Sheet</ReportType>
      <Role>http://www.xyleminc.com/role/IncomeTaxesComponentsofIncomeTaxExpenseDetails</Role>
      <ShortName>Income Taxes (Components of Income Tax Expense) (Details)</ShortName>
      <MenuCategory>Details</MenuCategory>
      <ParentRole>http://www.xyleminc.com/role/IncomeTaxesTables</ParentRole>
      <Position>65</Position>
    </Report>
    <Report instance="xyl-20221231.htm">
      <IsDefault>false</IsDefault>
      <HasEmbeddedReports>false</HasEmbeddedReports>
      <HtmlFileName>R66.htm</HtmlFileName>
      <LongName>0000066 - Disclosure - Income Taxes (Income Tax Rate Reconciliation) (Details)</LongName>
      <ReportType>Sheet</ReportType>
      <Role>http://www.xyleminc.com/role/IncomeTaxesIncomeTaxRateReconciliationDetails</Role>
      <ShortName>Income Taxes (Income Tax Rate Reconciliation) (Details)</ShortName>
      <MenuCategory>Details</MenuCategory>
      <ParentRole>http://www.xyleminc.com/role/IncomeTaxesTables</ParentRole>
      <Position>66</Position>
    </Report>
    <Report instance="xyl-20221231.htm">
      <IsDefault>false</IsDefault>
      <HasEmbeddedReports>false</HasEmbeddedReports>
      <HtmlFileName>R67.htm</HtmlFileName>
      <LongName>0000067 - Disclosure - Income Taxes (Components of Deferred Tax Assets and Liabilities) (Details)</LongName>
      <ReportType>Sheet</ReportType>
      <Role>http://www.xyleminc.com/role/IncomeTaxesComponentsofDeferredTaxAssetsandLiabilitiesDetails</Role>
      <ShortName>Income Taxes (Components of Deferred Tax Assets and Liabilities) (Details)</ShortName>
      <MenuCategory>Details</MenuCategory>
      <ParentRole>http://www.xyleminc.com/role/IncomeTaxesTables</ParentRole>
      <Position>67</Position>
    </Report>
    <Report instance="xyl-20221231.htm">
      <IsDefault>false</IsDefault>
      <HasEmbeddedReports>false</HasEmbeddedReports>
      <HtmlFileName>R68.htm</HtmlFileName>
      <LongName>0000068 - Disclosure - Income Taxes (Reconciliation of Valuation Allowance of Deferred Tax Assets) (Details)</LongName>
      <ReportType>Sheet</ReportType>
      <Role>http://www.xyleminc.com/role/IncomeTaxesReconciliationofValuationAllowanceofDeferredTaxAssetsDetails</Role>
      <ShortName>Income Taxes (Reconciliation of Valuation Allowance of Deferred Tax Assets) (Details)</ShortName>
      <MenuCategory>Details</MenuCategory>
      <ParentRole>http://www.xyleminc.com/role/IncomeTaxesTables</ParentRole>
      <Position>68</Position>
    </Report>
    <Report instance="xyl-20221231.htm">
      <IsDefault>false</IsDefault>
      <HasEmbeddedReports>false</HasEmbeddedReports>
      <HtmlFileName>R69.htm</HtmlFileName>
      <LongName>0000069 - Disclosure - Income Taxes (Classification of Unrecognized Tax Benefits) (Details)</LongName>
      <ReportType>Sheet</ReportType>
      <Role>http://www.xyleminc.com/role/IncomeTaxesClassificationofUnrecognizedTaxBenefitsDetails</Role>
      <ShortName>Income Taxes (Classification of Unrecognized Tax Benefits) (Details)</ShortName>
      <MenuCategory>Details</MenuCategory>
      <ParentRole>http://www.xyleminc.com/role/IncomeTaxesTables</ParentRole>
      <Position>69</Position>
    </Report>
    <Report instance="xyl-20221231.htm">
      <IsDefault>false</IsDefault>
      <HasEmbeddedReports>false</HasEmbeddedReports>
      <HtmlFileName>R70.htm</HtmlFileName>
      <LongName>0000070 - Disclosure - Income Taxes (Summary of Operating Losses and Tax Credits) (Details)</LongName>
      <ReportType>Sheet</ReportType>
      <Role>http://www.xyleminc.com/role/IncomeTaxesSummaryofOperatingLossesandTaxCreditsDetails</Role>
      <ShortName>Income Taxes (Summary of Operating Losses and Tax Credits) (Details)</ShortName>
      <MenuCategory>Details</MenuCategory>
      <ParentRole>http://www.xyleminc.com/role/IncomeTaxesTables</ParentRole>
      <Position>70</Position>
    </Report>
    <Report instance="xyl-20221231.htm">
      <IsDefault>false</IsDefault>
      <HasEmbeddedReports>false</HasEmbeddedReports>
      <HtmlFileName>R71.htm</HtmlFileName>
      <LongName>0000071 - Disclosure - Income Taxes (Summary of Unrecognized Tax Benefits) (Details)</LongName>
      <ReportType>Sheet</ReportType>
      <Role>http://www.xyleminc.com/role/IncomeTaxesSummaryofUnrecognizedTaxBenefitsDetails</Role>
      <ShortName>Income Taxes (Summary of Unrecognized Tax Benefits) (Details)</ShortName>
      <MenuCategory>Details</MenuCategory>
      <ParentRole>http://www.xyleminc.com/role/IncomeTaxesTables</ParentRole>
      <Position>71</Position>
    </Report>
    <Report instance="xyl-20221231.htm">
      <IsDefault>false</IsDefault>
      <HasEmbeddedReports>false</HasEmbeddedReports>
      <HtmlFileName>R72.htm</HtmlFileName>
      <LongName>0000072 - Disclosure - Income Taxes (Details Textual)</LongName>
      <ReportType>Sheet</ReportType>
      <Role>http://www.xyleminc.com/role/IncomeTaxesDetailsTextual</Role>
      <ShortName>Income Taxes (Details Textual)</ShortName>
      <MenuCategory>Details</MenuCategory>
      <ParentRole>http://www.xyleminc.com/role/IncomeTaxesTables</ParentRole>
      <Position>72</Position>
    </Report>
    <Report instance="xyl-20221231.htm">
      <IsDefault>false</IsDefault>
      <HasEmbeddedReports>false</HasEmbeddedReports>
      <HtmlFileName>R73.htm</HtmlFileName>
      <LongName>0000073 - Disclosure - Earnings Per Share (Calculation of EPS) (Details)</LongName>
      <ReportType>Sheet</ReportType>
      <Role>http://www.xyleminc.com/role/EarningsPerShareCalculationofEPSDetails</Role>
      <ShortName>Earnings Per Share (Calculation of EPS) (Details)</ShortName>
      <MenuCategory>Details</MenuCategory>
      <ParentRole>http://www.xyleminc.com/role/EarningsPerShareTables</ParentRole>
      <Position>73</Position>
    </Report>
    <Report instance="xyl-20221231.htm">
      <IsDefault>false</IsDefault>
      <HasEmbeddedReports>false</HasEmbeddedReports>
      <HtmlFileName>R74.htm</HtmlFileName>
      <LongName>0000074 - Disclosure - Earnings Per Share (Summary of Antidilutive Securities) (Details)</LongName>
      <ReportType>Sheet</ReportType>
      <Role>http://www.xyleminc.com/role/EarningsPerShareSummaryofAntidilutiveSecuritiesDetails</Role>
      <ShortName>Earnings Per Share (Summary of Antidilutive Securities) (Details)</ShortName>
      <MenuCategory>Details</MenuCategory>
      <ParentRole>http://www.xyleminc.com/role/EarningsPerShareTables</ParentRole>
      <Position>74</Position>
    </Report>
    <Report instance="xyl-20221231.htm">
      <IsDefault>false</IsDefault>
      <HasEmbeddedReports>false</HasEmbeddedReports>
      <HtmlFileName>R75.htm</HtmlFileName>
      <LongName>0000075 - Disclosure - Inventories (Details)</LongName>
      <ReportType>Sheet</ReportType>
      <Role>http://www.xyleminc.com/role/InventoriesDetails</Role>
      <ShortName>Inventories (Details)</ShortName>
      <MenuCategory>Details</MenuCategory>
      <ParentRole>http://www.xyleminc.com/role/InventoriesTables</ParentRole>
      <Position>75</Position>
    </Report>
    <Report instance="xyl-20221231.htm">
      <IsDefault>false</IsDefault>
      <HasEmbeddedReports>false</HasEmbeddedReports>
      <HtmlFileName>R76.htm</HtmlFileName>
      <LongName>0000076 - Disclosure - Property, Plant and Equipment (Components of Property, Plant and Equipment) (Details)</LongName>
      <ReportType>Sheet</ReportType>
      <Role>http://www.xyleminc.com/role/PropertyPlantandEquipmentComponentsofPropertyPlantandEquipmentDetails</Role>
      <ShortName>Property, Plant and Equipment (Components of Property, Plant and Equipment) (Details)</ShortName>
      <MenuCategory>Details</MenuCategory>
      <ParentRole>http://www.xyleminc.com/role/PropertyPlantandEquipmentTables</ParentRole>
      <Position>76</Position>
    </Report>
    <Report instance="xyl-20221231.htm">
      <IsDefault>false</IsDefault>
      <HasEmbeddedReports>false</HasEmbeddedReports>
      <HtmlFileName>R77.htm</HtmlFileName>
      <LongName>0000077 - Disclosure - Property, Plant and Equipment (Details Textual)</LongName>
      <ReportType>Sheet</ReportType>
      <Role>http://www.xyleminc.com/role/PropertyPlantandEquipmentDetailsTextual</Role>
      <ShortName>Property, Plant and Equipment (Details Textual)</ShortName>
      <MenuCategory>Details</MenuCategory>
      <ParentRole>http://www.xyleminc.com/role/PropertyPlantandEquipmentTables</ParentRole>
      <Position>77</Position>
    </Report>
    <Report instance="xyl-20221231.htm">
      <IsDefault>false</IsDefault>
      <HasEmbeddedReports>false</HasEmbeddedReports>
      <HtmlFileName>R78.htm</HtmlFileName>
      <LongName>0000078 - Disclosure - Leases (Textuals) (Details)</LongName>
      <ReportType>Sheet</ReportType>
      <Role>http://www.xyleminc.com/role/LeasesTextualsDetails</Role>
      <ShortName>Leases (Textuals) (Details)</ShortName>
      <MenuCategory>Details</MenuCategory>
      <ParentRole>http://www.xyleminc.com/role/LeasesTables</ParentRole>
      <Position>78</Position>
    </Report>
    <Report instance="xyl-20221231.htm">
      <IsDefault>false</IsDefault>
      <HasEmbeddedReports>false</HasEmbeddedReports>
      <HtmlFileName>R79.htm</HtmlFileName>
      <LongName>0000079 - Disclosure - Leases (Lease Costs) (Details)</LongName>
      <ReportType>Sheet</ReportType>
      <Role>http://www.xyleminc.com/role/LeasesLeaseCostsDetails</Role>
      <ShortName>Leases (Lease Costs) (Details)</ShortName>
      <MenuCategory>Details</MenuCategory>
      <ParentRole>http://www.xyleminc.com/role/LeasesTables</ParentRole>
      <Position>79</Position>
    </Report>
    <Report instance="xyl-20221231.htm">
      <IsDefault>false</IsDefault>
      <HasEmbeddedReports>false</HasEmbeddedReports>
      <HtmlFileName>R80.htm</HtmlFileName>
      <LongName>0000080 - Disclosure - Leases (Supplemental Lease Information) (Details)</LongName>
      <ReportType>Sheet</ReportType>
      <Role>http://www.xyleminc.com/role/LeasesSupplementalLeaseInformationDetails</Role>
      <ShortName>Leases (Supplemental Lease Information) (Details)</ShortName>
      <MenuCategory>Details</MenuCategory>
      <ParentRole>http://www.xyleminc.com/role/LeasesTables</ParentRole>
      <Position>80</Position>
    </Report>
    <Report instance="xyl-20221231.htm">
      <IsDefault>false</IsDefault>
      <HasEmbeddedReports>false</HasEmbeddedReports>
      <HtmlFileName>R81.htm</HtmlFileName>
      <LongName>0000081 - Disclosure - Leases (Maturities) (Details)</LongName>
      <ReportType>Sheet</ReportType>
      <Role>http://www.xyleminc.com/role/LeasesMaturitiesDetails</Role>
      <ShortName>Leases (Maturities) (Details)</ShortName>
      <MenuCategory>Details</MenuCategory>
      <ParentRole>http://www.xyleminc.com/role/LeasesTables</ParentRole>
      <Position>81</Position>
    </Report>
    <Report instance="xyl-20221231.htm">
      <IsDefault>false</IsDefault>
      <HasEmbeddedReports>false</HasEmbeddedReports>
      <HtmlFileName>R82.htm</HtmlFileName>
      <LongName>0000082 - Disclosure - Goodwill and Other Intangible Assets (Rollforward of Goodwill) (Details)</LongName>
      <ReportType>Sheet</ReportType>
      <Role>http://www.xyleminc.com/role/GoodwillandOtherIntangibleAssetsRollforwardofGoodwillDetails</Role>
      <ShortName>Goodwill and Other Intangible Assets (Rollforward of Goodwill) (Details)</ShortName>
      <MenuCategory>Details</MenuCategory>
      <ParentRole>http://www.xyleminc.com/role/GoodwillandOtherIntangibleAssetsTables</ParentRole>
      <Position>82</Position>
    </Report>
    <Report instance="xyl-20221231.htm">
      <IsDefault>false</IsDefault>
      <HasEmbeddedReports>false</HasEmbeddedReports>
      <HtmlFileName>R83.htm</HtmlFileName>
      <LongName>0000083 - Disclosure - Goodwill and Other Intangible Assets (Details Textual)</LongName>
      <ReportType>Sheet</ReportType>
      <Role>http://www.xyleminc.com/role/GoodwillandOtherIntangibleAssetsDetailsTextual</Role>
      <ShortName>Goodwill and Other Intangible Assets (Details Textual)</ShortName>
      <MenuCategory>Details</MenuCategory>
      <ParentRole>http://www.xyleminc.com/role/GoodwillandOtherIntangibleAssetsTables</ParentRole>
      <Position>83</Position>
    </Report>
    <Report instance="xyl-20221231.htm">
      <IsDefault>false</IsDefault>
      <HasEmbeddedReports>false</HasEmbeddedReports>
      <HtmlFileName>R84.htm</HtmlFileName>
      <LongName>0000084 - Disclosure - Goodwill and Other Intangible Assets (Summary of Other Intangible Assets) (Details)</LongName>
      <ReportType>Sheet</ReportType>
      <Role>http://www.xyleminc.com/role/GoodwillandOtherIntangibleAssetsSummaryofOtherIntangibleAssetsDetails</Role>
      <ShortName>Goodwill and Other Intangible Assets (Summary of Other Intangible Assets) (Details)</ShortName>
      <MenuCategory>Details</MenuCategory>
      <ParentRole>http://www.xyleminc.com/role/GoodwillandOtherIntangibleAssetsTables</ParentRole>
      <Position>84</Position>
    </Report>
    <Report instance="xyl-20221231.htm">
      <IsDefault>false</IsDefault>
      <HasEmbeddedReports>false</HasEmbeddedReports>
      <HtmlFileName>R85.htm</HtmlFileName>
      <LongName>0000085 - Disclosure - Goodwill and Other Intangible Assets (Estimated Amortization Expense) (Details)</LongName>
      <ReportType>Sheet</ReportType>
      <Role>http://www.xyleminc.com/role/GoodwillandOtherIntangibleAssetsEstimatedAmortizationExpenseDetails</Role>
      <ShortName>Goodwill and Other Intangible Assets (Estimated Amortization Expense) (Details)</ShortName>
      <MenuCategory>Details</MenuCategory>
      <ParentRole>http://www.xyleminc.com/role/GoodwillandOtherIntangibleAssetsTables</ParentRole>
      <Position>85</Position>
    </Report>
    <Report instance="xyl-20221231.htm">
      <IsDefault>false</IsDefault>
      <HasEmbeddedReports>false</HasEmbeddedReports>
      <HtmlFileName>R86.htm</HtmlFileName>
      <LongName>0000086 - Disclosure - Accrued and Other Current Liabilities (Details)</LongName>
      <ReportType>Sheet</ReportType>
      <Role>http://www.xyleminc.com/role/AccruedandOtherCurrentLiabilitiesDetails</Role>
      <ShortName>Accrued and Other Current Liabilities (Details)</ShortName>
      <MenuCategory>Details</MenuCategory>
      <ParentRole>http://www.xyleminc.com/role/AccruedandOtherCurrentLiabilitiesTables</ParentRole>
      <Position>86</Position>
    </Report>
    <Report instance="xyl-20221231.htm">
      <IsDefault>false</IsDefault>
      <HasEmbeddedReports>false</HasEmbeddedReports>
      <HtmlFileName>R87.htm</HtmlFileName>
      <LongName>0000087 - Disclosure - Credit Facilities and Long-Term Debt (Summary of Debt Outstanding) (Details)</LongName>
      <ReportType>Sheet</ReportType>
      <Role>http://www.xyleminc.com/role/CreditFacilitiesandLongTermDebtSummaryofDebtOutstandingDetails</Role>
      <ShortName>Credit Facilities and Long-Term Debt (Summary of Debt Outstanding) (Details)</ShortName>
      <MenuCategory>Details</MenuCategory>
      <ParentRole>http://www.xyleminc.com/role/CreditFacilitiesandLongTermDebtTables</ParentRole>
      <Position>87</Position>
    </Report>
    <Report instance="xyl-20221231.htm">
      <IsDefault>false</IsDefault>
      <HasEmbeddedReports>false</HasEmbeddedReports>
      <HtmlFileName>R88.htm</HtmlFileName>
      <LongName>0000088 - Disclosure - Credit Facilities and Long-Term Debt (Details Textual)</LongName>
      <ReportType>Sheet</ReportType>
      <Role>http://www.xyleminc.com/role/CreditFacilitiesandLongTermDebtDetailsTextual</Role>
      <ShortName>Credit Facilities and Long-Term Debt (Details Textual)</ShortName>
      <MenuCategory>Details</MenuCategory>
      <ParentRole>http://www.xyleminc.com/role/CreditFacilitiesandLongTermDebtTables</ParentRole>
      <Position>88</Position>
    </Report>
    <Report instance="xyl-20221231.htm">
      <IsDefault>false</IsDefault>
      <HasEmbeddedReports>false</HasEmbeddedReports>
      <HtmlFileName>R89.htm</HtmlFileName>
      <LongName>0000089 - Disclosure - Derivative Financial Instruments (Details)</LongName>
      <ReportType>Sheet</ReportType>
      <Role>http://www.xyleminc.com/role/DerivativeFinancialInstrumentsDetails</Role>
      <ShortName>Derivative Financial Instruments (Details)</ShortName>
      <MenuCategory>Details</MenuCategory>
      <ParentRole>http://www.xyleminc.com/role/DerivativeFinancialInstrumentsTables</ParentRole>
      <Position>89</Position>
    </Report>
    <Report instance="xyl-20221231.htm">
      <IsDefault>false</IsDefault>
      <HasEmbeddedReports>false</HasEmbeddedReports>
      <HtmlFileName>R90.htm</HtmlFileName>
      <LongName>0000090 - Disclosure - Derivative Financial Instruments (Details Textual)</LongName>
      <ReportType>Sheet</ReportType>
      <Role>http://www.xyleminc.com/role/DerivativeFinancialInstrumentsDetailsTextual</Role>
      <ShortName>Derivative Financial Instruments (Details Textual)</ShortName>
      <MenuCategory>Details</MenuCategory>
      <ParentRole>http://www.xyleminc.com/role/DerivativeFinancialInstrumentsTables</ParentRole>
      <Position>90</Position>
    </Report>
    <Report instance="xyl-20221231.htm">
      <IsDefault>false</IsDefault>
      <HasEmbeddedReports>false</HasEmbeddedReports>
      <HtmlFileName>R91.htm</HtmlFileName>
      <LongName>0000091 - Disclosure - Derivative Financial Instruments - Fair Value of Foreign Exchange Contracts (Details)</LongName>
      <ReportType>Sheet</ReportType>
      <Role>http://www.xyleminc.com/role/DerivativeFinancialInstrumentsFairValueofForeignExchangeContractsDetails</Role>
      <ShortName>Derivative Financial Instruments - Fair Value of Foreign Exchange Contracts (Details)</ShortName>
      <MenuCategory>Details</MenuCategory>
      <Position>91</Position>
    </Report>
    <Report instance="xyl-20221231.htm">
      <IsDefault>false</IsDefault>
      <HasEmbeddedReports>false</HasEmbeddedReports>
      <HtmlFileName>R92.htm</HtmlFileName>
      <LongName>0000092 - Disclosure - Postretirement Benefit Plans (Summary of Contributions by Year) (Details)</LongName>
      <ReportType>Sheet</ReportType>
      <Role>http://www.xyleminc.com/role/PostretirementBenefitPlansSummaryofContributionsbyYearDetails</Role>
      <ShortName>Postretirement Benefit Plans (Summary of Contributions by Year) (Details)</ShortName>
      <MenuCategory>Details</MenuCategory>
      <ParentRole>http://www.xyleminc.com/role/PostretirementBenefitPlansTables</ParentRole>
      <Position>92</Position>
    </Report>
    <Report instance="xyl-20221231.htm">
      <IsDefault>false</IsDefault>
      <HasEmbeddedReports>false</HasEmbeddedReports>
      <HtmlFileName>R93.htm</HtmlFileName>
      <LongName>0000093 - Disclosure - Postretirement Benefit Plans (Summary of Plan Assets, Benefit Obligation and Funded Status) (Details)</LongName>
      <ReportType>Sheet</ReportType>
      <Role>http://www.xyleminc.com/role/PostretirementBenefitPlansSummaryofPlanAssetsBenefitObligationandFundedStatusDetails</Role>
      <ShortName>Postretirement Benefit Plans (Summary of Plan Assets, Benefit Obligation and Funded Status) (Details)</ShortName>
      <MenuCategory>Details</MenuCategory>
      <ParentRole>http://www.xyleminc.com/role/PostretirementBenefitPlansTables</ParentRole>
      <Position>93</Position>
    </Report>
    <Report instance="xyl-20221231.htm">
      <IsDefault>false</IsDefault>
      <HasEmbeddedReports>false</HasEmbeddedReports>
      <HtmlFileName>R94.htm</HtmlFileName>
      <LongName>0000094 - Disclosure - Postretirement Benefit Plans (Summary of Amounts Recognized in Financial Statements) (Details)</LongName>
      <ReportType>Sheet</ReportType>
      <Role>http://www.xyleminc.com/role/PostretirementBenefitPlansSummaryofAmountsRecognizedinFinancialStatementsDetails</Role>
      <ShortName>Postretirement Benefit Plans (Summary of Amounts Recognized in Financial Statements) (Details)</ShortName>
      <MenuCategory>Details</MenuCategory>
      <ParentRole>http://www.xyleminc.com/role/PostretirementBenefitPlansTables</ParentRole>
      <Position>94</Position>
    </Report>
    <Report instance="xyl-20221231.htm">
      <IsDefault>false</IsDefault>
      <HasEmbeddedReports>false</HasEmbeddedReports>
      <HtmlFileName>R95.htm</HtmlFileName>
      <LongName>0000095 - Disclosure - Postretirement Benefit Plans (Rollforward of Obligation) (Details)</LongName>
      <ReportType>Sheet</ReportType>
      <Role>http://www.xyleminc.com/role/PostretirementBenefitPlansRollforwardofObligationDetails</Role>
      <ShortName>Postretirement Benefit Plans (Rollforward of Obligation) (Details)</ShortName>
      <MenuCategory>Details</MenuCategory>
      <ParentRole>http://www.xyleminc.com/role/PostretirementBenefitPlansTables</ParentRole>
      <Position>95</Position>
    </Report>
    <Report instance="xyl-20221231.htm">
      <IsDefault>false</IsDefault>
      <HasEmbeddedReports>false</HasEmbeddedReports>
      <HtmlFileName>R96.htm</HtmlFileName>
      <LongName>0000096 - Disclosure - Postretirement Benefit Plans (Summary of Status of Plans) (Details)</LongName>
      <ReportType>Sheet</ReportType>
      <Role>http://www.xyleminc.com/role/PostretirementBenefitPlansSummaryofStatusofPlansDetails</Role>
      <ShortName>Postretirement Benefit Plans (Summary of Status of Plans) (Details)</ShortName>
      <MenuCategory>Details</MenuCategory>
      <ParentRole>http://www.xyleminc.com/role/PostretirementBenefitPlansTables</ParentRole>
      <Position>96</Position>
    </Report>
    <Report instance="xyl-20221231.htm">
      <IsDefault>false</IsDefault>
      <HasEmbeddedReports>false</HasEmbeddedReports>
      <HtmlFileName>R97.htm</HtmlFileName>
      <LongName>0000097 - Disclosure - Postretirement Benefit Plans (Components of Pension Plans) (Details)</LongName>
      <ReportType>Sheet</ReportType>
      <Role>http://www.xyleminc.com/role/PostretirementBenefitPlansComponentsofPensionPlansDetails</Role>
      <ShortName>Postretirement Benefit Plans (Components of Pension Plans) (Details)</ShortName>
      <MenuCategory>Details</MenuCategory>
      <ParentRole>http://www.xyleminc.com/role/PostretirementBenefitPlansTables</ParentRole>
      <Position>97</Position>
    </Report>
    <Report instance="xyl-20221231.htm">
      <IsDefault>false</IsDefault>
      <HasEmbeddedReports>false</HasEmbeddedReports>
      <HtmlFileName>R98.htm</HtmlFileName>
      <LongName>0000098 - Disclosure - Postretirement Benefit Plans (Amounts Recognized in OCI) (Details)</LongName>
      <ReportType>Sheet</ReportType>
      <Role>http://www.xyleminc.com/role/PostretirementBenefitPlansAmountsRecognizedinOCIDetails</Role>
      <ShortName>Postretirement Benefit Plans (Amounts Recognized in OCI) (Details)</ShortName>
      <MenuCategory>Details</MenuCategory>
      <ParentRole>http://www.xyleminc.com/role/PostretirementBenefitPlansTables</ParentRole>
      <Position>98</Position>
    </Report>
    <Report instance="xyl-20221231.htm">
      <IsDefault>false</IsDefault>
      <HasEmbeddedReports>false</HasEmbeddedReports>
      <HtmlFileName>R99.htm</HtmlFileName>
      <LongName>0000099 - Disclosure - Postretirement Benefit Plans (Components of Net Periodic Benefit Cost) (Details)</LongName>
      <ReportType>Sheet</ReportType>
      <Role>http://www.xyleminc.com/role/PostretirementBenefitPlansComponentsofNetPeriodicBenefitCostDetails</Role>
      <ShortName>Postretirement Benefit Plans (Components of Net Periodic Benefit Cost) (Details)</ShortName>
      <MenuCategory>Details</MenuCategory>
      <ParentRole>http://www.xyleminc.com/role/PostretirementBenefitPlansTables</ParentRole>
      <Position>99</Position>
    </Report>
    <Report instance="xyl-20221231.htm">
      <IsDefault>false</IsDefault>
      <HasEmbeddedReports>false</HasEmbeddedReports>
      <HtmlFileName>R100.htm</HtmlFileName>
      <LongName>0000100 - Disclosure - Postretirement Benefit Plans (Discount Rates) (Details)</LongName>
      <ReportType>Sheet</ReportType>
      <Role>http://www.xyleminc.com/role/PostretirementBenefitPlansDiscountRatesDetails</Role>
      <ShortName>Postretirement Benefit Plans (Discount Rates) (Details)</ShortName>
      <MenuCategory>Details</MenuCategory>
      <ParentRole>http://www.xyleminc.com/role/PostretirementBenefitPlansTables</ParentRole>
      <Position>100</Position>
    </Report>
    <Report instance="xyl-20221231.htm">
      <IsDefault>false</IsDefault>
      <HasEmbeddedReports>false</HasEmbeddedReports>
      <HtmlFileName>R101.htm</HtmlFileName>
      <LongName>0000101 - Disclosure - Postretirement Benefit Plans (Valuation Assumptions) (Details)</LongName>
      <ReportType>Sheet</ReportType>
      <Role>http://www.xyleminc.com/role/PostretirementBenefitPlansValuationAssumptionsDetails</Role>
      <ShortName>Postretirement Benefit Plans (Valuation Assumptions) (Details)</ShortName>
      <MenuCategory>Details</MenuCategory>
      <ParentRole>http://www.xyleminc.com/role/PostretirementBenefitPlansTables</ParentRole>
      <Position>101</Position>
    </Report>
    <Report instance="xyl-20221231.htm">
      <IsDefault>false</IsDefault>
      <HasEmbeddedReports>false</HasEmbeddedReports>
      <HtmlFileName>R102.htm</HtmlFileName>
      <LongName>0000102 - Disclosure - Postretirement Benefit Plans (Target Allocations) (Details)</LongName>
      <ReportType>Sheet</ReportType>
      <Role>http://www.xyleminc.com/role/PostretirementBenefitPlansTargetAllocationsDetails</Role>
      <ShortName>Postretirement Benefit Plans (Target Allocations) (Details)</ShortName>
      <MenuCategory>Details</MenuCategory>
      <ParentRole>http://www.xyleminc.com/role/PostretirementBenefitPlansTables</ParentRole>
      <Position>102</Position>
    </Report>
    <Report instance="xyl-20221231.htm">
      <IsDefault>false</IsDefault>
      <HasEmbeddedReports>false</HasEmbeddedReports>
      <HtmlFileName>R103.htm</HtmlFileName>
      <LongName>0000103 - Disclosure - Postretirement Benefit Plans (Fair Value of Plan Assets) (Details)</LongName>
      <ReportType>Sheet</ReportType>
      <Role>http://www.xyleminc.com/role/PostretirementBenefitPlansFairValueofPlanAssetsDetails</Role>
      <ShortName>Postretirement Benefit Plans (Fair Value of Plan Assets) (Details)</ShortName>
      <MenuCategory>Details</MenuCategory>
      <ParentRole>http://www.xyleminc.com/role/PostretirementBenefitPlansTables</ParentRole>
      <Position>103</Position>
    </Report>
    <Report instance="xyl-20221231.htm">
      <IsDefault>false</IsDefault>
      <HasEmbeddedReports>false</HasEmbeddedReports>
      <HtmlFileName>R104.htm</HtmlFileName>
      <LongName>0000104 - Disclosure - Postretirement Benefit Plans (Rollforward of Fair Value Measurements) (Details)</LongName>
      <ReportType>Sheet</ReportType>
      <Role>http://www.xyleminc.com/role/PostretirementBenefitPlansRollforwardofFairValueMeasurementsDetails</Role>
      <ShortName>Postretirement Benefit Plans (Rollforward of Fair Value Measurements) (Details)</ShortName>
      <MenuCategory>Details</MenuCategory>
      <ParentRole>http://www.xyleminc.com/role/PostretirementBenefitPlansTables</ParentRole>
      <Position>104</Position>
    </Report>
    <Report instance="xyl-20221231.htm">
      <IsDefault>false</IsDefault>
      <HasEmbeddedReports>false</HasEmbeddedReports>
      <HtmlFileName>R105.htm</HtmlFileName>
      <LongName>0000105 - Disclosure - Postretirement Benefit Plans (Future Benefit Payments) (Details)</LongName>
      <ReportType>Sheet</ReportType>
      <Role>http://www.xyleminc.com/role/PostretirementBenefitPlansFutureBenefitPaymentsDetails</Role>
      <ShortName>Postretirement Benefit Plans (Future Benefit Payments) (Details)</ShortName>
      <MenuCategory>Details</MenuCategory>
      <ParentRole>http://www.xyleminc.com/role/PostretirementBenefitPlansTables</ParentRole>
      <Position>105</Position>
    </Report>
    <Report instance="xyl-20221231.htm">
      <IsDefault>false</IsDefault>
      <HasEmbeddedReports>false</HasEmbeddedReports>
      <HtmlFileName>R106.htm</HtmlFileName>
      <LongName>0000106 - Disclosure - Postretirement Benefit Plans (Details Textual)</LongName>
      <ReportType>Sheet</ReportType>
      <Role>http://www.xyleminc.com/role/PostretirementBenefitPlansDetailsTextual</Role>
      <ShortName>Postretirement Benefit Plans (Details Textual)</ShortName>
      <MenuCategory>Details</MenuCategory>
      <ParentRole>http://www.xyleminc.com/role/PostretirementBenefitPlansTables</ParentRole>
      <Position>106</Position>
    </Report>
    <Report instance="xyl-20221231.htm">
      <IsDefault>false</IsDefault>
      <HasEmbeddedReports>false</HasEmbeddedReports>
      <HtmlFileName>R107.htm</HtmlFileName>
      <LongName>0000107 - Disclosure - Share-Based Compensation Plans (Stock Option Activity) (Details)</LongName>
      <ReportType>Sheet</ReportType>
      <Role>http://www.xyleminc.com/role/ShareBasedCompensationPlansStockOptionActivityDetails</Role>
      <ShortName>Share-Based Compensation Plans (Stock Option Activity) (Details)</ShortName>
      <MenuCategory>Details</MenuCategory>
      <ParentRole>http://www.xyleminc.com/role/ShareBasedCompensationPlansTables</ParentRole>
      <Position>107</Position>
    </Report>
    <Report instance="xyl-20221231.htm">
      <IsDefault>false</IsDefault>
      <HasEmbeddedReports>false</HasEmbeddedReports>
      <HtmlFileName>R108.htm</HtmlFileName>
      <LongName>0000108 - Disclosure - Share-Based Compensation Plans (Fair Value Assumptions) (Details)</LongName>
      <ReportType>Sheet</ReportType>
      <Role>http://www.xyleminc.com/role/ShareBasedCompensationPlansFairValueAssumptionsDetails</Role>
      <ShortName>Share-Based Compensation Plans (Fair Value Assumptions) (Details)</ShortName>
      <MenuCategory>Details</MenuCategory>
      <ParentRole>http://www.xyleminc.com/role/ShareBasedCompensationPlansTables</ParentRole>
      <Position>108</Position>
    </Report>
    <Report instance="xyl-20221231.htm">
      <IsDefault>false</IsDefault>
      <HasEmbeddedReports>false</HasEmbeddedReports>
      <HtmlFileName>R109.htm</HtmlFileName>
      <LongName>0000109 - Disclosure - Share-Based Compensation Plans (Restricted Stock Unit Activity) (Details)</LongName>
      <ReportType>Sheet</ReportType>
      <Role>http://www.xyleminc.com/role/ShareBasedCompensationPlansRestrictedStockUnitActivityDetails</Role>
      <ShortName>Share-Based Compensation Plans (Restricted Stock Unit Activity) (Details)</ShortName>
      <MenuCategory>Details</MenuCategory>
      <ParentRole>http://www.xyleminc.com/role/ShareBasedCompensationPlansTables</ParentRole>
      <Position>109</Position>
    </Report>
    <Report instance="xyl-20221231.htm">
      <IsDefault>false</IsDefault>
      <HasEmbeddedReports>false</HasEmbeddedReports>
      <HtmlFileName>R110.htm</HtmlFileName>
      <LongName>0000110 - Disclosure - Share-Based Compensation Plans (Performance Share Activity) (Details)</LongName>
      <ReportType>Sheet</ReportType>
      <Role>http://www.xyleminc.com/role/ShareBasedCompensationPlansPerformanceShareActivityDetails</Role>
      <ShortName>Share-Based Compensation Plans (Performance Share Activity) (Details)</ShortName>
      <MenuCategory>Details</MenuCategory>
      <ParentRole>http://www.xyleminc.com/role/ShareBasedCompensationPlansTables</ParentRole>
      <Position>110</Position>
    </Report>
    <Report instance="xyl-20221231.htm">
      <IsDefault>false</IsDefault>
      <HasEmbeddedReports>false</HasEmbeddedReports>
      <HtmlFileName>R111.htm</HtmlFileName>
      <LongName>0000111 - Disclosure - Share-Based Compensation Plans (Details Textual)</LongName>
      <ReportType>Sheet</ReportType>
      <Role>http://www.xyleminc.com/role/ShareBasedCompensationPlansDetailsTextual</Role>
      <ShortName>Share-Based Compensation Plans (Details Textual)</ShortName>
      <MenuCategory>Details</MenuCategory>
      <ParentRole>http://www.xyleminc.com/role/ShareBasedCompensationPlansTables</ParentRole>
      <Position>111</Position>
    </Report>
    <Report instance="xyl-20221231.htm">
      <IsDefault>false</IsDefault>
      <HasEmbeddedReports>false</HasEmbeddedReports>
      <HtmlFileName>R112.htm</HtmlFileName>
      <LongName>0000112 - Disclosure - Share-Based Compensation Plans (TSR Fair Value Assumptions) (Details)</LongName>
      <ReportType>Sheet</ReportType>
      <Role>http://www.xyleminc.com/role/ShareBasedCompensationPlansTSRFairValueAssumptionsDetails</Role>
      <ShortName>Share-Based Compensation Plans (TSR Fair Value Assumptions) (Details)</ShortName>
      <MenuCategory>Details</MenuCategory>
      <ParentRole>http://www.xyleminc.com/role/ShareBasedCompensationPlansTables</ParentRole>
      <Position>112</Position>
    </Report>
    <Report instance="xyl-20221231.htm">
      <IsDefault>false</IsDefault>
      <HasEmbeddedReports>false</HasEmbeddedReports>
      <HtmlFileName>R113.htm</HtmlFileName>
      <LongName>0000113 - Disclosure - Share-Based Compensation Plans - Revenue Performance Share Units (Details)</LongName>
      <ReportType>Sheet</ReportType>
      <Role>http://www.xyleminc.com/role/ShareBasedCompensationPlansRevenuePerformanceShareUnitsDetails</Role>
      <ShortName>Share-Based Compensation Plans - Revenue Performance Share Units (Details)</ShortName>
      <MenuCategory>Details</MenuCategory>
      <Position>113</Position>
    </Report>
    <Report instance="xyl-20221231.htm">
      <IsDefault>false</IsDefault>
      <HasEmbeddedReports>false</HasEmbeddedReports>
      <HtmlFileName>R114.htm</HtmlFileName>
      <LongName>0000114 - Disclosure - Capital Stock (Details Textual)</LongName>
      <ReportType>Sheet</ReportType>
      <Role>http://www.xyleminc.com/role/CapitalStockDetailsTextual</Role>
      <ShortName>Capital Stock (Details Textual)</ShortName>
      <MenuCategory>Details</MenuCategory>
      <ParentRole>http://www.xyleminc.com/role/CapitalStockTables</ParentRole>
      <Position>114</Position>
    </Report>
    <Report instance="xyl-20221231.htm">
      <IsDefault>false</IsDefault>
      <HasEmbeddedReports>false</HasEmbeddedReports>
      <HtmlFileName>R115.htm</HtmlFileName>
      <LongName>0000115 - Disclosure - Capital Stock (Changes in Common Stock Outstanding) (Details)</LongName>
      <ReportType>Sheet</ReportType>
      <Role>http://www.xyleminc.com/role/CapitalStockChangesinCommonStockOutstandingDetails</Role>
      <ShortName>Capital Stock (Changes in Common Stock Outstanding) (Details)</ShortName>
      <MenuCategory>Details</MenuCategory>
      <ParentRole>http://www.xyleminc.com/role/CapitalStockTables</ParentRole>
      <Position>115</Position>
    </Report>
    <Report instance="xyl-20221231.htm">
      <IsDefault>false</IsDefault>
      <HasEmbeddedReports>false</HasEmbeddedReports>
      <HtmlFileName>R116.htm</HtmlFileName>
      <LongName>0000116 - Disclosure - Accumulated Other Comprehensive Loss (Details)</LongName>
      <ReportType>Sheet</ReportType>
      <Role>http://www.xyleminc.com/role/AccumulatedOtherComprehensiveLossDetails</Role>
      <ShortName>Accumulated Other Comprehensive Loss (Details)</ShortName>
      <MenuCategory>Details</MenuCategory>
      <ParentRole>http://www.xyleminc.com/role/AccumulatedOtherComprehensiveLossTables</ParentRole>
      <Position>116</Position>
    </Report>
    <Report instance="xyl-20221231.htm">
      <IsDefault>false</IsDefault>
      <HasEmbeddedReports>false</HasEmbeddedReports>
      <HtmlFileName>R117.htm</HtmlFileName>
      <LongName>0000117 - Disclosure - Commitments and Contingencies (Rollforward of Warranties) (Details)</LongName>
      <ReportType>Sheet</ReportType>
      <Role>http://www.xyleminc.com/role/CommitmentsandContingenciesRollforwardofWarrantiesDetails</Role>
      <ShortName>Commitments and Contingencies (Rollforward of Warranties) (Details)</ShortName>
      <MenuCategory>Details</MenuCategory>
      <ParentRole>http://www.xyleminc.com/role/CommitmentsandContingenciesTables</ParentRole>
      <Position>117</Position>
    </Report>
    <Report instance="xyl-20221231.htm">
      <IsDefault>false</IsDefault>
      <HasEmbeddedReports>false</HasEmbeddedReports>
      <HtmlFileName>R118.htm</HtmlFileName>
      <LongName>0000118 - Disclosure - Commitments and Contingencies (Details Textual)</LongName>
      <ReportType>Sheet</ReportType>
      <Role>http://www.xyleminc.com/role/CommitmentsandContingenciesDetailsTextual</Role>
      <ShortName>Commitments and Contingencies (Details Textual)</ShortName>
      <MenuCategory>Details</MenuCategory>
      <ParentRole>http://www.xyleminc.com/role/CommitmentsandContingenciesTables</ParentRole>
      <Position>118</Position>
    </Report>
    <Report instance="xyl-20221231.htm">
      <IsDefault>false</IsDefault>
      <HasEmbeddedReports>false</HasEmbeddedReports>
      <HtmlFileName>R119.htm</HtmlFileName>
      <LongName>0000119 - Disclosure - Related Party Transactions (Details)</LongName>
      <ReportType>Sheet</ReportType>
      <Role>http://www.xyleminc.com/role/RelatedPartyTransactionsDetails</Role>
      <ShortName>Related Party Transactions (Details)</ShortName>
      <MenuCategory>Details</MenuCategory>
      <ParentRole>http://www.xyleminc.com/role/RelatedPartyTransactionsTables</ParentRole>
      <Position>119</Position>
    </Report>
    <Report instance="xyl-20221231.htm">
      <IsDefault>false</IsDefault>
      <HasEmbeddedReports>false</HasEmbeddedReports>
      <HtmlFileName>R120.htm</HtmlFileName>
      <LongName>0000120 - Disclosure - Segment and Geographic Data (Summary of Operating Results by Segment) (Details)</LongName>
      <ReportType>Sheet</ReportType>
      <Role>http://www.xyleminc.com/role/SegmentandGeographicDataSummaryofOperatingResultsbySegmentDetails</Role>
      <ShortName>Segment and Geographic Data (Summary of Operating Results by Segment) (Details)</ShortName>
      <MenuCategory>Details</MenuCategory>
      <ParentRole>http://www.xyleminc.com/role/SegmentandGeographicDataTables</ParentRole>
      <Position>120</Position>
    </Report>
    <Report instance="xyl-20221231.htm">
      <IsDefault>false</IsDefault>
      <HasEmbeddedReports>false</HasEmbeddedReports>
      <HtmlFileName>R121.htm</HtmlFileName>
      <LongName>0000121 - Disclosure - Segment and Geographic Data (Revenue by Segment) (Details)</LongName>
      <ReportType>Sheet</ReportType>
      <Role>http://www.xyleminc.com/role/SegmentandGeographicDataRevenuebySegmentDetails</Role>
      <ShortName>Segment and Geographic Data (Revenue by Segment) (Details)</ShortName>
      <MenuCategory>Details</MenuCategory>
      <ParentRole>http://www.xyleminc.com/role/SegmentandGeographicDataTables</ParentRole>
      <Position>121</Position>
    </Report>
    <Report instance="xyl-20221231.htm">
      <IsDefault>false</IsDefault>
      <HasEmbeddedReports>false</HasEmbeddedReports>
      <HtmlFileName>R122.htm</HtmlFileName>
      <LongName>0000122 - Disclosure - Segment and Geographic Data (Assets by Segment (Details)</LongName>
      <ReportType>Sheet</ReportType>
      <Role>http://www.xyleminc.com/role/SegmentandGeographicDataAssetsbySegmentDetails</Role>
      <ShortName>Segment and Geographic Data (Assets by Segment (Details)</ShortName>
      <MenuCategory>Details</MenuCategory>
      <ParentRole>http://www.xyleminc.com/role/SegmentandGeographicDataTables</ParentRole>
      <Position>122</Position>
    </Report>
    <Report instance="xyl-20221231.htm">
      <IsDefault>false</IsDefault>
      <HasEmbeddedReports>false</HasEmbeddedReports>
      <HtmlFileName>R123.htm</HtmlFileName>
      <LongName>0000123 - Disclosure - Segment and Geographic Data (Summary of Revenue and Property, Plant and Equipment by Geographical Location) (Details)</LongName>
      <ReportType>Sheet</ReportType>
      <Role>http://www.xyleminc.com/role/SegmentandGeographicDataSummaryofRevenueandPropertyPlantandEquipmentbyGeographicalLocationDetails</Role>
      <ShortName>Segment and Geographic Data (Summary of Revenue and Property, Plant and Equipment by Geographical Location) (Details)</ShortName>
      <MenuCategory>Details</MenuCategory>
      <ParentRole>http://www.xyleminc.com/role/SegmentandGeographicDataTables</ParentRole>
      <Position>123</Position>
    </Report>
    <Report instance="xyl-20221231.htm">
      <IsDefault>false</IsDefault>
      <HasEmbeddedReports>false</HasEmbeddedReports>
      <HtmlFileName>R124.htm</HtmlFileName>
      <LongName>0000124 - Disclosure - Valuation and Qualifying Accounts (Details)</LongName>
      <ReportType>Sheet</ReportType>
      <Role>http://www.xyleminc.com/role/ValuationandQualifyingAccountsDetails</Role>
      <ShortName>Valuation and Qualifying Accounts (Details)</ShortName>
      <MenuCategory>Details</MenuCategory>
      <ParentRole>http://www.xyleminc.com/role/ValuationandQualifyingAccountsTables</ParentRole>
      <Position>124</Position>
    </Report>
    <Report instance="xyl-20221231.htm">
      <IsDefault>false</IsDefault>
      <HasEmbeddedReports>false</HasEmbeddedReports>
      <HtmlFileName>R125.htm</HtmlFileName>
      <LongName>0000125 - Disclosure - Subsequent Events (Details)</LongName>
      <ReportType>Sheet</ReportType>
      <Role>http://www.xyleminc.com/role/SubsequentEventsDetails</Role>
      <ShortName>Subsequent Events (Details)</ShortName>
      <MenuCategory>Details</MenuCategory>
      <ParentRole>http://www.xyleminc.com/role/SubsequentEvents</ParentRole>
      <Position>125</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-K" original="xyl-20221231.htm">xyl-20221231.htm</File>
    <File>xyl-20221231.xsd</File>
    <File>xyl-20221231_cal.xml</File>
    <File>xyl-20221231_def.xml</File>
    <File>xyl-20221231_lab.xml</File>
    <File>xyl-20221231_pre.xml</File>
    <File>xyl12312022ex21.htm</File>
    <File>xyl12312022ex231.htm</File>
    <File>xyl12312022ex311.htm</File>
    <File>xyl12312022ex312.htm</File>
    <File>xyl12312022ex321.htm</File>
    <File>xyl12312022ex322.htm</File>
    <File>xyl12312022ex41.htm</File>
  </InputFiles>
  <SupplementalFiles>
    <File>xyl-20221231_g1.jpg</File>
    <File>xyl-20221231_g2.jpg</File>
  </SupplementalFiles>
  <BaseTaxonomies>
    <BaseTaxonomy items="1">http://fasb.org/srt/2022</BaseTaxonomy>
    <BaseTaxonomy items="1887">http://fasb.org/us-gaap/2022</BaseTaxonomy>
    <BaseTaxonomy items="37">http://xbrl.sec.gov/dei/2022</BaseTaxonomy>
  </BaseTaxonomies>
  <HasPresentationLinkbase>true</HasPresentationLinkbase>
  <HasCalculationLinkbase>true</HasCalculationLinkbase>
</FilingSummary>
