<?xml version="1.0" encoding="utf-8"?>
<xbrl
  xmlns="http://www.xbrl.org/2003/instance"
  xmlns:dei="http://xbrl.sec.gov/dei/2025"
  xmlns:link="http://www.xbrl.org/2003/linkbase"
  xmlns:xlink="http://www.w3.org/1999/xlink">
    <link:schemaRef xlink:href="xyl-20260529.xsd" xlink:type="simple"/>
    <context id="duration_2026-05-29_to_2026-05-29">
        <entity>
            <identifier scheme="http://www.sec.gov/CIK">0001524472</identifier>
        </entity>
        <period>
            <startDate>2026-05-29</startDate>
            <endDate>2026-05-29</endDate>
        </period>
    </context>
    <dei:AmendmentFlag contextRef="duration_2026-05-29_to_2026-05-29" id="ixv-313">false</dei:AmendmentFlag>
    <dei:EntityCentralIndexKey
      contextRef="duration_2026-05-29_to_2026-05-29"
      id="Hidden_dei_EntityCentralIndexKey">0001524472</dei:EntityCentralIndexKey>
    <dei:DocumentType contextRef="duration_2026-05-29_to_2026-05-29" id="ixv-324">8-K</dei:DocumentType>
    <dei:DocumentPeriodEndDate contextRef="duration_2026-05-29_to_2026-05-29" id="ixv-325">2026-05-29</dei:DocumentPeriodEndDate>
    <dei:EntityRegistrantName contextRef="duration_2026-05-29_to_2026-05-29" id="ixv-326">XYLEM INC.</dei:EntityRegistrantName>
    <dei:EntityIncorporationStateCountryCode contextRef="duration_2026-05-29_to_2026-05-29" id="ixv-327">IN</dei:EntityIncorporationStateCountryCode>
    <dei:EntityFileNumber contextRef="duration_2026-05-29_to_2026-05-29" id="ixv-328">001-35229</dei:EntityFileNumber>
    <dei:EntityTaxIdentificationNumber contextRef="duration_2026-05-29_to_2026-05-29" id="ixv-329">45-2080495</dei:EntityTaxIdentificationNumber>
    <dei:EntityAddressAddressLine1 contextRef="duration_2026-05-29_to_2026-05-29" id="ixv-330">301 Water Street SE</dei:EntityAddressAddressLine1>
    <dei:EntityAddressCityOrTown contextRef="duration_2026-05-29_to_2026-05-29" id="ixv-331">Washington</dei:EntityAddressCityOrTown>
    <dei:EntityAddressStateOrProvince contextRef="duration_2026-05-29_to_2026-05-29" id="ixv-332">DC</dei:EntityAddressStateOrProvince>
    <dei:EntityAddressPostalZipCode contextRef="duration_2026-05-29_to_2026-05-29" id="ixv-333">20003</dei:EntityAddressPostalZipCode>
    <dei:CityAreaCode contextRef="duration_2026-05-29_to_2026-05-29" id="ixv-334">(202)</dei:CityAreaCode>
    <dei:LocalPhoneNumber contextRef="duration_2026-05-29_to_2026-05-29" id="ixv-335">869-9150</dei:LocalPhoneNumber>
    <dei:Security12bTitle contextRef="duration_2026-05-29_to_2026-05-29" id="ixv-336">Common Stock, par value $0.01 per share</dei:Security12bTitle>
    <dei:TradingSymbol contextRef="duration_2026-05-29_to_2026-05-29" id="ixv-337">XYL</dei:TradingSymbol>
    <dei:SecurityExchangeName contextRef="duration_2026-05-29_to_2026-05-29" id="ixv-338">NYSE</dei:SecurityExchangeName>
    <dei:WrittenCommunications contextRef="duration_2026-05-29_to_2026-05-29" id="ixv-339">false</dei:WrittenCommunications>
    <dei:SolicitingMaterial contextRef="duration_2026-05-29_to_2026-05-29" id="ixv-340">false</dei:SolicitingMaterial>
    <dei:PreCommencementTenderOffer contextRef="duration_2026-05-29_to_2026-05-29" id="ixv-341">false</dei:PreCommencementTenderOffer>
    <dei:PreCommencementIssuerTenderOffer contextRef="duration_2026-05-29_to_2026-05-29" id="ixv-342">false</dei:PreCommencementIssuerTenderOffer>
    <dei:EntityEmergingGrowthCompany contextRef="duration_2026-05-29_to_2026-05-29" id="ixv-343">false</dei:EntityEmergingGrowthCompany>
</xbrl>
