<?xml version="1.0"?>
<ownershipDocument>

    <schemaVersion>X0607</schemaVersion>

    <documentType>3</documentType>

    <periodOfReport>2026-03-18</periodOfReport>

    <noSecuritiesOwned>0</noSecuritiesOwned>

    <issuer>
        <issuerCik>0001979887</issuerCik>
        <issuerName>XCHG Ltd</issuerName>
        <issuerTradingSymbol>XCH</issuerTradingSymbol>
        <issuerForeignTradingSymbol></issuerForeignTradingSymbol>
    </issuer>

    <reportingOwner>
        <reportingOwnerId>
            <rptOwnerCik>0002042206</rptOwnerCik>
            <rptOwnerName>Hou Yifei</rptOwnerName>
        </reportingOwnerId>
        <reportingOwnerAddress>
            <rptOwnerNonUSAddressFlag>true</rptOwnerNonUSAddressFlag>
            <rptOwnerStreet1>XCHARGE EUROPE GMBH</rptOwnerStreet1>
            <rptOwnerStreet2>HESELSTUCKEN 18</rptOwnerStreet2>
            <rptOwnerCity>HAMBURG</rptOwnerCity>
            <rptOwnerNonUSStateTerritory></rptOwnerNonUSStateTerritory>
            <rptOwnerCountry>2M</rptOwnerCountry>
            <rptOwnerZipCode>22453</rptOwnerZipCode>
            <rptOwnerStateDescription>GERMANY</rptOwnerStateDescription>
        </reportingOwnerAddress>
        <reportingOwnerRelationship>
            <isDirector>1</isDirector>
            <isOfficer>1</isOfficer>
            <isTenPercentOwner>0</isTenPercentOwner>
            <isOther>0</isOther>
            <officerTitle>Chief Executive Officer</officerTitle>
            <otherText></otherText>
        </reportingOwnerRelationship>
    </reportingOwner>

    <nonDerivativeTable>
        <nonDerivativeHolding>
            <securityTitle>
                <value>Class A Ordinary Shares</value>
            </securityTitle>
            <postTransactionAmounts>
                <sharesOwnedFollowingTransaction>
                    <value>335962107</value>
                </sharesOwnedFollowingTransaction>
            </postTransactionAmounts>
            <ownershipNature>
                <directOrIndirectOwnership>
                    <value>D</value>
                </directOrIndirectOwnership>
            </ownershipNature>
        </nonDerivativeHolding>
    </nonDerivativeTable>

    <derivativeTable>
        <derivativeHolding>
            <securityTitle>
                <value>Class B Ordinary Shares</value>
            </securityTitle>
            <conversionOrExercisePrice>
                <footnoteId id="F1"/>
            </conversionOrExercisePrice>
            <exerciseDate>
                <footnoteId id="F1"/>
            </exerciseDate>
            <expirationDate>
                <footnoteId id="F1"/>
            </expirationDate>
            <underlyingSecurity>
                <underlyingSecurityTitle>
                    <value>Class A Ordinary Shares</value>
                </underlyingSecurityTitle>
                <underlyingSecurityShares>
                    <value>296417032</value>
                </underlyingSecurityShares>
            </underlyingSecurity>
            <ownershipNature>
                <directOrIndirectOwnership>
                    <value>D</value>
                </directOrIndirectOwnership>
            </ownershipNature>
        </derivativeHolding>
    </derivativeTable>

    <footnotes>
        <footnote id="F1">Each Class B Ordinary Share of the Issuer, par value US$0.00001 per share (each, a &quot;Class B Ordinary Share&quot;), is convertible into one Class A Ordinary Share of the Issuer, par value US$0.00001 per share (each, a &quot;Class A Ordinary Share&quot;), at any time at the option of the holder thereof and have no expiration date. Upon any sale, transfer, assignment or disposition of Class B Ordinary Shares by the holder thereof to any person which is not an affiliate of such holder, or upon a change of beneficial ownership of any Class B Ordinary Shares as a result of which any person who is not an affiliate of the holder of such Class B Ordinary Shares becomes a beneficial owner of such Class B Ordinary Shares, such Class B Ordinary Shares shall be automatically and immediately converted into an equal number of Class A Ordinary Shares. The Class A Ordinary Shares are not convertible into Class B Ordinary Shares under any circumstances.</footnote>
    </footnotes>

    <remarks>Exhibit 24 - Power of Attorney.</remarks>

    <ownerSignature>
        <signatureName>/s/ Ran Li, attorney-in-fact for Yifei Hou</signatureName>
        <signatureDate>2026-03-18</signatureDate>
    </ownerSignature>
</ownershipDocument>
