<?xml version="1.0" encoding="utf-8"?>
<xbrl
  xmlns="http://www.xbrl.org/2003/instance"
  xmlns:dei="http://xbrl.sec.gov/dei/2025"
  xmlns:ffd="http://xbrl.sec.gov/ffd/2025"
  xmlns:iso4217="http://www.xbrl.org/2003/iso4217"
  xmlns:link="http://www.xbrl.org/2003/linkbase"
  xmlns:xbrldi="http://xbrl.org/2006/xbrldi"
  xmlns:xlink="http://www.w3.org/1999/xlink">
    <link:schemaRef
      xlink:href="https://xbrl.sec.gov/ffd/2025/ffd-2025.xsd"
      xlink:type="simple"/>
    <context id="C_d6bde72f-cdd3-4b6b-b2c2-077d5f89ff5c">
        <entity>
            <identifier scheme="http://www.sec.gov/CIK">0001979887</identifier>
        </entity>
        <period>
            <startDate>2026-03-10</startDate>
            <endDate>2026-03-10</endDate>
        </period>
    </context>
    <context id="C_7eaeaad8-6d18-4069-b2d6-df47507200d2">
        <entity>
            <identifier scheme="http://www.sec.gov/CIK">0001979887</identifier>
            <segment>
                <xbrldi:typedMember dimension="ffd:OfferingAxis">
                    <dei:lineNo>2</dei:lineNo>
                </xbrldi:typedMember>
            </segment>
        </entity>
        <period>
            <startDate>2026-03-10</startDate>
            <endDate>2026-03-10</endDate>
        </period>
    </context>
    <context id="C_7f4d3d55-e0dd-4756-bab4-4a1f1c074f05">
        <entity>
            <identifier scheme="http://www.sec.gov/CIK">0001979887</identifier>
            <segment>
                <xbrldi:typedMember dimension="ffd:OfferingAxis">
                    <dei:lineNo>1</dei:lineNo>
                </xbrldi:typedMember>
            </segment>
        </entity>
        <period>
            <startDate>2026-03-10</startDate>
            <endDate>2026-03-10</endDate>
        </period>
    </context>
    <unit id="U_pure">
        <measure>pure</measure>
    </unit>
    <unit id="U_shares">
        <measure>shares</measure>
    </unit>
    <unit id="U_USD">
        <measure>iso4217:USD</measure>
    </unit>
    <ffd:PrevslyPdFlg
      contextRef="C_7eaeaad8-6d18-4069-b2d6-df47507200d2"
      id="F_aa58b8a9-d404-41f6-8fe4-2a4d2f85a8ed">false</ffd:PrevslyPdFlg>
    <ffd:OffsetTableNa
      contextRef="C_d6bde72f-cdd3-4b6b-b2c2-077d5f89ff5c"
      id="F_bf7a30af-538e-4dcd-8b2e-a6cb9a5c916b">N/A</ffd:OffsetTableNa>
    <ffd:PrevslyPdFlg
      contextRef="C_7f4d3d55-e0dd-4756-bab4-4a1f1c074f05"
      id="F_9e7b44e2-d78d-458a-ac8d-dc8a26a628a0">false</ffd:PrevslyPdFlg>
    <dei:EntityCentralIndexKey
      contextRef="C_d6bde72f-cdd3-4b6b-b2c2-077d5f89ff5c"
      id="F_04caaf4f-a177-4c51-8be7-ed6ee8e77aaa">0001979887</dei:EntityCentralIndexKey>
    <ffd:FeeExhibitTp
      contextRef="C_d6bde72f-cdd3-4b6b-b2c2-077d5f89ff5c"
      id="F_0f24406f-3424-4ea6-9095-9a6ab82285db">EX-FILING FEES</ffd:FeeExhibitTp>
    <ffd:OfferingSctyTitl
      contextRef="C_7f4d3d55-e0dd-4756-bab4-4a1f1c074f05"
      id="F_25db33b2-1b7f-49a8-8f13-95ae1a1f994d">Class A ordinary shares, par value US$0.00001 per share, issuable under the Registrant's 2023 Share Incentive Plan II</ffd:OfferingSctyTitl>
    <ffd:OfferingSctyTitl
      contextRef="C_7eaeaad8-6d18-4069-b2d6-df47507200d2"
      id="F_8f473e34-2ba5-4377-ab90-1ee5163636ba">Class A ordinary shares, par value US$0.00001 per share, issuable under the Registrant's 2026 Share Incentive Plan</ffd:OfferingSctyTitl>
    <ffd:SubmissnTp
      contextRef="C_d6bde72f-cdd3-4b6b-b2c2-077d5f89ff5c"
      id="F_9b5b167e-c5d4-4213-b3aa-d3a19b617500">S-8</ffd:SubmissnTp>
    <ffd:FormTp
      contextRef="C_d6bde72f-cdd3-4b6b-b2c2-077d5f89ff5c"
      id="F_3db79621-6f91-4e22-a9f4-248abab346c3">S-8</ffd:FormTp>
    <dei:EntityRegistrantName
      contextRef="C_d6bde72f-cdd3-4b6b-b2c2-077d5f89ff5c"
      id="F_26229939-23d9-46f5-b07b-a91fbbda3047">XCHG Limited</dei:EntityRegistrantName>
    <ffd:OfferingSctyTp
      contextRef="C_7f4d3d55-e0dd-4756-bab4-4a1f1c074f05"
      id="F_9686190d-095d-4d37-8cc7-064b95ac2cee">Equity</ffd:OfferingSctyTp>
    <ffd:FeesOthrRuleFlg
      contextRef="C_7f4d3d55-e0dd-4756-bab4-4a1f1c074f05"
      id="F_f2246e22-a9b1-411c-99d6-41c9253355c3">true</ffd:FeesOthrRuleFlg>
    <ffd:AmtSctiesRegd
      contextRef="C_7f4d3d55-e0dd-4756-bab4-4a1f1c074f05"
      decimals="0"
      id="F_8b461ee7-0147-4e5a-98d0-ee16665ea917"
      unitRef="U_shares">264107643</ffd:AmtSctiesRegd>
    <ffd:MaxOfferingPricPerScty
      contextRef="C_7f4d3d55-e0dd-4756-bab4-4a1f1c074f05"
      decimals="4"
      id="F_01d141fd-001f-4df2-b9c6-c700a2ca5165"
      unitRef="U_USD">0.0298</ffd:MaxOfferingPricPerScty>
    <ffd:MaxAggtOfferingPric
      contextRef="C_7f4d3d55-e0dd-4756-bab4-4a1f1c074f05"
      decimals="3"
      id="F_9c911ac3-e4be-4414-b229-23df91244df4"
      unitRef="U_USD">7870407.761</ffd:MaxAggtOfferingPric>
    <ffd:FeeRate
      contextRef="C_7f4d3d55-e0dd-4756-bab4-4a1f1c074f05"
      decimals="7"
      id="F_37422708-4bde-468b-8817-dca249535202"
      unitRef="U_pure">0.0001381</ffd:FeeRate>
    <ffd:FeeAmt
      contextRef="C_7f4d3d55-e0dd-4756-bab4-4a1f1c074f05"
      decimals="2"
      id="F_a7b71da6-3b1d-42aa-885a-7424b2c6f935"
      unitRef="U_USD">1086.9</ffd:FeeAmt>
    <ffd:OfferingSctyTp
      contextRef="C_7eaeaad8-6d18-4069-b2d6-df47507200d2"
      id="F_c368087d-2160-4010-9219-3a3969e6150a">Equity</ffd:OfferingSctyTp>
    <ffd:FeesOthrRuleFlg
      contextRef="C_7eaeaad8-6d18-4069-b2d6-df47507200d2"
      id="F_bae36406-e8e2-404f-8e1b-9a93a4adf93c">true</ffd:FeesOthrRuleFlg>
    <ffd:AmtSctiesRegd
      contextRef="C_7eaeaad8-6d18-4069-b2d6-df47507200d2"
      decimals="0"
      id="F_cce5228c-f392-40d0-879d-79ae5450d526"
      unitRef="U_shares">1492028626</ffd:AmtSctiesRegd>
    <ffd:MaxOfferingPricPerScty
      contextRef="C_7eaeaad8-6d18-4069-b2d6-df47507200d2"
      decimals="4"
      id="F_4bb03828-8ceb-49cd-b82b-3aa0219e4f7d"
      unitRef="U_USD">0.0298</ffd:MaxOfferingPricPerScty>
    <ffd:MaxAggtOfferingPric
      contextRef="C_7eaeaad8-6d18-4069-b2d6-df47507200d2"
      decimals="3"
      id="F_249528d5-bb82-4451-9cac-1e2b6e9421c1"
      unitRef="U_USD">44462453.055</ffd:MaxAggtOfferingPric>
    <ffd:FeeRate
      contextRef="C_7eaeaad8-6d18-4069-b2d6-df47507200d2"
      decimals="7"
      id="F_df48ab8e-3552-4757-befa-858743bd7f4a"
      unitRef="U_pure">0.0001381</ffd:FeeRate>
    <ffd:FeeAmt
      contextRef="C_7eaeaad8-6d18-4069-b2d6-df47507200d2"
      decimals="2"
      id="F_3111e55c-8130-4622-9aaf-bac96c85118b"
      unitRef="U_USD">6140.26</ffd:FeeAmt>
    <ffd:TtlOfferingAmt
      contextRef="C_d6bde72f-cdd3-4b6b-b2c2-077d5f89ff5c"
      decimals="3"
      id="F_29ff59c1-6974-4042-834f-745ba9fffd79"
      unitRef="U_USD">52332860.816</ffd:TtlOfferingAmt>
    <ffd:TtlFeeAmt
      contextRef="C_d6bde72f-cdd3-4b6b-b2c2-077d5f89ff5c"
      decimals="2"
      id="F_cf3d8d06-5b9b-4e3e-a2d8-69161477b135"
      unitRef="U_USD">7227.16</ffd:TtlFeeAmt>
    <ffd:TtlOffsetAmt
      contextRef="C_d6bde72f-cdd3-4b6b-b2c2-077d5f89ff5c"
      decimals="2"
      id="F_7615dbfb-2fee-4155-bdfa-7acf4f018db0"
      unitRef="U_USD">0</ffd:TtlOffsetAmt>
    <ffd:NetFeeAmt
      contextRef="C_d6bde72f-cdd3-4b6b-b2c2-077d5f89ff5c"
      decimals="2"
      id="F_40eabaca-886f-4a22-8a58-96154119495e"
      unitRef="U_USD">7227.16</ffd:NetFeeAmt>
    <ffd:OfferingNote
      contextRef="C_7f4d3d55-e0dd-4756-bab4-4a1f1c074f05"
      id="F_4e68753f-841a-484e-bd69-70cdce08c07e">&lt;div class="item-list-element-wrapper" style="margin-left:7.463%;display:flex;margin-top:0;justify-content:flex-start;align-items:baseline;margin-bottom:8pt;min-width:6.667%;text-align:left;"&gt;&lt;span style="color:#000000;white-space:pre-wrap;font-size:10pt;font-family:Times New Roman;font-kerning:none;min-width:7.204685693290251%;word-break:keep-all;display:inline-flex;justify-content:flex-start;"&gt;(1)&lt;/span&gt;&lt;div style="display:inline;"&gt;&lt;span style="color:#000000;white-space:pre-wrap;font-size:10pt;font-family:Times New Roman;font-kerning:none;min-width:fit-content;"&gt;The Class A ordinary shares of XCHG Limited (the &#x201c;Registrant&#x201d;) registered hereunder may be represented by American depositary shares (&#x201c;ADSs&#x201d;), each representing 40 of the Registrant&#x2019;s Class A ordinary shares, par value $0.00001 per share (&#x201c;Ordinary Shares&#x201d;). The ADSs issuable upon deposit of the Ordinary Shares registered hereby have been registered under a separate registration statement on Form F-6 (File No. 333-276812).&lt;/span&gt;&lt;/div&gt;&lt;/div&gt;&lt;p style="margin-left:14.173%;font-size:10pt;margin-top:0;font-family:Times New Roman;margin-bottom:8pt;text-align:left;"&gt;&lt;span style="color:#000000;white-space:pre-wrap;font-size:10pt;font-family:Times New Roman;font-kerning:none;min-width:fit-content;"&gt;Represents Ordinary Shares (or ADSs representing Ordinary Shares) reserved for future issuance under the Registrant&#x2019;s 2026 Share Incentive Plan (the &#x201c;2026 Plan&#x201d;) and Ordinary Shares (or ADSs representing Ordinary Shares) issuable upon the settlement of Restricted Share Units outstanding under the Registrant&#x2019;s 2023 Share Incentive Plan II (the &#x201c;2023 Plan II&#x201d; and, together with the 2026 Plan, the &#x201c;Plans&#x201d;). Ordinary Shares issuable upon the settlement of Restricted Share Units outstanding under the 2023 Plan II that are forfeited, terminated, expire or are otherwise cancelled may become available for issuance under the 2026 Plan. Pursuant to Rule 416(a) under the Securities Act of 1933, as amended (the &#x201c;Securities Act&#x201d;), this registration statement is deemed to cover an indeterminate number of Ordinary Shares which may be offered and issued to prevent dilution resulting from share splits, share dividends or similar transactions as provided in the Plans.&lt;/span&gt;&lt;span style="color:#000000;white-space:pre-wrap;font-size:10pt;font-family:Times New Roman;font-kerning:none;min-width:fit-content;"&gt; &lt;/span&gt;&lt;/p&gt;&lt;p style="margin-left:14.173%;font-size:10pt;margin-top:0;font-family:Times New Roman;margin-bottom:8pt;text-align:left;"&gt;&lt;span style="color:#000000;white-space:pre-wrap;font-size:10pt;font-family:Times New Roman;font-kerning:none;min-width:fit-content;"&gt;The proposed maximum offering price per share is estimated solely for the purposes of calculating the registration fee under Rule 457(c) and Rule 457(h) under the Securities Act, and is based on US$0.0298 per Ordinary Share (or US$1.193 per ADS), the average of the high and low prices for the ADSs as quoted on The Nasdaq Global Market on March 4, 2026, adjusted for the ADS to Class A ordinary share ratio of 40 Ordinary Shares per ADS.&lt;/span&gt;&lt;/p&gt;</ffd:OfferingNote>
    <ffd:OfferingNote
      contextRef="C_7eaeaad8-6d18-4069-b2d6-df47507200d2"
      id="F_1fabaec8-1fca-4beb-ba83-d4e75c54740c">&lt;div class="item-list-element-wrapper" style="margin-left:7.463%;display:flex;margin-top:0;justify-content:flex-start;align-items:baseline;margin-bottom:8pt;min-width:6.667%;text-align:left;"&gt;&lt;span style="color:#000000;white-space:pre-wrap;font-size:10pt;font-family:Times New Roman;font-kerning:none;min-width:7.204685693290251%;word-break:keep-all;display:inline-flex;justify-content:flex-start;"&gt;(1)&lt;/span&gt;&lt;div style="display:inline;"&gt;&lt;span style="color:#000000;white-space:pre-wrap;font-size:10pt;font-family:Times New Roman;font-kerning:none;min-width:fit-content;"&gt;The Class A ordinary shares of XCHG Limited (the &#x201c;Registrant&#x201d;) registered hereunder may be represented by American depositary shares (&#x201c;ADSs&#x201d;), each representing 40 of the Registrant&#x2019;s Class A ordinary shares, par value $0.00001 per share (&#x201c;Ordinary Shares&#x201d;). The ADSs issuable upon deposit of the Ordinary Shares registered hereby have been registered under a separate registration statement on Form F-6 (File No. 333-276812).&lt;/span&gt;&lt;/div&gt;&lt;/div&gt;&lt;p style="margin-left:14.173%;font-size:10pt;margin-top:0;font-family:Times New Roman;margin-bottom:8pt;text-align:left;"&gt;&lt;span style="color:#000000;white-space:pre-wrap;font-size:10pt;font-family:Times New Roman;font-kerning:none;min-width:fit-content;"&gt;Represents Ordinary Shares (or ADSs representing Ordinary Shares) reserved for future issuance under the Registrant&#x2019;s 2026 Share Incentive Plan (the &#x201c;2026 Plan&#x201d;) and Ordinary Shares (or ADSs representing Ordinary Shares) issuable upon the settlement of Restricted Share Units outstanding under the Registrant&#x2019;s 2023 Share Incentive Plan II (the &#x201c;2023 Plan II&#x201d; and, together with the 2026 Plan, the &#x201c;Plans&#x201d;). Ordinary Shares issuable upon the settlement of Restricted Share Units outstanding under the 2023 Plan II that are forfeited, terminated, expire or are otherwise cancelled may become available for issuance under the 2026 Plan. Pursuant to Rule 416(a) under the Securities Act of 1933, as amended (the &#x201c;Securities Act&#x201d;), this registration statement is deemed to cover an indeterminate number of Ordinary Shares which may be offered and issued to prevent dilution resulting from share splits, share dividends or similar transactions as provided in the Plans.&lt;/span&gt;&lt;span style="color:#000000;white-space:pre-wrap;font-size:10pt;font-family:Times New Roman;font-kerning:none;min-width:fit-content;"&gt; &lt;/span&gt;&lt;/p&gt;&lt;p style="margin-left:14.173%;font-size:10pt;margin-top:0;font-family:Times New Roman;margin-bottom:8pt;text-align:left;"&gt;&lt;span style="color:#000000;white-space:pre-wrap;font-size:10pt;font-family:Times New Roman;font-kerning:none;min-width:fit-content;"&gt;The proposed maximum offering price per share is estimated solely for the purposes of calculating the registration fee under Rule 457(c) and Rule 457(h) under the Securities Act, and is based on US$0.0298 per Ordinary Share (or US$1.193 per ADS), the average of the high and low prices for the ADSs as quoted on The Nasdaq Global Market on March 4, 2026, adjusted for the ADS to Class A ordinary share ratio of 40 Ordinary Shares per ADS.&lt;/span&gt;&lt;/p&gt;</ffd:OfferingNote>
</xbrl>
