<?xml version='1.0' encoding='utf-8'?>
<FilingSummary>
  <Version>3.25.1</Version>
  <ProcessingTime/>
  <ReportFormat>html</ReportFormat>
  <ContextCount>1521</ContextCount>
  <ElementCount>723</ElementCount>
  <EntityCount>1</EntityCount>
  <FootnotesReported>false</FootnotesReported>
  <SegmentCount>369</SegmentCount>
  <ScenarioCount>0</ScenarioCount>
  <TuplesReported>false</TuplesReported>
  <UnitCount>12</UnitCount>
  <MyReports>
    <Report instance="xp-20241231.htm">
      <IsDefault>false</IsDefault>
      <HasEmbeddedReports>false</HasEmbeddedReports>
      <HtmlFileName>R1.htm</HtmlFileName>
      <LongName>0000001 - Document - Cover</LongName>
      <ReportType>Sheet</ReportType>
      <Role>http://xpinc.com/role/Cover</Role>
      <ShortName>Cover</ShortName>
      <MenuCategory>Cover</MenuCategory>
      <Position>1</Position>
    </Report>
    <Report instance="xp-20241231.htm">
      <IsDefault>false</IsDefault>
      <HasEmbeddedReports>false</HasEmbeddedReports>
      <HtmlFileName>R2.htm</HtmlFileName>
      <LongName>0000002 - Document - Audit Information</LongName>
      <ReportType>Sheet</ReportType>
      <Role>http://xpinc.com/role/AuditInformation</Role>
      <ShortName>Audit Information</ShortName>
      <MenuCategory>Cover</MenuCategory>
      <Position>2</Position>
    </Report>
    <Report instance="xp-20241231.htm">
      <IsDefault>false</IsDefault>
      <HasEmbeddedReports>false</HasEmbeddedReports>
      <HtmlFileName>R3.htm</HtmlFileName>
      <LongName>9952151 - Statement - Consolidated balance sheets</LongName>
      <ReportType>Sheet</ReportType>
      <Role>http://xpinc.com/role/Consolidatedbalancesheets</Role>
      <ShortName>Consolidated balance sheets</ShortName>
      <MenuCategory>Statements</MenuCategory>
      <Position>3</Position>
    </Report>
    <Report instance="xp-20241231.htm">
      <IsDefault>false</IsDefault>
      <HasEmbeddedReports>false</HasEmbeddedReports>
      <HtmlFileName>R4.htm</HtmlFileName>
      <LongName>9952152 - Statement - Consolidated statements of income and of comprehensive income</LongName>
      <ReportType>Sheet</ReportType>
      <Role>http://xpinc.com/role/Consolidatedstatementsofincomeandofcomprehensiveincome</Role>
      <ShortName>Consolidated statements of income and of comprehensive income</ShortName>
      <MenuCategory>Statements</MenuCategory>
      <Position>4</Position>
    </Report>
    <Report instance="xp-20241231.htm">
      <IsDefault>false</IsDefault>
      <HasEmbeddedReports>false</HasEmbeddedReports>
      <HtmlFileName>R5.htm</HtmlFileName>
      <LongName>9952153 - Statement - Consolidated statements of changes in equity</LongName>
      <ReportType>Sheet</ReportType>
      <Role>http://xpinc.com/role/Consolidatedstatementsofchangesinequity</Role>
      <ShortName>Consolidated statements of changes in equity</ShortName>
      <MenuCategory>Statements</MenuCategory>
      <Position>5</Position>
    </Report>
    <Report instance="xp-20241231.htm">
      <IsDefault>false</IsDefault>
      <HasEmbeddedReports>false</HasEmbeddedReports>
      <HtmlFileName>R6.htm</HtmlFileName>
      <LongName>9952154 - Statement - Consolidated statements of cash flows</LongName>
      <ReportType>Sheet</ReportType>
      <Role>http://xpinc.com/role/Consolidatedstatementsofcashflows</Role>
      <ShortName>Consolidated statements of cash flows</ShortName>
      <MenuCategory>Statements</MenuCategory>
      <Position>6</Position>
    </Report>
    <Report instance="xp-20241231.htm">
      <IsDefault>false</IsDefault>
      <HasEmbeddedReports>false</HasEmbeddedReports>
      <HtmlFileName>R7.htm</HtmlFileName>
      <LongName>9952155 - Disclosure - List of notes</LongName>
      <ReportType>Notes</ReportType>
      <Role>http://xpinc.com/role/Listofnotes</Role>
      <ShortName>List of notes</ShortName>
      <MenuCategory>Notes</MenuCategory>
      <Position>7</Position>
    </Report>
    <Report instance="xp-20241231.htm">
      <IsDefault>false</IsDefault>
      <HasEmbeddedReports>false</HasEmbeddedReports>
      <HtmlFileName>R8.htm</HtmlFileName>
      <LongName>9952156 - Disclosure - Cybersecurity</LongName>
      <ReportType>Sheet</ReportType>
      <Role>http://xpinc.com/role/Cybersecurity</Role>
      <ShortName>Cybersecurity</ShortName>
      <MenuCategory>Notes</MenuCategory>
      <Position>8</Position>
    </Report>
    <Report instance="xp-20241231.htm">
      <IsDefault>false</IsDefault>
      <HasEmbeddedReports>false</HasEmbeddedReports>
      <HtmlFileName>R9.htm</HtmlFileName>
      <LongName>9952157 - Disclosure - Operations</LongName>
      <ReportType>Sheet</ReportType>
      <Role>http://xpinc.com/role/Operations</Role>
      <ShortName>Operations</ShortName>
      <MenuCategory>Notes</MenuCategory>
      <Position>9</Position>
    </Report>
    <Report instance="xp-20241231.htm">
      <IsDefault>false</IsDefault>
      <HasEmbeddedReports>false</HasEmbeddedReports>
      <HtmlFileName>R10.htm</HtmlFileName>
      <LongName>9952158 - Disclosure - Basis of preparation of the financial statements and changes to the Group???s accounting policies</LongName>
      <ReportType>Sheet</ReportType>
      <Role>http://xpinc.com/role/BasisofpreparationofthefinancialstatementsandchangestotheGroupsaccountingpolicies</Role>
      <ShortName>Basis of preparation of the financial statements and changes to the Group???s accounting policies</ShortName>
      <MenuCategory>Notes</MenuCategory>
      <Position>10</Position>
    </Report>
    <Report instance="xp-20241231.htm">
      <IsDefault>false</IsDefault>
      <HasEmbeddedReports>false</HasEmbeddedReports>
      <HtmlFileName>R11.htm</HtmlFileName>
      <LongName>9952159 - Disclosure - Summary of significant accounting policies</LongName>
      <ReportType>Sheet</ReportType>
      <Role>http://xpinc.com/role/Summaryofsignificantaccountingpolicies</Role>
      <ShortName>Summary of significant accounting policies</ShortName>
      <MenuCategory>Notes</MenuCategory>
      <Position>11</Position>
    </Report>
    <Report instance="xp-20241231.htm">
      <IsDefault>false</IsDefault>
      <HasEmbeddedReports>false</HasEmbeddedReports>
      <HtmlFileName>R12.htm</HtmlFileName>
      <LongName>9952160 - Disclosure - Significant accounting judgements, estimates and assumptions</LongName>
      <ReportType>Sheet</ReportType>
      <Role>http://xpinc.com/role/Significantaccountingjudgementsestimatesandassumptions</Role>
      <ShortName>Significant accounting judgements, estimates and assumptions</ShortName>
      <MenuCategory>Notes</MenuCategory>
      <Position>12</Position>
    </Report>
    <Report instance="xp-20241231.htm">
      <IsDefault>false</IsDefault>
      <HasEmbeddedReports>false</HasEmbeddedReports>
      <HtmlFileName>R13.htm</HtmlFileName>
      <LongName>9952161 - Disclosure - Group structure</LongName>
      <ReportType>Sheet</ReportType>
      <Role>http://xpinc.com/role/Groupstructure</Role>
      <ShortName>Group structure</ShortName>
      <MenuCategory>Notes</MenuCategory>
      <Position>13</Position>
    </Report>
    <Report instance="xp-20241231.htm">
      <IsDefault>false</IsDefault>
      <HasEmbeddedReports>false</HasEmbeddedReports>
      <HtmlFileName>R14.htm</HtmlFileName>
      <LongName>9952162 - Disclosure - Securities purchased (sold) under resale (repurchase) agreements</LongName>
      <ReportType>Sheet</ReportType>
      <Role>http://xpinc.com/role/Securitiespurchasedsoldunderresalerepurchaseagreements</Role>
      <ShortName>Securities purchased (sold) under resale (repurchase) agreements</ShortName>
      <MenuCategory>Notes</MenuCategory>
      <Position>14</Position>
    </Report>
    <Report instance="xp-20241231.htm">
      <IsDefault>false</IsDefault>
      <HasEmbeddedReports>false</HasEmbeddedReports>
      <HtmlFileName>R15.htm</HtmlFileName>
      <LongName>9952163 - Disclosure - Securities</LongName>
      <ReportType>Sheet</ReportType>
      <Role>http://xpinc.com/role/Securities</Role>
      <ShortName>Securities</ShortName>
      <MenuCategory>Notes</MenuCategory>
      <Position>15</Position>
    </Report>
    <Report instance="xp-20241231.htm">
      <IsDefault>false</IsDefault>
      <HasEmbeddedReports>false</HasEmbeddedReports>
      <HtmlFileName>R16.htm</HtmlFileName>
      <LongName>9952164 - Disclosure - Derivative financial instruments</LongName>
      <ReportType>Sheet</ReportType>
      <Role>http://xpinc.com/role/Derivativefinancialinstruments</Role>
      <ShortName>Derivative financial instruments</ShortName>
      <MenuCategory>Notes</MenuCategory>
      <Position>16</Position>
    </Report>
    <Report instance="xp-20241231.htm">
      <IsDefault>false</IsDefault>
      <HasEmbeddedReports>false</HasEmbeddedReports>
      <HtmlFileName>R17.htm</HtmlFileName>
      <LongName>9952165 - Disclosure - Hedge accounting</LongName>
      <ReportType>Sheet</ReportType>
      <Role>http://xpinc.com/role/Hedgeaccounting</Role>
      <ShortName>Hedge accounting</ShortName>
      <MenuCategory>Notes</MenuCategory>
      <Position>17</Position>
    </Report>
    <Report instance="xp-20241231.htm">
      <IsDefault>false</IsDefault>
      <HasEmbeddedReports>false</HasEmbeddedReports>
      <HtmlFileName>R18.htm</HtmlFileName>
      <LongName>9952166 - Disclosure - Loan operations</LongName>
      <ReportType>Sheet</ReportType>
      <Role>http://xpinc.com/role/Loanoperations</Role>
      <ShortName>Loan operations</ShortName>
      <MenuCategory>Notes</MenuCategory>
      <Position>18</Position>
    </Report>
    <Report instance="xp-20241231.htm">
      <IsDefault>false</IsDefault>
      <HasEmbeddedReports>false</HasEmbeddedReports>
      <HtmlFileName>R19.htm</HtmlFileName>
      <LongName>9952167 - Disclosure - Accounts receivable</LongName>
      <ReportType>Sheet</ReportType>
      <Role>http://xpinc.com/role/Accountsreceivable</Role>
      <ShortName>Accounts receivable</ShortName>
      <MenuCategory>Notes</MenuCategory>
      <Position>19</Position>
    </Report>
    <Report instance="xp-20241231.htm">
      <IsDefault>false</IsDefault>
      <HasEmbeddedReports>false</HasEmbeddedReports>
      <HtmlFileName>R20.htm</HtmlFileName>
      <LongName>9952168 - Disclosure - Recoverable taxes</LongName>
      <ReportType>Sheet</ReportType>
      <Role>http://xpinc.com/role/Recoverabletaxes</Role>
      <ShortName>Recoverable taxes</ShortName>
      <MenuCategory>Notes</MenuCategory>
      <Position>20</Position>
    </Report>
    <Report instance="xp-20241231.htm">
      <IsDefault>false</IsDefault>
      <HasEmbeddedReports>false</HasEmbeddedReports>
      <HtmlFileName>R21.htm</HtmlFileName>
      <LongName>9952169 - Disclosure - Prepaid expenses</LongName>
      <ReportType>Sheet</ReportType>
      <Role>http://xpinc.com/role/Prepaidexpenses</Role>
      <ShortName>Prepaid expenses</ShortName>
      <MenuCategory>Notes</MenuCategory>
      <Position>21</Position>
    </Report>
    <Report instance="xp-20241231.htm">
      <IsDefault>false</IsDefault>
      <HasEmbeddedReports>false</HasEmbeddedReports>
      <HtmlFileName>R22.htm</HtmlFileName>
      <LongName>9952170 - Disclosure - Expected Credit Losses on Financial Assets and Reconciliation of carrying amount</LongName>
      <ReportType>Sheet</ReportType>
      <Role>http://xpinc.com/role/ExpectedCreditLossesonFinancialAssetsandReconciliationofcarryingamount</Role>
      <ShortName>Expected Credit Losses on Financial Assets and Reconciliation of carrying amount</ShortName>
      <MenuCategory>Notes</MenuCategory>
      <Position>22</Position>
    </Report>
    <Report instance="xp-20241231.htm">
      <IsDefault>false</IsDefault>
      <HasEmbeddedReports>false</HasEmbeddedReports>
      <HtmlFileName>R23.htm</HtmlFileName>
      <LongName>9952171 - Disclosure - Investments in associates and joint ventures</LongName>
      <ReportType>Sheet</ReportType>
      <Role>http://xpinc.com/role/Investmentsinassociatesandjointventures</Role>
      <ShortName>Investments in associates and joint ventures</ShortName>
      <MenuCategory>Notes</MenuCategory>
      <Position>23</Position>
    </Report>
    <Report instance="xp-20241231.htm">
      <IsDefault>false</IsDefault>
      <HasEmbeddedReports>false</HasEmbeddedReports>
      <HtmlFileName>R24.htm</HtmlFileName>
      <LongName>9952172 - Disclosure - Property, equipment, intangible assets and leases</LongName>
      <ReportType>Sheet</ReportType>
      <Role>http://xpinc.com/role/Propertyequipmentintangibleassetsandleases</Role>
      <ShortName>Property, equipment, intangible assets and leases</ShortName>
      <MenuCategory>Notes</MenuCategory>
      <Position>24</Position>
    </Report>
    <Report instance="xp-20241231.htm">
      <IsDefault>false</IsDefault>
      <HasEmbeddedReports>false</HasEmbeddedReports>
      <HtmlFileName>R25.htm</HtmlFileName>
      <LongName>9952173 - Disclosure - Financing instruments payable</LongName>
      <ReportType>Sheet</ReportType>
      <Role>http://xpinc.com/role/Financinginstrumentspayable</Role>
      <ShortName>Financing instruments payable</ShortName>
      <MenuCategory>Notes</MenuCategory>
      <Position>25</Position>
    </Report>
    <Report instance="xp-20241231.htm">
      <IsDefault>false</IsDefault>
      <HasEmbeddedReports>false</HasEmbeddedReports>
      <HtmlFileName>R26.htm</HtmlFileName>
      <LongName>9952174 - Disclosure - Securities trading and intermediation</LongName>
      <ReportType>Sheet</ReportType>
      <Role>http://xpinc.com/role/Securitiestradingandintermediation</Role>
      <ShortName>Securities trading and intermediation</ShortName>
      <MenuCategory>Notes</MenuCategory>
      <Position>26</Position>
    </Report>
    <Report instance="xp-20241231.htm">
      <IsDefault>false</IsDefault>
      <HasEmbeddedReports>false</HasEmbeddedReports>
      <HtmlFileName>R27.htm</HtmlFileName>
      <LongName>9952175 - Disclosure - Borrowings</LongName>
      <ReportType>Sheet</ReportType>
      <Role>http://xpinc.com/role/Borrowings</Role>
      <ShortName>Borrowings</ShortName>
      <MenuCategory>Notes</MenuCategory>
      <Position>27</Position>
    </Report>
    <Report instance="xp-20241231.htm">
      <IsDefault>false</IsDefault>
      <HasEmbeddedReports>false</HasEmbeddedReports>
      <HtmlFileName>R28.htm</HtmlFileName>
      <LongName>9952176 - Disclosure - Other financial assets and financial liabilities</LongName>
      <ReportType>Sheet</ReportType>
      <Role>http://xpinc.com/role/Otherfinancialassetsandfinancialliabilities</Role>
      <ShortName>Other financial assets and financial liabilities</ShortName>
      <MenuCategory>Notes</MenuCategory>
      <Position>28</Position>
    </Report>
    <Report instance="xp-20241231.htm">
      <IsDefault>false</IsDefault>
      <HasEmbeddedReports>false</HasEmbeddedReports>
      <HtmlFileName>R29.htm</HtmlFileName>
      <LongName>9952177 - Disclosure - Social and statutory obligations</LongName>
      <ReportType>Sheet</ReportType>
      <Role>http://xpinc.com/role/Socialandstatutoryobligations</Role>
      <ShortName>Social and statutory obligations</ShortName>
      <MenuCategory>Notes</MenuCategory>
      <Position>29</Position>
    </Report>
    <Report instance="xp-20241231.htm">
      <IsDefault>false</IsDefault>
      <HasEmbeddedReports>false</HasEmbeddedReports>
      <HtmlFileName>R30.htm</HtmlFileName>
      <LongName>9952178 - Disclosure - Tax and social security obligations</LongName>
      <ReportType>Sheet</ReportType>
      <Role>http://xpinc.com/role/Taxandsocialsecurityobligations</Role>
      <ShortName>Tax and social security obligations</ShortName>
      <MenuCategory>Notes</MenuCategory>
      <Position>30</Position>
    </Report>
    <Report instance="xp-20241231.htm">
      <IsDefault>false</IsDefault>
      <HasEmbeddedReports>false</HasEmbeddedReports>
      <HtmlFileName>R31.htm</HtmlFileName>
      <LongName>9952179 - Disclosure - Retirement plans liabilities</LongName>
      <ReportType>Sheet</ReportType>
      <Role>http://xpinc.com/role/Retirementplansliabilities</Role>
      <ShortName>Retirement plans liabilities</ShortName>
      <MenuCategory>Notes</MenuCategory>
      <Position>31</Position>
    </Report>
    <Report instance="xp-20241231.htm">
      <IsDefault>false</IsDefault>
      <HasEmbeddedReports>false</HasEmbeddedReports>
      <HtmlFileName>R32.htm</HtmlFileName>
      <LongName>9952180 - Disclosure - Income tax</LongName>
      <ReportType>Sheet</ReportType>
      <Role>http://xpinc.com/role/Incometax</Role>
      <ShortName>Income tax</ShortName>
      <MenuCategory>Notes</MenuCategory>
      <Position>32</Position>
    </Report>
    <Report instance="xp-20241231.htm">
      <IsDefault>false</IsDefault>
      <HasEmbeddedReports>false</HasEmbeddedReports>
      <HtmlFileName>R33.htm</HtmlFileName>
      <LongName>9952181 - Disclosure - Equity</LongName>
      <ReportType>Sheet</ReportType>
      <Role>http://xpinc.com/role/Equity</Role>
      <ShortName>Equity</ShortName>
      <MenuCategory>Notes</MenuCategory>
      <Position>33</Position>
    </Report>
    <Report instance="xp-20241231.htm">
      <IsDefault>false</IsDefault>
      <HasEmbeddedReports>false</HasEmbeddedReports>
      <HtmlFileName>R34.htm</HtmlFileName>
      <LongName>9952182 - Disclosure - Related party transactions</LongName>
      <ReportType>Sheet</ReportType>
      <Role>http://xpinc.com/role/Relatedpartytransactions</Role>
      <ShortName>Related party transactions</ShortName>
      <MenuCategory>Notes</MenuCategory>
      <Position>34</Position>
    </Report>
    <Report instance="xp-20241231.htm">
      <IsDefault>false</IsDefault>
      <HasEmbeddedReports>false</HasEmbeddedReports>
      <HtmlFileName>R35.htm</HtmlFileName>
      <LongName>9952183 - Disclosure - Provisions and contingent liabilities</LongName>
      <ReportType>Sheet</ReportType>
      <Role>http://xpinc.com/role/Provisionsandcontingentliabilities</Role>
      <ShortName>Provisions and contingent liabilities</ShortName>
      <MenuCategory>Notes</MenuCategory>
      <Position>35</Position>
    </Report>
    <Report instance="xp-20241231.htm">
      <IsDefault>false</IsDefault>
      <HasEmbeddedReports>false</HasEmbeddedReports>
      <HtmlFileName>R36.htm</HtmlFileName>
      <LongName>9952184 - Disclosure - Other assets and other liabilities</LongName>
      <ReportType>Sheet</ReportType>
      <Role>http://xpinc.com/role/Otherassetsandotherliabilities</Role>
      <ShortName>Other assets and other liabilities</ShortName>
      <MenuCategory>Notes</MenuCategory>
      <Position>36</Position>
    </Report>
    <Report instance="xp-20241231.htm">
      <IsDefault>false</IsDefault>
      <HasEmbeddedReports>false</HasEmbeddedReports>
      <HtmlFileName>R37.htm</HtmlFileName>
      <LongName>9952185 - Disclosure - Total revenue and income</LongName>
      <ReportType>Sheet</ReportType>
      <Role>http://xpinc.com/role/Totalrevenueandincome</Role>
      <ShortName>Total revenue and income</ShortName>
      <MenuCategory>Notes</MenuCategory>
      <Position>37</Position>
    </Report>
    <Report instance="xp-20241231.htm">
      <IsDefault>false</IsDefault>
      <HasEmbeddedReports>false</HasEmbeddedReports>
      <HtmlFileName>R38.htm</HtmlFileName>
      <LongName>9952186 - Disclosure - Operating costs</LongName>
      <ReportType>Sheet</ReportType>
      <Role>http://xpinc.com/role/Operatingcosts</Role>
      <ShortName>Operating costs</ShortName>
      <MenuCategory>Notes</MenuCategory>
      <Position>38</Position>
    </Report>
    <Report instance="xp-20241231.htm">
      <IsDefault>false</IsDefault>
      <HasEmbeddedReports>false</HasEmbeddedReports>
      <HtmlFileName>R39.htm</HtmlFileName>
      <LongName>9952187 - Disclosure - Operating expenses by nature</LongName>
      <ReportType>Sheet</ReportType>
      <Role>http://xpinc.com/role/Operatingexpensesbynature</Role>
      <ShortName>Operating expenses by nature</ShortName>
      <MenuCategory>Notes</MenuCategory>
      <Position>39</Position>
    </Report>
    <Report instance="xp-20241231.htm">
      <IsDefault>false</IsDefault>
      <HasEmbeddedReports>false</HasEmbeddedReports>
      <HtmlFileName>R40.htm</HtmlFileName>
      <LongName>9952188 - Disclosure - Other operating income/(expenses), net</LongName>
      <ReportType>Sheet</ReportType>
      <Role>http://xpinc.com/role/Otheroperatingincomeexpensesnet</Role>
      <ShortName>Other operating income/(expenses), net</ShortName>
      <MenuCategory>Notes</MenuCategory>
      <Position>40</Position>
    </Report>
    <Report instance="xp-20241231.htm">
      <IsDefault>false</IsDefault>
      <HasEmbeddedReports>false</HasEmbeddedReports>
      <HtmlFileName>R41.htm</HtmlFileName>
      <LongName>9952189 - Disclosure - Share-based plan</LongName>
      <ReportType>Sheet</ReportType>
      <Role>http://xpinc.com/role/Sharebasedplan</Role>
      <ShortName>Share-based plan</ShortName>
      <MenuCategory>Notes</MenuCategory>
      <Position>41</Position>
    </Report>
    <Report instance="xp-20241231.htm">
      <IsDefault>false</IsDefault>
      <HasEmbeddedReports>false</HasEmbeddedReports>
      <HtmlFileName>R42.htm</HtmlFileName>
      <LongName>9952190 - Disclosure - Earnings per share (basic and diluted)</LongName>
      <ReportType>Sheet</ReportType>
      <Role>http://xpinc.com/role/Earningspersharebasicanddiluted</Role>
      <ShortName>Earnings per share (basic and diluted)</ShortName>
      <MenuCategory>Notes</MenuCategory>
      <Position>42</Position>
    </Report>
    <Report instance="xp-20241231.htm">
      <IsDefault>false</IsDefault>
      <HasEmbeddedReports>false</HasEmbeddedReports>
      <HtmlFileName>R43.htm</HtmlFileName>
      <LongName>9952191 - Disclosure - Determination of fair value</LongName>
      <ReportType>Sheet</ReportType>
      <Role>http://xpinc.com/role/Determinationoffairvalue</Role>
      <ShortName>Determination of fair value</ShortName>
      <MenuCategory>Notes</MenuCategory>
      <Position>43</Position>
    </Report>
    <Report instance="xp-20241231.htm">
      <IsDefault>false</IsDefault>
      <HasEmbeddedReports>false</HasEmbeddedReports>
      <HtmlFileName>R44.htm</HtmlFileName>
      <LongName>9952192 - Disclosure - Management of financial risks and financial instruments</LongName>
      <ReportType>Sheet</ReportType>
      <Role>http://xpinc.com/role/Managementoffinancialrisksandfinancialinstruments</Role>
      <ShortName>Management of financial risks and financial instruments</ShortName>
      <MenuCategory>Notes</MenuCategory>
      <Position>44</Position>
    </Report>
    <Report instance="xp-20241231.htm">
      <IsDefault>false</IsDefault>
      <HasEmbeddedReports>false</HasEmbeddedReports>
      <HtmlFileName>R45.htm</HtmlFileName>
      <LongName>9952193 - Disclosure - Capital management</LongName>
      <ReportType>Sheet</ReportType>
      <Role>http://xpinc.com/role/Capitalmanagement</Role>
      <ShortName>Capital management</ShortName>
      <MenuCategory>Notes</MenuCategory>
      <Position>45</Position>
    </Report>
    <Report instance="xp-20241231.htm">
      <IsDefault>false</IsDefault>
      <HasEmbeddedReports>false</HasEmbeddedReports>
      <HtmlFileName>R46.htm</HtmlFileName>
      <LongName>9952194 - Disclosure - Cash flow information</LongName>
      <ReportType>Sheet</ReportType>
      <Role>http://xpinc.com/role/Cashflowinformation</Role>
      <ShortName>Cash flow information</ShortName>
      <MenuCategory>Notes</MenuCategory>
      <Position>46</Position>
    </Report>
    <Report instance="xp-20241231.htm">
      <IsDefault>false</IsDefault>
      <HasEmbeddedReports>false</HasEmbeddedReports>
      <HtmlFileName>R47.htm</HtmlFileName>
      <LongName>9952195 - Disclosure - Subsequent events</LongName>
      <ReportType>Sheet</ReportType>
      <Role>http://xpinc.com/role/Subsequentevents</Role>
      <ShortName>Subsequent events</ShortName>
      <MenuCategory>Notes</MenuCategory>
      <Position>47</Position>
    </Report>
    <Report instance="xp-20241231.htm">
      <IsDefault>false</IsDefault>
      <HasEmbeddedReports>false</HasEmbeddedReports>
      <HtmlFileName>R48.htm</HtmlFileName>
      <LongName>995447 - Disclosure - Insider Trading Policies and Procedures</LongName>
      <ReportType>Sheet</ReportType>
      <Role>http://xbrl.sec.gov/ecd/role/InsiderTradingPoliciesProc</Role>
      <ShortName>Insider Trading Policies and Procedures</ShortName>
      <MenuCategory>Notes</MenuCategory>
      <Position>48</Position>
    </Report>
    <Report instance="xp-20241231.htm">
      <IsDefault>false</IsDefault>
      <HasEmbeddedReports>false</HasEmbeddedReports>
      <HtmlFileName>R49.htm</HtmlFileName>
      <LongName>995550 - Disclosure - Cybersecurity Risk Management and Strategy Disclosure</LongName>
      <ReportType>Sheet</ReportType>
      <Role>http://xbrl.sec.gov/cyd/role/CybersecurityRiskManagementAndStrategyDisclosure</Role>
      <ShortName>Cybersecurity Risk Management and Strategy Disclosure</ShortName>
      <MenuCategory>Notes</MenuCategory>
      <Position>49</Position>
    </Report>
    <Report instance="xp-20241231.htm">
      <IsDefault>false</IsDefault>
      <HasEmbeddedReports>false</HasEmbeddedReports>
      <HtmlFileName>R50.htm</HtmlFileName>
      <LongName>9955511 - Disclosure - Corporate information and statement of IFRS compliance (Policies)</LongName>
      <ReportType>Sheet</ReportType>
      <Role>http://xpinc.com/role/CorporateinformationandstatementofIFRScompliancePolicies</Role>
      <ShortName>Corporate information and statement of IFRS compliance (Policies)</ShortName>
      <MenuCategory>Policies</MenuCategory>
      <Position>50</Position>
    </Report>
    <Report instance="xp-20241231.htm">
      <IsDefault>false</IsDefault>
      <HasEmbeddedReports>false</HasEmbeddedReports>
      <HtmlFileName>R51.htm</HtmlFileName>
      <LongName>9955512 - Disclosure - Summary of significant accounting policies (Policies)</LongName>
      <ReportType>Sheet</ReportType>
      <Role>http://xpinc.com/role/SummaryofsignificantaccountingpoliciesPolicies</Role>
      <ShortName>Summary of significant accounting policies (Policies)</ShortName>
      <MenuCategory>Policies</MenuCategory>
      <Position>51</Position>
    </Report>
    <Report instance="xp-20241231.htm">
      <IsDefault>false</IsDefault>
      <HasEmbeddedReports>false</HasEmbeddedReports>
      <HtmlFileName>R52.htm</HtmlFileName>
      <LongName>9955513 - Disclosure - Summary of significant accounting policies (Tables)</LongName>
      <ReportType>Sheet</ReportType>
      <Role>http://xpinc.com/role/SummaryofsignificantaccountingpoliciesTables</Role>
      <ShortName>Summary of significant accounting policies (Tables)</ShortName>
      <MenuCategory>Tables</MenuCategory>
      <ParentRole>http://xpinc.com/role/Summaryofsignificantaccountingpolicies</ParentRole>
      <Position>52</Position>
    </Report>
    <Report instance="xp-20241231.htm">
      <IsDefault>false</IsDefault>
      <HasEmbeddedReports>false</HasEmbeddedReports>
      <HtmlFileName>R53.htm</HtmlFileName>
      <LongName>9955514 - Disclosure - Group structure (Tables)</LongName>
      <ReportType>Sheet</ReportType>
      <Role>http://xpinc.com/role/GroupstructureTables</Role>
      <ShortName>Group structure (Tables)</ShortName>
      <MenuCategory>Tables</MenuCategory>
      <ParentRole>http://xpinc.com/role/Groupstructure</ParentRole>
      <Position>53</Position>
    </Report>
    <Report instance="xp-20241231.htm">
      <IsDefault>false</IsDefault>
      <HasEmbeddedReports>false</HasEmbeddedReports>
      <HtmlFileName>R54.htm</HtmlFileName>
      <LongName>9955515 - Disclosure - Securities purchased (sold) under resale (repurchase) agreements (Tables)</LongName>
      <ReportType>Sheet</ReportType>
      <Role>http://xpinc.com/role/SecuritiespurchasedsoldunderresalerepurchaseagreementsTables</Role>
      <ShortName>Securities purchased (sold) under resale (repurchase) agreements (Tables)</ShortName>
      <MenuCategory>Tables</MenuCategory>
      <ParentRole>http://xpinc.com/role/Securitiespurchasedsoldunderresalerepurchaseagreements</ParentRole>
      <Position>54</Position>
    </Report>
    <Report instance="xp-20241231.htm">
      <IsDefault>false</IsDefault>
      <HasEmbeddedReports>false</HasEmbeddedReports>
      <HtmlFileName>R55.htm</HtmlFileName>
      <LongName>9955516 - Disclosure - Securities (Tables)</LongName>
      <ReportType>Sheet</ReportType>
      <Role>http://xpinc.com/role/SecuritiesTables</Role>
      <ShortName>Securities (Tables)</ShortName>
      <MenuCategory>Tables</MenuCategory>
      <ParentRole>http://xpinc.com/role/Securitiespurchasedsoldunderresalerepurchaseagreements</ParentRole>
      <Position>55</Position>
    </Report>
    <Report instance="xp-20241231.htm">
      <IsDefault>false</IsDefault>
      <HasEmbeddedReports>false</HasEmbeddedReports>
      <HtmlFileName>R56.htm</HtmlFileName>
      <LongName>9955517 - Disclosure - Derivative financial instruments (Tables)</LongName>
      <ReportType>Sheet</ReportType>
      <Role>http://xpinc.com/role/DerivativefinancialinstrumentsTables</Role>
      <ShortName>Derivative financial instruments (Tables)</ShortName>
      <MenuCategory>Tables</MenuCategory>
      <ParentRole>http://xpinc.com/role/Derivativefinancialinstruments</ParentRole>
      <Position>56</Position>
    </Report>
    <Report instance="xp-20241231.htm">
      <IsDefault>false</IsDefault>
      <HasEmbeddedReports>false</HasEmbeddedReports>
      <HtmlFileName>R57.htm</HtmlFileName>
      <LongName>9955518 - Disclosure - Hedge accounting (Tables)</LongName>
      <ReportType>Sheet</ReportType>
      <Role>http://xpinc.com/role/HedgeaccountingTables</Role>
      <ShortName>Hedge accounting (Tables)</ShortName>
      <MenuCategory>Tables</MenuCategory>
      <ParentRole>http://xpinc.com/role/Hedgeaccounting</ParentRole>
      <Position>57</Position>
    </Report>
    <Report instance="xp-20241231.htm">
      <IsDefault>false</IsDefault>
      <HasEmbeddedReports>false</HasEmbeddedReports>
      <HtmlFileName>R58.htm</HtmlFileName>
      <LongName>9955519 - Disclosure - Loan operations (Tables)</LongName>
      <ReportType>Sheet</ReportType>
      <Role>http://xpinc.com/role/LoanoperationsTables</Role>
      <ShortName>Loan operations (Tables)</ShortName>
      <MenuCategory>Tables</MenuCategory>
      <ParentRole>http://xpinc.com/role/Loanoperations</ParentRole>
      <Position>58</Position>
    </Report>
    <Report instance="xp-20241231.htm">
      <IsDefault>false</IsDefault>
      <HasEmbeddedReports>false</HasEmbeddedReports>
      <HtmlFileName>R59.htm</HtmlFileName>
      <LongName>9955520 - Disclosure - Accounts receivable (Tables)</LongName>
      <ReportType>Sheet</ReportType>
      <Role>http://xpinc.com/role/AccountsreceivableTables</Role>
      <ShortName>Accounts receivable (Tables)</ShortName>
      <MenuCategory>Tables</MenuCategory>
      <ParentRole>http://xpinc.com/role/Accountsreceivable</ParentRole>
      <Position>59</Position>
    </Report>
    <Report instance="xp-20241231.htm">
      <IsDefault>false</IsDefault>
      <HasEmbeddedReports>false</HasEmbeddedReports>
      <HtmlFileName>R60.htm</HtmlFileName>
      <LongName>9955521 - Disclosure - Recoverable taxes (Tables)</LongName>
      <ReportType>Sheet</ReportType>
      <Role>http://xpinc.com/role/RecoverabletaxesTables</Role>
      <ShortName>Recoverable taxes (Tables)</ShortName>
      <MenuCategory>Tables</MenuCategory>
      <ParentRole>http://xpinc.com/role/Recoverabletaxes</ParentRole>
      <Position>60</Position>
    </Report>
    <Report instance="xp-20241231.htm">
      <IsDefault>false</IsDefault>
      <HasEmbeddedReports>false</HasEmbeddedReports>
      <HtmlFileName>R61.htm</HtmlFileName>
      <LongName>9955522 - Disclosure - Prepaid expenses (Tables)</LongName>
      <ReportType>Sheet</ReportType>
      <Role>http://xpinc.com/role/PrepaidexpensesTables</Role>
      <ShortName>Prepaid expenses (Tables)</ShortName>
      <MenuCategory>Tables</MenuCategory>
      <ParentRole>http://xpinc.com/role/Prepaidexpenses</ParentRole>
      <Position>61</Position>
    </Report>
    <Report instance="xp-20241231.htm">
      <IsDefault>false</IsDefault>
      <HasEmbeddedReports>false</HasEmbeddedReports>
      <HtmlFileName>R62.htm</HtmlFileName>
      <LongName>9955523 - Disclosure - Expected credit losses on financial assets and reconciliation of carrying amount (Tables)</LongName>
      <ReportType>Sheet</ReportType>
      <Role>http://xpinc.com/role/ExpectedcreditlossesonfinancialassetsandreconciliationofcarryingamountTables</Role>
      <ShortName>Expected credit losses on financial assets and reconciliation of carrying amount (Tables)</ShortName>
      <MenuCategory>Tables</MenuCategory>
      <Position>62</Position>
    </Report>
    <Report instance="xp-20241231.htm">
      <IsDefault>false</IsDefault>
      <HasEmbeddedReports>false</HasEmbeddedReports>
      <HtmlFileName>R63.htm</HtmlFileName>
      <LongName>9955524 - Disclosure - Investments in associates and joint ventures (Tables)</LongName>
      <ReportType>Sheet</ReportType>
      <Role>http://xpinc.com/role/InvestmentsinassociatesandjointventuresTables</Role>
      <ShortName>Investments in associates and joint ventures (Tables)</ShortName>
      <MenuCategory>Tables</MenuCategory>
      <ParentRole>http://xpinc.com/role/Investmentsinassociatesandjointventures</ParentRole>
      <Position>63</Position>
    </Report>
    <Report instance="xp-20241231.htm">
      <IsDefault>false</IsDefault>
      <HasEmbeddedReports>false</HasEmbeddedReports>
      <HtmlFileName>R64.htm</HtmlFileName>
      <LongName>9955525 - Disclosure - Property, equipment, intangible assets and leases (Tables)</LongName>
      <ReportType>Sheet</ReportType>
      <Role>http://xpinc.com/role/PropertyequipmentintangibleassetsandleasesTables</Role>
      <ShortName>Property, equipment, intangible assets and leases (Tables)</ShortName>
      <MenuCategory>Tables</MenuCategory>
      <ParentRole>http://xpinc.com/role/Propertyequipmentintangibleassetsandleases</ParentRole>
      <Position>64</Position>
    </Report>
    <Report instance="xp-20241231.htm">
      <IsDefault>false</IsDefault>
      <HasEmbeddedReports>false</HasEmbeddedReports>
      <HtmlFileName>R65.htm</HtmlFileName>
      <LongName>9955526 - Disclosure - Financing instruments payable (Tables)</LongName>
      <ReportType>Sheet</ReportType>
      <Role>http://xpinc.com/role/FinancinginstrumentspayableTables</Role>
      <ShortName>Financing instruments payable (Tables)</ShortName>
      <MenuCategory>Tables</MenuCategory>
      <ParentRole>http://xpinc.com/role/Financinginstrumentspayable</ParentRole>
      <Position>65</Position>
    </Report>
    <Report instance="xp-20241231.htm">
      <IsDefault>false</IsDefault>
      <HasEmbeddedReports>false</HasEmbeddedReports>
      <HtmlFileName>R66.htm</HtmlFileName>
      <LongName>9955527 - Disclosure - Securities trading and intermediation (Tables)</LongName>
      <ReportType>Sheet</ReportType>
      <Role>http://xpinc.com/role/SecuritiestradingandintermediationTables</Role>
      <ShortName>Securities trading and intermediation (Tables)</ShortName>
      <MenuCategory>Tables</MenuCategory>
      <ParentRole>http://xpinc.com/role/Securitiestradingandintermediation</ParentRole>
      <Position>66</Position>
    </Report>
    <Report instance="xp-20241231.htm">
      <IsDefault>false</IsDefault>
      <HasEmbeddedReports>false</HasEmbeddedReports>
      <HtmlFileName>R67.htm</HtmlFileName>
      <LongName>9955528 - Disclosure - Borrowings (Tables)</LongName>
      <ReportType>Sheet</ReportType>
      <Role>http://xpinc.com/role/BorrowingsTables</Role>
      <ShortName>Borrowings (Tables)</ShortName>
      <MenuCategory>Tables</MenuCategory>
      <ParentRole>http://xpinc.com/role/Borrowings</ParentRole>
      <Position>67</Position>
    </Report>
    <Report instance="xp-20241231.htm">
      <IsDefault>false</IsDefault>
      <HasEmbeddedReports>false</HasEmbeddedReports>
      <HtmlFileName>R68.htm</HtmlFileName>
      <LongName>9955529 - Disclosure - Other financial assets and financial liabilities (Tables)</LongName>
      <ReportType>Sheet</ReportType>
      <Role>http://xpinc.com/role/OtherfinancialassetsandfinancialliabilitiesTables</Role>
      <ShortName>Other financial assets and financial liabilities (Tables)</ShortName>
      <MenuCategory>Tables</MenuCategory>
      <ParentRole>http://xpinc.com/role/Otherfinancialassetsandfinancialliabilities</ParentRole>
      <Position>68</Position>
    </Report>
    <Report instance="xp-20241231.htm">
      <IsDefault>false</IsDefault>
      <HasEmbeddedReports>false</HasEmbeddedReports>
      <HtmlFileName>R69.htm</HtmlFileName>
      <LongName>9955530 - Disclosure - Social and statutory obligations (Tables)</LongName>
      <ReportType>Sheet</ReportType>
      <Role>http://xpinc.com/role/SocialandstatutoryobligationsTables</Role>
      <ShortName>Social and statutory obligations (Tables)</ShortName>
      <MenuCategory>Tables</MenuCategory>
      <ParentRole>http://xpinc.com/role/Socialandstatutoryobligations</ParentRole>
      <Position>69</Position>
    </Report>
    <Report instance="xp-20241231.htm">
      <IsDefault>false</IsDefault>
      <HasEmbeddedReports>false</HasEmbeddedReports>
      <HtmlFileName>R70.htm</HtmlFileName>
      <LongName>9955531 - Disclosure - Tax and social security obligations (Tables)</LongName>
      <ReportType>Sheet</ReportType>
      <Role>http://xpinc.com/role/TaxandsocialsecurityobligationsTables</Role>
      <ShortName>Tax and social security obligations (Tables)</ShortName>
      <MenuCategory>Tables</MenuCategory>
      <ParentRole>http://xpinc.com/role/Taxandsocialsecurityobligations</ParentRole>
      <Position>70</Position>
    </Report>
    <Report instance="xp-20241231.htm">
      <IsDefault>false</IsDefault>
      <HasEmbeddedReports>false</HasEmbeddedReports>
      <HtmlFileName>R71.htm</HtmlFileName>
      <LongName>9955532 - Disclosure - Retirement plans liabilities (Tables)</LongName>
      <ReportType>Sheet</ReportType>
      <Role>http://xpinc.com/role/RetirementplansliabilitiesTables</Role>
      <ShortName>Retirement plans liabilities (Tables)</ShortName>
      <MenuCategory>Tables</MenuCategory>
      <ParentRole>http://xpinc.com/role/Retirementplansliabilities</ParentRole>
      <Position>71</Position>
    </Report>
    <Report instance="xp-20241231.htm">
      <IsDefault>false</IsDefault>
      <HasEmbeddedReports>false</HasEmbeddedReports>
      <HtmlFileName>R72.htm</HtmlFileName>
      <LongName>9955533 - Disclosure - Income tax (Tables)</LongName>
      <ReportType>Sheet</ReportType>
      <Role>http://xpinc.com/role/IncometaxTables</Role>
      <ShortName>Income tax (Tables)</ShortName>
      <MenuCategory>Tables</MenuCategory>
      <ParentRole>http://xpinc.com/role/Incometax</ParentRole>
      <Position>72</Position>
    </Report>
    <Report instance="xp-20241231.htm">
      <IsDefault>false</IsDefault>
      <HasEmbeddedReports>false</HasEmbeddedReports>
      <HtmlFileName>R73.htm</HtmlFileName>
      <LongName>9955534 - Disclosure - Equity (Tables)</LongName>
      <ReportType>Sheet</ReportType>
      <Role>http://xpinc.com/role/EquityTables</Role>
      <ShortName>Equity (Tables)</ShortName>
      <MenuCategory>Tables</MenuCategory>
      <ParentRole>http://xpinc.com/role/Equity</ParentRole>
      <Position>73</Position>
    </Report>
    <Report instance="xp-20241231.htm">
      <IsDefault>false</IsDefault>
      <HasEmbeddedReports>false</HasEmbeddedReports>
      <HtmlFileName>R74.htm</HtmlFileName>
      <LongName>9955535 - Disclosure - Related party transactions (Tables)</LongName>
      <ReportType>Sheet</ReportType>
      <Role>http://xpinc.com/role/RelatedpartytransactionsTables</Role>
      <ShortName>Related party transactions (Tables)</ShortName>
      <MenuCategory>Tables</MenuCategory>
      <ParentRole>http://xpinc.com/role/Relatedpartytransactions</ParentRole>
      <Position>74</Position>
    </Report>
    <Report instance="xp-20241231.htm">
      <IsDefault>false</IsDefault>
      <HasEmbeddedReports>false</HasEmbeddedReports>
      <HtmlFileName>R75.htm</HtmlFileName>
      <LongName>9955536 - Disclosure - Provisions and contingent liabilities (Tables)</LongName>
      <ReportType>Sheet</ReportType>
      <Role>http://xpinc.com/role/ProvisionsandcontingentliabilitiesTables</Role>
      <ShortName>Provisions and contingent liabilities (Tables)</ShortName>
      <MenuCategory>Tables</MenuCategory>
      <ParentRole>http://xpinc.com/role/Provisionsandcontingentliabilities</ParentRole>
      <Position>75</Position>
    </Report>
    <Report instance="xp-20241231.htm">
      <IsDefault>false</IsDefault>
      <HasEmbeddedReports>false</HasEmbeddedReports>
      <HtmlFileName>R76.htm</HtmlFileName>
      <LongName>9955537 - Disclosure - Other assets and other liabilities (Tables)</LongName>
      <ReportType>Sheet</ReportType>
      <Role>http://xpinc.com/role/OtherassetsandotherliabilitiesTables</Role>
      <ShortName>Other assets and other liabilities (Tables)</ShortName>
      <MenuCategory>Tables</MenuCategory>
      <ParentRole>http://xpinc.com/role/Otherassetsandotherliabilities</ParentRole>
      <Position>76</Position>
    </Report>
    <Report instance="xp-20241231.htm">
      <IsDefault>false</IsDefault>
      <HasEmbeddedReports>false</HasEmbeddedReports>
      <HtmlFileName>R77.htm</HtmlFileName>
      <LongName>9955538 - Disclosure - Total revenue and income (Tables)</LongName>
      <ReportType>Sheet</ReportType>
      <Role>http://xpinc.com/role/TotalrevenueandincomeTables</Role>
      <ShortName>Total revenue and income (Tables)</ShortName>
      <MenuCategory>Tables</MenuCategory>
      <ParentRole>http://xpinc.com/role/Totalrevenueandincome</ParentRole>
      <Position>77</Position>
    </Report>
    <Report instance="xp-20241231.htm">
      <IsDefault>false</IsDefault>
      <HasEmbeddedReports>false</HasEmbeddedReports>
      <HtmlFileName>R78.htm</HtmlFileName>
      <LongName>9955539 - Disclosure - Operating costs (Tables)</LongName>
      <ReportType>Sheet</ReportType>
      <Role>http://xpinc.com/role/OperatingcostsTables</Role>
      <ShortName>Operating costs (Tables)</ShortName>
      <MenuCategory>Tables</MenuCategory>
      <ParentRole>http://xpinc.com/role/Operatingcosts</ParentRole>
      <Position>78</Position>
    </Report>
    <Report instance="xp-20241231.htm">
      <IsDefault>false</IsDefault>
      <HasEmbeddedReports>false</HasEmbeddedReports>
      <HtmlFileName>R79.htm</HtmlFileName>
      <LongName>9955540 - Disclosure - Operating expenses by nature (Tables)</LongName>
      <ReportType>Sheet</ReportType>
      <Role>http://xpinc.com/role/OperatingexpensesbynatureTables</Role>
      <ShortName>Operating expenses by nature (Tables)</ShortName>
      <MenuCategory>Tables</MenuCategory>
      <ParentRole>http://xpinc.com/role/Operatingexpensesbynature</ParentRole>
      <Position>79</Position>
    </Report>
    <Report instance="xp-20241231.htm">
      <IsDefault>false</IsDefault>
      <HasEmbeddedReports>false</HasEmbeddedReports>
      <HtmlFileName>R80.htm</HtmlFileName>
      <LongName>9955541 - Disclosure - Other operating income/(expenses), net (Tables)</LongName>
      <ReportType>Sheet</ReportType>
      <Role>http://xpinc.com/role/OtheroperatingincomeexpensesnetTables</Role>
      <ShortName>Other operating income/(expenses), net (Tables)</ShortName>
      <MenuCategory>Tables</MenuCategory>
      <ParentRole>http://xpinc.com/role/Otheroperatingincomeexpensesnet</ParentRole>
      <Position>80</Position>
    </Report>
    <Report instance="xp-20241231.htm">
      <IsDefault>false</IsDefault>
      <HasEmbeddedReports>false</HasEmbeddedReports>
      <HtmlFileName>R81.htm</HtmlFileName>
      <LongName>9955542 - Disclosure - Share-based plan (Tables)</LongName>
      <ReportType>Sheet</ReportType>
      <Role>http://xpinc.com/role/SharebasedplanTables</Role>
      <ShortName>Share-based plan (Tables)</ShortName>
      <MenuCategory>Tables</MenuCategory>
      <ParentRole>http://xpinc.com/role/Sharebasedplan</ParentRole>
      <Position>81</Position>
    </Report>
    <Report instance="xp-20241231.htm">
      <IsDefault>false</IsDefault>
      <HasEmbeddedReports>false</HasEmbeddedReports>
      <HtmlFileName>R82.htm</HtmlFileName>
      <LongName>9955543 - Disclosure - Earnings per share (basic and diluted) (Tables)</LongName>
      <ReportType>Sheet</ReportType>
      <Role>http://xpinc.com/role/EarningspersharebasicanddilutedTables</Role>
      <ShortName>Earnings per share (basic and diluted) (Tables)</ShortName>
      <MenuCategory>Tables</MenuCategory>
      <ParentRole>http://xpinc.com/role/Earningspersharebasicanddiluted</ParentRole>
      <Position>82</Position>
    </Report>
    <Report instance="xp-20241231.htm">
      <IsDefault>false</IsDefault>
      <HasEmbeddedReports>false</HasEmbeddedReports>
      <HtmlFileName>R83.htm</HtmlFileName>
      <LongName>9955544 - Disclosure - Determination of fair value (Tables)</LongName>
      <ReportType>Sheet</ReportType>
      <Role>http://xpinc.com/role/DeterminationoffairvalueTables</Role>
      <ShortName>Determination of fair value (Tables)</ShortName>
      <MenuCategory>Tables</MenuCategory>
      <ParentRole>http://xpinc.com/role/Determinationoffairvalue</ParentRole>
      <Position>83</Position>
    </Report>
    <Report instance="xp-20241231.htm">
      <IsDefault>false</IsDefault>
      <HasEmbeddedReports>false</HasEmbeddedReports>
      <HtmlFileName>R84.htm</HtmlFileName>
      <LongName>9955545 - Disclosure - Management of financial risks and financial instruments (Tables)</LongName>
      <ReportType>Sheet</ReportType>
      <Role>http://xpinc.com/role/ManagementoffinancialrisksandfinancialinstrumentsTables</Role>
      <ShortName>Management of financial risks and financial instruments (Tables)</ShortName>
      <MenuCategory>Tables</MenuCategory>
      <ParentRole>http://xpinc.com/role/Managementoffinancialrisksandfinancialinstruments</ParentRole>
      <Position>84</Position>
    </Report>
    <Report instance="xp-20241231.htm">
      <IsDefault>false</IsDefault>
      <HasEmbeddedReports>false</HasEmbeddedReports>
      <HtmlFileName>R85.htm</HtmlFileName>
      <LongName>9955546 - Disclosure - Capital management (Tables)</LongName>
      <ReportType>Sheet</ReportType>
      <Role>http://xpinc.com/role/CapitalmanagementTables</Role>
      <ShortName>Capital management (Tables)</ShortName>
      <MenuCategory>Tables</MenuCategory>
      <ParentRole>http://xpinc.com/role/Capitalmanagement</ParentRole>
      <Position>85</Position>
    </Report>
    <Report instance="xp-20241231.htm">
      <IsDefault>false</IsDefault>
      <HasEmbeddedReports>false</HasEmbeddedReports>
      <HtmlFileName>R86.htm</HtmlFileName>
      <LongName>9955547 - Disclosure - Cash flow information (Tables)</LongName>
      <ReportType>Sheet</ReportType>
      <Role>http://xpinc.com/role/CashflowinformationTables</Role>
      <ShortName>Cash flow information (Tables)</ShortName>
      <MenuCategory>Tables</MenuCategory>
      <ParentRole>http://xpinc.com/role/Cashflowinformation</ParentRole>
      <Position>86</Position>
    </Report>
    <Report instance="xp-20241231.htm">
      <IsDefault>false</IsDefault>
      <HasEmbeddedReports>false</HasEmbeddedReports>
      <HtmlFileName>R87.htm</HtmlFileName>
      <LongName>9955548 - Disclosure - Operations - Additional information (Details)</LongName>
      <ReportType>Sheet</ReportType>
      <Role>http://xpinc.com/role/OperationsAdditionalinformationDetails</Role>
      <ShortName>Operations - Additional information (Details)</ShortName>
      <MenuCategory>Details</MenuCategory>
      <Position>87</Position>
    </Report>
    <Report instance="xp-20241231.htm">
      <IsDefault>false</IsDefault>
      <HasEmbeddedReports>false</HasEmbeddedReports>
      <HtmlFileName>R88.htm</HtmlFileName>
      <LongName>9955549 - Disclosure - Basis of preparation of the financial statements and changes to the Group???s accounting policies (Details)</LongName>
      <ReportType>Sheet</ReportType>
      <Role>http://xpinc.com/role/BasisofpreparationofthefinancialstatementsandchangestotheGroupsaccountingpoliciesDetails</Role>
      <ShortName>Basis of preparation of the financial statements and changes to the Group???s accounting policies (Details)</ShortName>
      <MenuCategory>Details</MenuCategory>
      <ParentRole>http://xpinc.com/role/BasisofpreparationofthefinancialstatementsandchangestotheGroupsaccountingpolicies</ParentRole>
      <Position>88</Position>
    </Report>
    <Report instance="xp-20241231.htm">
      <IsDefault>false</IsDefault>
      <HasEmbeddedReports>false</HasEmbeddedReports>
      <HtmlFileName>R89.htm</HtmlFileName>
      <LongName>9955550 - Disclosure - Summary of significant accounting policies - Additional information (Details)</LongName>
      <ReportType>Sheet</ReportType>
      <Role>http://xpinc.com/role/SummaryofsignificantaccountingpoliciesAdditionalinformationDetails</Role>
      <ShortName>Summary of significant accounting policies - Additional information (Details)</ShortName>
      <MenuCategory>Details</MenuCategory>
      <Position>89</Position>
    </Report>
    <Report instance="xp-20241231.htm">
      <IsDefault>false</IsDefault>
      <HasEmbeddedReports>false</HasEmbeddedReports>
      <HtmlFileName>R90.htm</HtmlFileName>
      <LongName>9955551 - Disclosure - Summary of significant accounting policies - Summary of depreciation of property and equipment (Details)</LongName>
      <ReportType>Sheet</ReportType>
      <Role>http://xpinc.com/role/SummaryofsignificantaccountingpoliciesSummaryofdepreciationofpropertyandequipmentDetails</Role>
      <ShortName>Summary of significant accounting policies - Summary of depreciation of property and equipment (Details)</ShortName>
      <MenuCategory>Details</MenuCategory>
      <Position>90</Position>
    </Report>
    <Report instance="xp-20241231.htm">
      <IsDefault>false</IsDefault>
      <HasEmbeddedReports>false</HasEmbeddedReports>
      <HtmlFileName>R91.htm</HtmlFileName>
      <LongName>9955552 - Disclosure - Summary of significant accounting policies - Summary of useful lives of intangible assets (Details)</LongName>
      <ReportType>Sheet</ReportType>
      <Role>http://xpinc.com/role/SummaryofsignificantaccountingpoliciesSummaryofusefullivesofintangibleassetsDetails</Role>
      <ShortName>Summary of significant accounting policies - Summary of useful lives of intangible assets (Details)</ShortName>
      <MenuCategory>Details</MenuCategory>
      <Position>91</Position>
    </Report>
    <Report instance="xp-20241231.htm">
      <IsDefault>false</IsDefault>
      <HasEmbeddedReports>false</HasEmbeddedReports>
      <HtmlFileName>R92.htm</HtmlFileName>
      <LongName>9955553 - Disclosure - Group structure - Summary of direct and indirect interests of company in its subsidiaries (Details)</LongName>
      <ReportType>Sheet</ReportType>
      <Role>http://xpinc.com/role/GroupstructureSummaryofdirectandindirectinterestsofcompanyinitssubsidiariesDetails</Role>
      <ShortName>Group structure - Summary of direct and indirect interests of company in its subsidiaries (Details)</ShortName>
      <MenuCategory>Details</MenuCategory>
      <Position>92</Position>
    </Report>
    <Report instance="xp-20241231.htm">
      <IsDefault>false</IsDefault>
      <HasEmbeddedReports>false</HasEmbeddedReports>
      <HtmlFileName>R93.htm</HtmlFileName>
      <LongName>9955554 - Disclosure - Group structure - Summary of intangible assets acquired (Details)</LongName>
      <ReportType>Sheet</ReportType>
      <Role>http://xpinc.com/role/GroupstructureSummaryofintangibleassetsacquiredDetails</Role>
      <ShortName>Group structure - Summary of intangible assets acquired (Details)</ShortName>
      <MenuCategory>Details</MenuCategory>
      <Position>93</Position>
    </Report>
    <Report instance="xp-20241231.htm">
      <IsDefault>false</IsDefault>
      <HasEmbeddedReports>false</HasEmbeddedReports>
      <HtmlFileName>R94.htm</HtmlFileName>
      <LongName>9955555 - Disclosure - Group structure - Summary of fair value of the identifiable assets acquired and liabilities (Details)</LongName>
      <ReportType>Sheet</ReportType>
      <Role>http://xpinc.com/role/GroupstructureSummaryoffairvalueoftheidentifiableassetsacquiredandliabilitiesDetails</Role>
      <ShortName>Group structure - Summary of fair value of the identifiable assets acquired and liabilities (Details)</ShortName>
      <MenuCategory>Details</MenuCategory>
      <Position>94</Position>
    </Report>
    <Report instance="xp-20241231.htm">
      <IsDefault>false</IsDefault>
      <HasEmbeddedReports>false</HasEmbeddedReports>
      <HtmlFileName>R95.htm</HtmlFileName>
      <LongName>9955556 - Disclosure - Securities purchased (sold) under resale (repurchase) agreements - Summary of securities purchased under agreements to resell (Details)</LongName>
      <ReportType>Sheet</ReportType>
      <Role>http://xpinc.com/role/SecuritiespurchasedsoldunderresalerepurchaseagreementsSummaryofsecuritiespurchasedunderagreementstoresellDetails</Role>
      <ShortName>Securities purchased (sold) under resale (repurchase) agreements - Summary of securities purchased under agreements to resell (Details)</ShortName>
      <MenuCategory>Details</MenuCategory>
      <ParentRole>http://xpinc.com/role/SecuritiespurchasedsoldunderresalerepurchaseagreementsTables</ParentRole>
      <Position>95</Position>
    </Report>
    <Report instance="xp-20241231.htm">
      <IsDefault>false</IsDefault>
      <HasEmbeddedReports>false</HasEmbeddedReports>
      <HtmlFileName>R96.htm</HtmlFileName>
      <LongName>9955557 - Disclosure - Securities purchased (sold) under resale (repurchase) agreements - Additional information (Details)</LongName>
      <ReportType>Sheet</ReportType>
      <Role>http://xpinc.com/role/SecuritiespurchasedsoldunderresalerepurchaseagreementsAdditionalinformationDetails</Role>
      <ShortName>Securities purchased (sold) under resale (repurchase) agreements - Additional information (Details)</ShortName>
      <MenuCategory>Details</MenuCategory>
      <ParentRole>http://xpinc.com/role/SecuritiespurchasedsoldunderresalerepurchaseagreementsTables</ParentRole>
      <Position>96</Position>
    </Report>
    <Report instance="xp-20241231.htm">
      <IsDefault>false</IsDefault>
      <HasEmbeddedReports>false</HasEmbeddedReports>
      <HtmlFileName>R97.htm</HtmlFileName>
      <LongName>9955558 - Disclosure - Securities purchased (sold) under resale (repurchase) agreements - Securities sold under repurchase agreements (Details)</LongName>
      <ReportType>Sheet</ReportType>
      <Role>http://xpinc.com/role/SecuritiespurchasedsoldunderresalerepurchaseagreementsSecuritiessoldunderrepurchaseagreementsDetails</Role>
      <ShortName>Securities purchased (sold) under resale (repurchase) agreements - Securities sold under repurchase agreements (Details)</ShortName>
      <MenuCategory>Details</MenuCategory>
      <ParentRole>http://xpinc.com/role/SecuritiespurchasedsoldunderresalerepurchaseagreementsTables</ParentRole>
      <Position>97</Position>
    </Report>
    <Report instance="xp-20241231.htm">
      <IsDefault>false</IsDefault>
      <HasEmbeddedReports>false</HasEmbeddedReports>
      <HtmlFileName>R98.htm</HtmlFileName>
      <LongName>9955559 - Disclosure - Securities - Summary of Securities Classified at Fair Value Through Profit or Loss (Details)</LongName>
      <ReportType>Sheet</ReportType>
      <Role>http://xpinc.com/role/SecuritiesSummaryofSecuritiesClassifiedatFairValueThroughProfitorLossDetails</Role>
      <ShortName>Securities - Summary of Securities Classified at Fair Value Through Profit or Loss (Details)</ShortName>
      <MenuCategory>Details</MenuCategory>
      <Position>98</Position>
    </Report>
    <Report instance="xp-20241231.htm">
      <IsDefault>false</IsDefault>
      <HasEmbeddedReports>false</HasEmbeddedReports>
      <HtmlFileName>R99.htm</HtmlFileName>
      <LongName>9955560 - Disclosure - Securities - Summary of Securities at Fair Value Through Other Comprehensive Income (Details)</LongName>
      <ReportType>Sheet</ReportType>
      <Role>http://xpinc.com/role/SecuritiesSummaryofSecuritiesatFairValueThroughOtherComprehensiveIncomeDetails</Role>
      <ShortName>Securities - Summary of Securities at Fair Value Through Other Comprehensive Income (Details)</ShortName>
      <MenuCategory>Details</MenuCategory>
      <Position>99</Position>
    </Report>
    <Report instance="xp-20241231.htm">
      <IsDefault>false</IsDefault>
      <HasEmbeddedReports>false</HasEmbeddedReports>
      <HtmlFileName>R100.htm</HtmlFileName>
      <LongName>9955561 - Disclosure - Securities - Summary of Securities Evaluated at Amortized Cost (Details)</LongName>
      <ReportType>Sheet</ReportType>
      <Role>http://xpinc.com/role/SecuritiesSummaryofSecuritiesEvaluatedatAmortizedCostDetails</Role>
      <ShortName>Securities - Summary of Securities Evaluated at Amortized Cost (Details)</ShortName>
      <MenuCategory>Details</MenuCategory>
      <Position>100</Position>
    </Report>
    <Report instance="xp-20241231.htm">
      <IsDefault>false</IsDefault>
      <HasEmbeddedReports>false</HasEmbeddedReports>
      <HtmlFileName>R101.htm</HtmlFileName>
      <LongName>9955562 - Disclosure - Securities - Summary of Securities on the Financial Liabilities Classified at Fair Value Through Profit or Loss (Details)</LongName>
      <ReportType>Sheet</ReportType>
      <Role>http://xpinc.com/role/SecuritiesSummaryofSecuritiesontheFinancialLiabilitiesClassifiedatFairValueThroughProfitorLossDetails</Role>
      <ShortName>Securities - Summary of Securities on the Financial Liabilities Classified at Fair Value Through Profit or Loss (Details)</ShortName>
      <MenuCategory>Details</MenuCategory>
      <Position>101</Position>
    </Report>
    <Report instance="xp-20241231.htm">
      <IsDefault>false</IsDefault>
      <HasEmbeddedReports>false</HasEmbeddedReports>
      <HtmlFileName>R102.htm</HtmlFileName>
      <LongName>9955563 - Disclosure - Securities - Summary of Securities Classified by Maturity (Details)</LongName>
      <ReportType>Sheet</ReportType>
      <Role>http://xpinc.com/role/SecuritiesSummaryofSecuritiesClassifiedbyMaturityDetails</Role>
      <ShortName>Securities - Summary of Securities Classified by Maturity (Details)</ShortName>
      <MenuCategory>Details</MenuCategory>
      <Position>102</Position>
    </Report>
    <Report instance="xp-20241231.htm">
      <IsDefault>false</IsDefault>
      <HasEmbeddedReports>false</HasEmbeddedReports>
      <HtmlFileName>R103.htm</HtmlFileName>
      <LongName>9955564 - Disclosure - Derivative financial instruments - Summary of derivative financial instruments portfolio (assets and liabilities) by type of instrument (Details)</LongName>
      <ReportType>Sheet</ReportType>
      <Role>http://xpinc.com/role/DerivativefinancialinstrumentsSummaryofderivativefinancialinstrumentsportfolioassetsandliabilitiesbytypeofinstrumentDetails</Role>
      <ShortName>Derivative financial instruments - Summary of derivative financial instruments portfolio (assets and liabilities) by type of instrument (Details)</ShortName>
      <MenuCategory>Details</MenuCategory>
      <Position>103</Position>
    </Report>
    <Report instance="xp-20241231.htm">
      <IsDefault>false</IsDefault>
      <HasEmbeddedReports>false</HasEmbeddedReports>
      <HtmlFileName>R104.htm</HtmlFileName>
      <LongName>9955565 - Disclosure - Derivative financial instruments - Summary of derivative financial instruments by index (Details)</LongName>
      <ReportType>Sheet</ReportType>
      <Role>http://xpinc.com/role/DerivativefinancialinstrumentsSummaryofderivativefinancialinstrumentsbyindexDetails</Role>
      <ShortName>Derivative financial instruments - Summary of derivative financial instruments by index (Details)</ShortName>
      <MenuCategory>Details</MenuCategory>
      <Position>104</Position>
    </Report>
    <Report instance="xp-20241231.htm">
      <IsDefault>false</IsDefault>
      <HasEmbeddedReports>false</HasEmbeddedReports>
      <HtmlFileName>R105.htm</HtmlFileName>
      <LongName>9955566 - Disclosure - Hedge accounting - Summary of detailed information about hedging instruments (Details)</LongName>
      <ReportType>Sheet</ReportType>
      <Role>http://xpinc.com/role/HedgeaccountingSummaryofdetailedinformationabouthedginginstrumentsDetails</Role>
      <ShortName>Hedge accounting - Summary of detailed information about hedging instruments (Details)</ShortName>
      <MenuCategory>Details</MenuCategory>
      <Position>105</Position>
    </Report>
    <Report instance="xp-20241231.htm">
      <IsDefault>false</IsDefault>
      <HasEmbeddedReports>false</HasEmbeddedReports>
      <HtmlFileName>R106.htm</HtmlFileName>
      <LongName>9955567 - Disclosure - Hedge accounting - Hedged item information (Details)</LongName>
      <ReportType>Sheet</ReportType>
      <Role>http://xpinc.com/role/HedgeaccountingHedgediteminformationDetails</Role>
      <ShortName>Hedge accounting - Hedged item information (Details)</ShortName>
      <MenuCategory>Details</MenuCategory>
      <Position>106</Position>
    </Report>
    <Report instance="xp-20241231.htm">
      <IsDefault>false</IsDefault>
      <HasEmbeddedReports>false</HasEmbeddedReports>
      <HtmlFileName>R107.htm</HtmlFileName>
      <LongName>9955568 - Disclosure - Hedge accounting - Hedged item maturity (Details)</LongName>
      <ReportType>Sheet</ReportType>
      <Role>http://xpinc.com/role/HedgeaccountingHedgeditemmaturityDetails</Role>
      <ShortName>Hedge accounting - Hedged item maturity (Details)</ShortName>
      <MenuCategory>Details</MenuCategory>
      <Position>107</Position>
    </Report>
    <Report instance="xp-20241231.htm">
      <IsDefault>false</IsDefault>
      <HasEmbeddedReports>false</HasEmbeddedReports>
      <HtmlFileName>R108.htm</HtmlFileName>
      <LongName>9955570 - Disclosure - Loan operations - Loan operations by type (Details)</LongName>
      <ReportType>Sheet</ReportType>
      <Role>http://xpinc.com/role/LoanoperationsLoanoperationsbytypeDetails</Role>
      <ShortName>Loan operations - Loan operations by type (Details)</ShortName>
      <MenuCategory>Details</MenuCategory>
      <Position>108</Position>
    </Report>
    <Report instance="xp-20241231.htm">
      <IsDefault>false</IsDefault>
      <HasEmbeddedReports>false</HasEmbeddedReports>
      <HtmlFileName>R109.htm</HtmlFileName>
      <LongName>9955571 - Disclosure - Loan operations - Loan operations by maturity (Details)</LongName>
      <ReportType>Sheet</ReportType>
      <Role>http://xpinc.com/role/LoanoperationsLoanoperationsbymaturityDetails</Role>
      <ShortName>Loan operations - Loan operations by maturity (Details)</ShortName>
      <MenuCategory>Details</MenuCategory>
      <Position>109</Position>
    </Report>
    <Report instance="xp-20241231.htm">
      <IsDefault>false</IsDefault>
      <HasEmbeddedReports>false</HasEmbeddedReports>
      <HtmlFileName>R110.htm</HtmlFileName>
      <LongName>9955572 - Disclosure - Loan operations - Loan operations by concentration (Details)</LongName>
      <ReportType>Sheet</ReportType>
      <Role>http://xpinc.com/role/LoanoperationsLoanoperationsbyconcentrationDetails</Role>
      <ShortName>Loan operations - Loan operations by concentration (Details)</ShortName>
      <MenuCategory>Details</MenuCategory>
      <Position>110</Position>
    </Report>
    <Report instance="xp-20241231.htm">
      <IsDefault>false</IsDefault>
      <HasEmbeddedReports>false</HasEmbeddedReports>
      <HtmlFileName>R111.htm</HtmlFileName>
      <LongName>9955573 - Disclosure - Accounts receivable (Details)</LongName>
      <ReportType>Sheet</ReportType>
      <Role>http://xpinc.com/role/AccountsreceivableDetails</Role>
      <ShortName>Accounts receivable (Details)</ShortName>
      <MenuCategory>Details</MenuCategory>
      <ParentRole>http://xpinc.com/role/AccountsreceivableTables</ParentRole>
      <Position>111</Position>
    </Report>
    <Report instance="xp-20241231.htm">
      <IsDefault>false</IsDefault>
      <HasEmbeddedReports>false</HasEmbeddedReports>
      <HtmlFileName>R112.htm</HtmlFileName>
      <LongName>9955574 - Disclosure - Recoverable taxes (Details)</LongName>
      <ReportType>Sheet</ReportType>
      <Role>http://xpinc.com/role/RecoverabletaxesDetails</Role>
      <ShortName>Recoverable taxes (Details)</ShortName>
      <MenuCategory>Details</MenuCategory>
      <ParentRole>http://xpinc.com/role/RecoverabletaxesTables</ParentRole>
      <Position>112</Position>
    </Report>
    <Report instance="xp-20241231.htm">
      <IsDefault>false</IsDefault>
      <HasEmbeddedReports>false</HasEmbeddedReports>
      <HtmlFileName>R113.htm</HtmlFileName>
      <LongName>9955575 - Disclosure - Prepaid expenses (Details)</LongName>
      <ReportType>Sheet</ReportType>
      <Role>http://xpinc.com/role/PrepaidexpensesDetails</Role>
      <ShortName>Prepaid expenses (Details)</ShortName>
      <MenuCategory>Details</MenuCategory>
      <ParentRole>http://xpinc.com/role/PrepaidexpensesTables</ParentRole>
      <Position>113</Position>
    </Report>
    <Report instance="xp-20241231.htm">
      <IsDefault>false</IsDefault>
      <HasEmbeddedReports>false</HasEmbeddedReports>
      <HtmlFileName>R114.htm</HtmlFileName>
      <LongName>9955576 - Disclosure - Expected Credit Losses on Financial Assets and Reconciliation of carrying amount (Details)</LongName>
      <ReportType>Sheet</ReportType>
      <Role>http://xpinc.com/role/ExpectedCreditLossesonFinancialAssetsandReconciliationofcarryingamountDetails</Role>
      <ShortName>Expected Credit Losses on Financial Assets and Reconciliation of carrying amount (Details)</ShortName>
      <MenuCategory>Details</MenuCategory>
      <ParentRole>http://xpinc.com/role/ExpectedCreditLossesonFinancialAssetsandReconciliationofcarryingamount</ParentRole>
      <Position>114</Position>
    </Report>
    <Report instance="xp-20241231.htm">
      <IsDefault>false</IsDefault>
      <HasEmbeddedReports>false</HasEmbeddedReports>
      <HtmlFileName>R115.htm</HtmlFileName>
      <LongName>9955577 - Disclosure - Expected Credit Losses on Financial Assets and Reconciliation of carrying amount - ECLs measured using simplified approach (Details)</LongName>
      <ReportType>Sheet</ReportType>
      <Role>http://xpinc.com/role/ExpectedCreditLossesonFinancialAssetsandReconciliationofcarryingamountECLsmeasuredusingsimplifiedapproachDetails</Role>
      <ShortName>Expected Credit Losses on Financial Assets and Reconciliation of carrying amount - ECLs measured using simplified approach (Details)</ShortName>
      <MenuCategory>Details</MenuCategory>
      <Position>115</Position>
    </Report>
    <Report instance="xp-20241231.htm">
      <IsDefault>false</IsDefault>
      <HasEmbeddedReports>false</HasEmbeddedReports>
      <HtmlFileName>R116.htm</HtmlFileName>
      <LongName>9955578 - Disclosure - Expected Credit Losses on Financial Assets and Reconciliation of carrying amount - Expected credit losses (Details)</LongName>
      <ReportType>Sheet</ReportType>
      <Role>http://xpinc.com/role/ExpectedCreditLossesonFinancialAssetsandReconciliationofcarryingamountExpectedcreditlossesDetails</Role>
      <ShortName>Expected Credit Losses on Financial Assets and Reconciliation of carrying amount - Expected credit losses (Details)</ShortName>
      <MenuCategory>Details</MenuCategory>
      <Position>116</Position>
    </Report>
    <Report instance="xp-20241231.htm">
      <IsDefault>false</IsDefault>
      <HasEmbeddedReports>false</HasEmbeddedReports>
      <HtmlFileName>R117.htm</HtmlFileName>
      <LongName>9955579 - Disclosure - Expected Credit Losses on Financial Assets and Reconciliation of carrying amount - Expected credit loss using simplified method (Details)</LongName>
      <ReportType>Sheet</ReportType>
      <Role>http://xpinc.com/role/ExpectedCreditLossesonFinancialAssetsandReconciliationofcarryingamountExpectedcreditlossusingsimplifiedmethodDetails</Role>
      <ShortName>Expected Credit Losses on Financial Assets and Reconciliation of carrying amount - Expected credit loss using simplified method (Details)</ShortName>
      <MenuCategory>Details</MenuCategory>
      <Position>117</Position>
    </Report>
    <Report instance="xp-20241231.htm">
      <IsDefault>false</IsDefault>
      <HasEmbeddedReports>false</HasEmbeddedReports>
      <HtmlFileName>R118.htm</HtmlFileName>
      <LongName>9955580 - Disclosure - Expected Credit Losses on Financial Assets and Reconciliation of carrying amount - Expected credit loss segregated by product (Details)</LongName>
      <ReportType>Sheet</ReportType>
      <Role>http://xpinc.com/role/ExpectedCreditLossesonFinancialAssetsandReconciliationofcarryingamountExpectedcreditlosssegregatedbyproductDetails</Role>
      <ShortName>Expected Credit Losses on Financial Assets and Reconciliation of carrying amount - Expected credit loss segregated by product (Details)</ShortName>
      <MenuCategory>Details</MenuCategory>
      <Position>118</Position>
    </Report>
    <Report instance="xp-20241231.htm">
      <IsDefault>false</IsDefault>
      <HasEmbeddedReports>false</HasEmbeddedReports>
      <HtmlFileName>R119.htm</HtmlFileName>
      <LongName>9955581 - Disclosure - Investments in associates and joint ventures (Details)</LongName>
      <ReportType>Sheet</ReportType>
      <Role>http://xpinc.com/role/InvestmentsinassociatesandjointventuresDetails</Role>
      <ShortName>Investments in associates and joint ventures (Details)</ShortName>
      <MenuCategory>Details</MenuCategory>
      <ParentRole>http://xpinc.com/role/InvestmentsinassociatesandjointventuresTables</ParentRole>
      <Position>119</Position>
    </Report>
    <Report instance="xp-20241231.htm">
      <IsDefault>false</IsDefault>
      <HasEmbeddedReports>false</HasEmbeddedReports>
      <HtmlFileName>R120.htm</HtmlFileName>
      <LongName>9955582 - Disclosure - Property, equipment, intangible assets and leases - Summary of property and equipment (Details)</LongName>
      <ReportType>Sheet</ReportType>
      <Role>http://xpinc.com/role/PropertyequipmentintangibleassetsandleasesSummaryofpropertyandequipmentDetails</Role>
      <ShortName>Property, equipment, intangible assets and leases - Summary of property and equipment (Details)</ShortName>
      <MenuCategory>Details</MenuCategory>
      <Position>120</Position>
    </Report>
    <Report instance="xp-20241231.htm">
      <IsDefault>false</IsDefault>
      <HasEmbeddedReports>false</HasEmbeddedReports>
      <HtmlFileName>R121.htm</HtmlFileName>
      <LongName>9955583 - Disclosure - Property, equipment, intangible assets and leases - Summary of intangible assets (Details)</LongName>
      <ReportType>Sheet</ReportType>
      <Role>http://xpinc.com/role/PropertyequipmentintangibleassetsandleasesSummaryofintangibleassetsDetails</Role>
      <ShortName>Property, equipment, intangible assets and leases - Summary of intangible assets (Details)</ShortName>
      <MenuCategory>Details</MenuCategory>
      <Position>121</Position>
    </Report>
    <Report instance="xp-20241231.htm">
      <IsDefault>false</IsDefault>
      <HasEmbeddedReports>false</HasEmbeddedReports>
      <HtmlFileName>R122.htm</HtmlFileName>
      <LongName>9955584 - Disclosure - Property, equipment, intangible assets and leases - Additional details (Details)</LongName>
      <ReportType>Sheet</ReportType>
      <Role>http://xpinc.com/role/PropertyequipmentintangibleassetsandleasesAdditionaldetailsDetails</Role>
      <ShortName>Property, equipment, intangible assets and leases - Additional details (Details)</ShortName>
      <MenuCategory>Details</MenuCategory>
      <Position>122</Position>
    </Report>
    <Report instance="xp-20241231.htm">
      <IsDefault>false</IsDefault>
      <HasEmbeddedReports>false</HasEmbeddedReports>
      <HtmlFileName>R123.htm</HtmlFileName>
      <LongName>9955585 - Disclosure - Property, equipment, intangible assets and leases - Summary of right-of-use assets and lease liabilities (Details)</LongName>
      <ReportType>Sheet</ReportType>
      <Role>http://xpinc.com/role/PropertyequipmentintangibleassetsandleasesSummaryofrightofuseassetsandleaseliabilitiesDetails</Role>
      <ShortName>Property, equipment, intangible assets and leases - Summary of right-of-use assets and lease liabilities (Details)</ShortName>
      <MenuCategory>Details</MenuCategory>
      <Position>123</Position>
    </Report>
    <Report instance="xp-20241231.htm">
      <IsDefault>false</IsDefault>
      <HasEmbeddedReports>false</HasEmbeddedReports>
      <HtmlFileName>R124.htm</HtmlFileName>
      <LongName>9955586 - Disclosure - Financing instruments payable - Schedule (Details)</LongName>
      <ReportType>Sheet</ReportType>
      <Role>http://xpinc.com/role/FinancinginstrumentspayableScheduleDetails</Role>
      <ShortName>Financing instruments payable - Schedule (Details)</ShortName>
      <MenuCategory>Details</MenuCategory>
      <Position>124</Position>
    </Report>
    <Report instance="xp-20241231.htm">
      <IsDefault>false</IsDefault>
      <HasEmbeddedReports>false</HasEmbeddedReports>
      <HtmlFileName>R125.htm</HtmlFileName>
      <LongName>9955587 - Disclosure - Financing instruments payable - Maturity (Details)</LongName>
      <ReportType>Sheet</ReportType>
      <Role>http://xpinc.com/role/FinancinginstrumentspayableMaturityDetails</Role>
      <ShortName>Financing instruments payable - Maturity (Details)</ShortName>
      <MenuCategory>Details</MenuCategory>
      <Position>125</Position>
    </Report>
    <Report instance="xp-20241231.htm">
      <IsDefault>false</IsDefault>
      <HasEmbeddedReports>false</HasEmbeddedReports>
      <HtmlFileName>R126.htm</HtmlFileName>
      <LongName>9955588 - Disclosure - Financing instruments payable - Debt securities (Details)</LongName>
      <ReportType>Sheet</ReportType>
      <Role>http://xpinc.com/role/FinancinginstrumentspayableDebtsecuritiesDetails</Role>
      <ShortName>Financing instruments payable - Debt securities (Details)</ShortName>
      <MenuCategory>Details</MenuCategory>
      <Position>126</Position>
    </Report>
    <Report instance="xp-20241231.htm">
      <IsDefault>false</IsDefault>
      <HasEmbeddedReports>false</HasEmbeddedReports>
      <HtmlFileName>R127.htm</HtmlFileName>
      <LongName>9955589 - Disclosure - Financing instruments payable - Debt securities, additional information (Details)</LongName>
      <ReportType>Sheet</ReportType>
      <Role>http://xpinc.com/role/FinancinginstrumentspayableDebtsecuritiesadditionalinformationDetails</Role>
      <ShortName>Financing instruments payable - Debt securities, additional information (Details)</ShortName>
      <MenuCategory>Details</MenuCategory>
      <Position>127</Position>
    </Report>
    <Report instance="xp-20241231.htm">
      <IsDefault>false</IsDefault>
      <HasEmbeddedReports>false</HasEmbeddedReports>
      <HtmlFileName>R128.htm</HtmlFileName>
      <LongName>9955590 - Disclosure - Securities trading and intermediation (Details)</LongName>
      <ReportType>Sheet</ReportType>
      <Role>http://xpinc.com/role/SecuritiestradingandintermediationDetails</Role>
      <ShortName>Securities trading and intermediation (Details)</ShortName>
      <MenuCategory>Details</MenuCategory>
      <ParentRole>http://xpinc.com/role/SecuritiestradingandintermediationTables</ParentRole>
      <Position>128</Position>
    </Report>
    <Report instance="xp-20241231.htm">
      <IsDefault>false</IsDefault>
      <HasEmbeddedReports>false</HasEmbeddedReports>
      <HtmlFileName>R129.htm</HtmlFileName>
      <LongName>9955591 - Disclosure - Borrowings (Details)</LongName>
      <ReportType>Sheet</ReportType>
      <Role>http://xpinc.com/role/BorrowingsDetails</Role>
      <ShortName>Borrowings (Details)</ShortName>
      <MenuCategory>Details</MenuCategory>
      <ParentRole>http://xpinc.com/role/BorrowingsTables</ParentRole>
      <Position>129</Position>
    </Report>
    <Report instance="xp-20241231.htm">
      <IsDefault>false</IsDefault>
      <HasEmbeddedReports>false</HasEmbeddedReports>
      <HtmlFileName>R130.htm</HtmlFileName>
      <LongName>9955592 - Disclosure - Other financial assets and financial liabilities - Other financial assets (Details)</LongName>
      <ReportType>Sheet</ReportType>
      <Role>http://xpinc.com/role/OtherfinancialassetsandfinancialliabilitiesOtherfinancialassetsDetails</Role>
      <ShortName>Other financial assets and financial liabilities - Other financial assets (Details)</ShortName>
      <MenuCategory>Details</MenuCategory>
      <Position>130</Position>
    </Report>
    <Report instance="xp-20241231.htm">
      <IsDefault>false</IsDefault>
      <HasEmbeddedReports>false</HasEmbeddedReports>
      <HtmlFileName>R131.htm</HtmlFileName>
      <LongName>9955593 - Disclosure - Other financial assets and financial liabilities - Other financial liabilities (Details)</LongName>
      <ReportType>Sheet</ReportType>
      <Role>http://xpinc.com/role/OtherfinancialassetsandfinancialliabilitiesOtherfinancialliabilitiesDetails</Role>
      <ShortName>Other financial assets and financial liabilities - Other financial liabilities (Details)</ShortName>
      <MenuCategory>Details</MenuCategory>
      <Position>131</Position>
    </Report>
    <Report instance="xp-20241231.htm">
      <IsDefault>false</IsDefault>
      <HasEmbeddedReports>false</HasEmbeddedReports>
      <HtmlFileName>R132.htm</HtmlFileName>
      <LongName>9955594 - Disclosure - Social and statutory obligations - Additional information (Details)</LongName>
      <ReportType>Sheet</ReportType>
      <Role>http://xpinc.com/role/SocialandstatutoryobligationsAdditionalinformationDetails</Role>
      <ShortName>Social and statutory obligations - Additional information (Details)</ShortName>
      <MenuCategory>Details</MenuCategory>
      <Position>132</Position>
    </Report>
    <Report instance="xp-20241231.htm">
      <IsDefault>false</IsDefault>
      <HasEmbeddedReports>false</HasEmbeddedReports>
      <HtmlFileName>R133.htm</HtmlFileName>
      <LongName>9955595 - Disclosure - Social and statutory obligations - Summary of social and statutory obligations (Details)</LongName>
      <ReportType>Sheet</ReportType>
      <Role>http://xpinc.com/role/SocialandstatutoryobligationsSummaryofsocialandstatutoryobligationsDetails</Role>
      <ShortName>Social and statutory obligations - Summary of social and statutory obligations (Details)</ShortName>
      <MenuCategory>Details</MenuCategory>
      <Position>133</Position>
    </Report>
    <Report instance="xp-20241231.htm">
      <IsDefault>false</IsDefault>
      <HasEmbeddedReports>false</HasEmbeddedReports>
      <HtmlFileName>R134.htm</HtmlFileName>
      <LongName>9955596 - Disclosure - Tax and social security obligations - Summary of Tax and Social Security Obligations (Details)</LongName>
      <ReportType>Sheet</ReportType>
      <Role>http://xpinc.com/role/TaxandsocialsecurityobligationsSummaryofTaxandSocialSecurityObligationsDetails</Role>
      <ShortName>Tax and social security obligations - Summary of Tax and Social Security Obligations (Details)</ShortName>
      <MenuCategory>Details</MenuCategory>
      <Position>134</Position>
    </Report>
    <Report instance="xp-20241231.htm">
      <IsDefault>false</IsDefault>
      <HasEmbeddedReports>false</HasEmbeddedReports>
      <HtmlFileName>R135.htm</HtmlFileName>
      <LongName>9955597 - Disclosure - Tax and social security obligations - Additional Information (Details)</LongName>
      <ReportType>Sheet</ReportType>
      <Role>http://xpinc.com/role/TaxandsocialsecurityobligationsAdditionalInformationDetails</Role>
      <ShortName>Tax and social security obligations - Additional Information (Details)</ShortName>
      <MenuCategory>Details</MenuCategory>
      <Position>135</Position>
    </Report>
    <Report instance="xp-20241231.htm">
      <IsDefault>false</IsDefault>
      <HasEmbeddedReports>false</HasEmbeddedReports>
      <HtmlFileName>R136.htm</HtmlFileName>
      <LongName>9955598 - Disclosure - Retirement plans liabilities (Details)</LongName>
      <ReportType>Sheet</ReportType>
      <Role>http://xpinc.com/role/RetirementplansliabilitiesDetails</Role>
      <ShortName>Retirement plans liabilities (Details)</ShortName>
      <MenuCategory>Details</MenuCategory>
      <ParentRole>http://xpinc.com/role/RetirementplansliabilitiesTables</ParentRole>
      <Position>136</Position>
    </Report>
    <Report instance="xp-20241231.htm">
      <IsDefault>false</IsDefault>
      <HasEmbeddedReports>false</HasEmbeddedReports>
      <HtmlFileName>R137.htm</HtmlFileName>
      <LongName>9955599 - Disclosure - Income tax - Summary of components of deferred tax assets and deferred tax liabilities (Details)</LongName>
      <ReportType>Sheet</ReportType>
      <Role>http://xpinc.com/role/IncometaxSummaryofcomponentsofdeferredtaxassetsanddeferredtaxliabilitiesDetails</Role>
      <ShortName>Income tax - Summary of components of deferred tax assets and deferred tax liabilities (Details)</ShortName>
      <MenuCategory>Details</MenuCategory>
      <Position>137</Position>
    </Report>
    <Report instance="xp-20241231.htm">
      <IsDefault>false</IsDefault>
      <HasEmbeddedReports>false</HasEmbeddedReports>
      <HtmlFileName>R138.htm</HtmlFileName>
      <LongName>9955600 - Disclosure - Income tax - Summary of reconciliation of changes in deferred tax liability asset (Details)</LongName>
      <ReportType>Sheet</ReportType>
      <Role>http://xpinc.com/role/IncometaxSummaryofreconciliationofchangesindeferredtaxliabilityassetDetails</Role>
      <ShortName>Income tax - Summary of reconciliation of changes in deferred tax liability asset (Details)</ShortName>
      <MenuCategory>Details</MenuCategory>
      <Position>138</Position>
    </Report>
    <Report instance="xp-20241231.htm">
      <IsDefault>false</IsDefault>
      <HasEmbeddedReports>false</HasEmbeddedReports>
      <HtmlFileName>R139.htm</HtmlFileName>
      <LongName>9955601 - Disclosure - Income tax - Additional information (Details)</LongName>
      <ReportType>Sheet</ReportType>
      <Role>http://xpinc.com/role/IncometaxAdditionalinformationDetails</Role>
      <ShortName>Income tax - Additional information (Details)</ShortName>
      <MenuCategory>Details</MenuCategory>
      <Position>139</Position>
    </Report>
    <Report instance="xp-20241231.htm">
      <IsDefault>false</IsDefault>
      <HasEmbeddedReports>false</HasEmbeddedReports>
      <HtmlFileName>R140.htm</HtmlFileName>
      <LongName>9955602 - Disclosure - Income tax - Summary of income tax calculation (Details)</LongName>
      <ReportType>Sheet</ReportType>
      <Role>http://xpinc.com/role/IncometaxSummaryofincometaxcalculationDetails</Role>
      <ShortName>Income tax - Summary of income tax calculation (Details)</ShortName>
      <MenuCategory>Details</MenuCategory>
      <Position>140</Position>
    </Report>
    <Report instance="xp-20241231.htm">
      <IsDefault>false</IsDefault>
      <HasEmbeddedReports>false</HasEmbeddedReports>
      <HtmlFileName>R141.htm</HtmlFileName>
      <LongName>9955603 - Disclosure - Income tax - Summary of analysis of other comprehensive income by item (Details)</LongName>
      <ReportType>Sheet</ReportType>
      <Role>http://xpinc.com/role/IncometaxSummaryofanalysisofothercomprehensiveincomebyitemDetails</Role>
      <ShortName>Income tax - Summary of analysis of other comprehensive income by item (Details)</ShortName>
      <MenuCategory>Details</MenuCategory>
      <Position>141</Position>
    </Report>
    <Report instance="xp-20241231.htm">
      <IsDefault>false</IsDefault>
      <HasEmbeddedReports>false</HasEmbeddedReports>
      <HtmlFileName>R142.htm</HtmlFileName>
      <LongName>9955604 - Disclosure - Equity - Additional information (Details)</LongName>
      <ReportType>Sheet</ReportType>
      <Role>http://xpinc.com/role/EquityAdditionalinformationDetails</Role>
      <ShortName>Equity - Additional information (Details)</ShortName>
      <MenuCategory>Details</MenuCategory>
      <Position>142</Position>
    </Report>
    <Report instance="xp-20241231.htm">
      <IsDefault>false</IsDefault>
      <HasEmbeddedReports>false</HasEmbeddedReports>
      <HtmlFileName>R143.htm</HtmlFileName>
      <LongName>9955605 - Disclosure - Equity - Summary of issuances and conversations of shares (Details)</LongName>
      <ReportType>Sheet</ReportType>
      <Role>http://xpinc.com/role/EquitySummaryofissuancesandconversationsofsharesDetails</Role>
      <ShortName>Equity - Summary of issuances and conversations of shares (Details)</ShortName>
      <MenuCategory>Details</MenuCategory>
      <Position>143</Position>
    </Report>
    <Report instance="xp-20241231.htm">
      <IsDefault>false</IsDefault>
      <HasEmbeddedReports>false</HasEmbeddedReports>
      <HtmlFileName>R144.htm</HtmlFileName>
      <LongName>9955606 - Disclosure - Related party transactions - Summary of key management personnel compensation expense (Details)</LongName>
      <ReportType>Sheet</ReportType>
      <Role>http://xpinc.com/role/RelatedpartytransactionsSummaryofkeymanagementpersonnelcompensationexpenseDetails</Role>
      <ShortName>Related party transactions - Summary of key management personnel compensation expense (Details)</ShortName>
      <MenuCategory>Details</MenuCategory>
      <Position>144</Position>
    </Report>
    <Report instance="xp-20241231.htm">
      <IsDefault>false</IsDefault>
      <HasEmbeddedReports>false</HasEmbeddedReports>
      <HtmlFileName>R145.htm</HtmlFileName>
      <LongName>9955607 - Disclosure - Related party transactions - Summary of transactions between related parties explanatory (Details)</LongName>
      <ReportType>Sheet</ReportType>
      <Role>http://xpinc.com/role/RelatedpartytransactionsSummaryoftransactionsbetweenrelatedpartiesexplanatoryDetails</Role>
      <ShortName>Related party transactions - Summary of transactions between related parties explanatory (Details)</ShortName>
      <MenuCategory>Details</MenuCategory>
      <Position>145</Position>
    </Report>
    <Report instance="xp-20241231.htm">
      <IsDefault>false</IsDefault>
      <HasEmbeddedReports>false</HasEmbeddedReports>
      <HtmlFileName>R146.htm</HtmlFileName>
      <LongName>9955608 - Disclosure - Provisions and contingent liabilities - Summary of other provisions (Details)</LongName>
      <ReportType>Sheet</ReportType>
      <Role>http://xpinc.com/role/ProvisionsandcontingentliabilitiesSummaryofotherprovisionsDetails</Role>
      <ShortName>Provisions and contingent liabilities - Summary of other provisions (Details)</ShortName>
      <MenuCategory>Details</MenuCategory>
      <Position>146</Position>
    </Report>
    <Report instance="xp-20241231.htm">
      <IsDefault>false</IsDefault>
      <HasEmbeddedReports>false</HasEmbeddedReports>
      <HtmlFileName>R147.htm</HtmlFileName>
      <LongName>9955609 - Disclosure - Provisions and contingent liabilities - Summary of changes in other provisions (Details)</LongName>
      <ReportType>Sheet</ReportType>
      <Role>http://xpinc.com/role/ProvisionsandcontingentliabilitiesSummaryofchangesinotherprovisionsDetails</Role>
      <ShortName>Provisions and contingent liabilities - Summary of changes in other provisions (Details)</ShortName>
      <MenuCategory>Details</MenuCategory>
      <Position>147</Position>
    </Report>
    <Report instance="xp-20241231.htm">
      <IsDefault>false</IsDefault>
      <HasEmbeddedReports>false</HasEmbeddedReports>
      <HtmlFileName>R148.htm</HtmlFileName>
      <LongName>9955610 - Disclosure - Provisions and contingent liabilities - Additional information (Details)</LongName>
      <ReportType>Sheet</ReportType>
      <Role>http://xpinc.com/role/ProvisionsandcontingentliabilitiesAdditionalinformationDetails</Role>
      <ShortName>Provisions and contingent liabilities - Additional information (Details)</ShortName>
      <MenuCategory>Details</MenuCategory>
      <Position>148</Position>
    </Report>
    <Report instance="xp-20241231.htm">
      <IsDefault>false</IsDefault>
      <HasEmbeddedReports>false</HasEmbeddedReports>
      <HtmlFileName>R149.htm</HtmlFileName>
      <LongName>9955611 - Disclosure - Provisions and contingent liabilities - Summary of contingent liabilities (Details)</LongName>
      <ReportType>Sheet</ReportType>
      <Role>http://xpinc.com/role/ProvisionsandcontingentliabilitiesSummaryofcontingentliabilitiesDetails</Role>
      <ShortName>Provisions and contingent liabilities - Summary of contingent liabilities (Details)</ShortName>
      <MenuCategory>Details</MenuCategory>
      <Position>149</Position>
    </Report>
    <Report instance="xp-20241231.htm">
      <IsDefault>false</IsDefault>
      <HasEmbeddedReports>false</HasEmbeddedReports>
      <HtmlFileName>R150.htm</HtmlFileName>
      <LongName>9955612 - Disclosure - Other assets and other liabilities (Details)</LongName>
      <ReportType>Sheet</ReportType>
      <Role>http://xpinc.com/role/OtherassetsandotherliabilitiesDetails</Role>
      <ShortName>Other assets and other liabilities (Details)</ShortName>
      <MenuCategory>Details</MenuCategory>
      <ParentRole>http://xpinc.com/role/OtherassetsandotherliabilitiesTables</ParentRole>
      <Position>150</Position>
    </Report>
    <Report instance="xp-20241231.htm">
      <IsDefault>false</IsDefault>
      <HasEmbeddedReports>false</HasEmbeddedReports>
      <HtmlFileName>R151.htm</HtmlFileName>
      <LongName>9955613 - Disclosure - Total revenue and income - Disaggregation of revenue by major service lines (Details)</LongName>
      <ReportType>Sheet</ReportType>
      <Role>http://xpinc.com/role/TotalrevenueandincomeDisaggregationofrevenuebymajorservicelinesDetails</Role>
      <ShortName>Total revenue and income - Disaggregation of revenue by major service lines (Details)</ShortName>
      <MenuCategory>Details</MenuCategory>
      <Position>151</Position>
    </Report>
    <Report instance="xp-20241231.htm">
      <IsDefault>false</IsDefault>
      <HasEmbeddedReports>false</HasEmbeddedReports>
      <HtmlFileName>R152.htm</HtmlFileName>
      <LongName>9955614 - Disclosure - Total revenue and income - Summary of net income from financial instruments (Details)</LongName>
      <ReportType>Sheet</ReportType>
      <Role>http://xpinc.com/role/TotalrevenueandincomeSummaryofnetincomefromfinancialinstrumentsDetails</Role>
      <ShortName>Total revenue and income - Summary of net income from financial instruments (Details)</ShortName>
      <MenuCategory>Details</MenuCategory>
      <Position>152</Position>
    </Report>
    <Report instance="xp-20241231.htm">
      <IsDefault>false</IsDefault>
      <HasEmbeddedReports>false</HasEmbeddedReports>
      <HtmlFileName>R153.htm</HtmlFileName>
      <LongName>9955615 - Disclosure - Total revenue and income - Summary of disaggregation by geographic location (Details)</LongName>
      <ReportType>Sheet</ReportType>
      <Role>http://xpinc.com/role/TotalrevenueandincomeSummaryofdisaggregationbygeographiclocationDetails</Role>
      <ShortName>Total revenue and income - Summary of disaggregation by geographic location (Details)</ShortName>
      <MenuCategory>Details</MenuCategory>
      <Position>153</Position>
    </Report>
    <Report instance="xp-20241231.htm">
      <IsDefault>false</IsDefault>
      <HasEmbeddedReports>false</HasEmbeddedReports>
      <HtmlFileName>R154.htm</HtmlFileName>
      <LongName>9955616 - Disclosure - Operating costs (Details)</LongName>
      <ReportType>Sheet</ReportType>
      <Role>http://xpinc.com/role/OperatingcostsDetails</Role>
      <ShortName>Operating costs (Details)</ShortName>
      <MenuCategory>Details</MenuCategory>
      <ParentRole>http://xpinc.com/role/OperatingcostsTables</ParentRole>
      <Position>154</Position>
    </Report>
    <Report instance="xp-20241231.htm">
      <IsDefault>false</IsDefault>
      <HasEmbeddedReports>false</HasEmbeddedReports>
      <HtmlFileName>R155.htm</HtmlFileName>
      <LongName>9955617 - Disclosure - Operating expenses by nature (Details)</LongName>
      <ReportType>Sheet</ReportType>
      <Role>http://xpinc.com/role/OperatingexpensesbynatureDetails</Role>
      <ShortName>Operating expenses by nature (Details)</ShortName>
      <MenuCategory>Details</MenuCategory>
      <ParentRole>http://xpinc.com/role/OperatingexpensesbynatureTables</ParentRole>
      <Position>155</Position>
    </Report>
    <Report instance="xp-20241231.htm">
      <IsDefault>false</IsDefault>
      <HasEmbeddedReports>false</HasEmbeddedReports>
      <HtmlFileName>R156.htm</HtmlFileName>
      <LongName>9955618 - Disclosure - Other operating income/(expenses), net (Details)</LongName>
      <ReportType>Sheet</ReportType>
      <Role>http://xpinc.com/role/OtheroperatingincomeexpensesnetDetails</Role>
      <ShortName>Other operating income/(expenses), net (Details)</ShortName>
      <MenuCategory>Details</MenuCategory>
      <ParentRole>http://xpinc.com/role/OtheroperatingincomeexpensesnetTables</ParentRole>
      <Position>156</Position>
    </Report>
    <Report instance="xp-20241231.htm">
      <IsDefault>false</IsDefault>
      <HasEmbeddedReports>false</HasEmbeddedReports>
      <HtmlFileName>R157.htm</HtmlFileName>
      <LongName>9955619 - Disclosure - Share-based plan - Additional information (Details)</LongName>
      <ReportType>Sheet</ReportType>
      <Role>http://xpinc.com/role/SharebasedplanAdditionalinformationDetails</Role>
      <ShortName>Share-based plan - Additional information (Details)</ShortName>
      <MenuCategory>Details</MenuCategory>
      <Position>157</Position>
    </Report>
    <Report instance="xp-20241231.htm">
      <IsDefault>false</IsDefault>
      <HasEmbeddedReports>false</HasEmbeddedReports>
      <HtmlFileName>R158.htm</HtmlFileName>
      <LongName>9955620 - Disclosure - Share-based plan - Activity of RSUs and PSUs (Details)</LongName>
      <ReportType>Sheet</ReportType>
      <Role>http://xpinc.com/role/SharebasedplanActivityofRSUsandPSUsDetails</Role>
      <ShortName>Share-based plan - Activity of RSUs and PSUs (Details)</ShortName>
      <MenuCategory>Details</MenuCategory>
      <Position>158</Position>
    </Report>
    <Report instance="xp-20241231.htm">
      <IsDefault>false</IsDefault>
      <HasEmbeddedReports>false</HasEmbeddedReports>
      <HtmlFileName>R159.htm</HtmlFileName>
      <LongName>9955621 - Disclosure - Earnings per share (basic and diluted) (Details)</LongName>
      <ReportType>Sheet</ReportType>
      <Role>http://xpinc.com/role/EarningspersharebasicanddilutedDetails</Role>
      <ShortName>Earnings per share (basic and diluted) (Details)</ShortName>
      <MenuCategory>Details</MenuCategory>
      <ParentRole>http://xpinc.com/role/EarningspersharebasicanddilutedTables</ParentRole>
      <Position>159</Position>
    </Report>
    <Report instance="xp-20241231.htm">
      <IsDefault>false</IsDefault>
      <HasEmbeddedReports>false</HasEmbeddedReports>
      <HtmlFileName>R160.htm</HtmlFileName>
      <LongName>9955622 - Disclosure - Determination of fair value (Details)</LongName>
      <ReportType>Sheet</ReportType>
      <Role>http://xpinc.com/role/DeterminationoffairvalueDetails</Role>
      <ShortName>Determination of fair value (Details)</ShortName>
      <MenuCategory>Details</MenuCategory>
      <ParentRole>http://xpinc.com/role/DeterminationoffairvalueTables</ParentRole>
      <Position>160</Position>
    </Report>
    <Report instance="xp-20241231.htm">
      <IsDefault>false</IsDefault>
      <HasEmbeddedReports>false</HasEmbeddedReports>
      <HtmlFileName>R161.htm</HtmlFileName>
      <LongName>9955623 - Disclosure - Management of financial risks and financial instruments (Details)</LongName>
      <ReportType>Sheet</ReportType>
      <Role>http://xpinc.com/role/ManagementoffinancialrisksandfinancialinstrumentsDetails</Role>
      <ShortName>Management of financial risks and financial instruments (Details)</ShortName>
      <MenuCategory>Details</MenuCategory>
      <ParentRole>http://xpinc.com/role/ManagementoffinancialrisksandfinancialinstrumentsTables</ParentRole>
      <Position>161</Position>
    </Report>
    <Report instance="xp-20241231.htm">
      <IsDefault>false</IsDefault>
      <HasEmbeddedReports>false</HasEmbeddedReports>
      <HtmlFileName>R162.htm</HtmlFileName>
      <LongName>9955624 - Disclosure - Management of financial risks and financial instruments - Summary of financial liabilities into groupings based on their contractual maturities (Details)</LongName>
      <ReportType>Sheet</ReportType>
      <Role>http://xpinc.com/role/ManagementoffinancialrisksandfinancialinstrumentsSummaryoffinancialliabilitiesintogroupingsbasedontheircontractualmaturitiesDetails</Role>
      <ShortName>Management of financial risks and financial instruments - Summary of financial liabilities into groupings based on their contractual maturities (Details)</ShortName>
      <MenuCategory>Details</MenuCategory>
      <Position>162</Position>
    </Report>
    <Report instance="xp-20241231.htm">
      <IsDefault>false</IsDefault>
      <HasEmbeddedReports>false</HasEmbeddedReports>
      <HtmlFileName>R163.htm</HtmlFileName>
      <LongName>9955625 - Disclosure - Management of financial risks and financial instruments - Additional information (Details)</LongName>
      <ReportType>Sheet</ReportType>
      <Role>http://xpinc.com/role/ManagementoffinancialrisksandfinancialinstrumentsAdditionalinformationDetails</Role>
      <ShortName>Management of financial risks and financial instruments - Additional information (Details)</ShortName>
      <MenuCategory>Details</MenuCategory>
      <Position>163</Position>
    </Report>
    <Report instance="xp-20241231.htm">
      <IsDefault>false</IsDefault>
      <HasEmbeddedReports>false</HasEmbeddedReports>
      <HtmlFileName>R164.htm</HtmlFileName>
      <LongName>9955626 - Disclosure - Management of financial risks and financial instruments - Summary of sensitivity analysis (Details)</LongName>
      <ReportType>Sheet</ReportType>
      <Role>http://xpinc.com/role/ManagementoffinancialrisksandfinancialinstrumentsSummaryofsensitivityanalysisDetails</Role>
      <ShortName>Management of financial risks and financial instruments - Summary of sensitivity analysis (Details)</ShortName>
      <MenuCategory>Details</MenuCategory>
      <Position>164</Position>
    </Report>
    <Report instance="xp-20241231.htm">
      <IsDefault>false</IsDefault>
      <HasEmbeddedReports>false</HasEmbeddedReports>
      <HtmlFileName>R165.htm</HtmlFileName>
      <LongName>9955627 - Disclosure - Capital management - Summary of net debt and corresponding gearing ratios (Details)</LongName>
      <ReportType>Sheet</ReportType>
      <Role>http://xpinc.com/role/CapitalmanagementSummaryofnetdebtandcorrespondinggearingratiosDetails</Role>
      <ShortName>Capital management - Summary of net debt and corresponding gearing ratios (Details)</ShortName>
      <MenuCategory>Details</MenuCategory>
      <Position>165</Position>
    </Report>
    <Report instance="xp-20241231.htm">
      <IsDefault>false</IsDefault>
      <HasEmbeddedReports>false</HasEmbeddedReports>
      <HtmlFileName>R166.htm</HtmlFileName>
      <LongName>9955628 - Disclosure - Capital management - Additional information (Details)</LongName>
      <ReportType>Sheet</ReportType>
      <Role>http://xpinc.com/role/CapitalmanagementAdditionalinformationDetails</Role>
      <ShortName>Capital management - Additional information (Details)</ShortName>
      <MenuCategory>Details</MenuCategory>
      <Position>166</Position>
    </Report>
    <Report instance="xp-20241231.htm">
      <IsDefault>false</IsDefault>
      <HasEmbeddedReports>false</HasEmbeddedReports>
      <HtmlFileName>R167.htm</HtmlFileName>
      <LongName>9955629 - Disclosure - Cash flow information (Details)</LongName>
      <ReportType>Sheet</ReportType>
      <Role>http://xpinc.com/role/CashflowinformationDetails</Role>
      <ShortName>Cash flow information (Details)</ShortName>
      <MenuCategory>Details</MenuCategory>
      <ParentRole>http://xpinc.com/role/CashflowinformationTables</ParentRole>
      <Position>167</Position>
    </Report>
    <Report instance="xp-20241231.htm">
      <IsDefault>false</IsDefault>
      <HasEmbeddedReports>false</HasEmbeddedReports>
      <HtmlFileName>R168.htm</HtmlFileName>
      <LongName>9955630 - Disclosure - Cash flow information - Additional information (Details)</LongName>
      <ReportType>Sheet</ReportType>
      <Role>http://xpinc.com/role/CashflowinformationAdditionalinformationDetails</Role>
      <ShortName>Cash flow information - Additional information (Details)</ShortName>
      <MenuCategory>Details</MenuCategory>
      <Position>168</Position>
    </Report>
    <Report instance="xp-20241231.htm">
      <IsDefault>false</IsDefault>
      <HasEmbeddedReports>false</HasEmbeddedReports>
      <HtmlFileName>R169.htm</HtmlFileName>
      <LongName>9955631 - Disclosure - Subsequent events (Details)</LongName>
      <ReportType>Sheet</ReportType>
      <Role>http://xpinc.com/role/SubsequenteventsDetails</Role>
      <ShortName>Subsequent events (Details)</ShortName>
      <MenuCategory>Details</MenuCategory>
      <ParentRole>http://xpinc.com/role/Subsequentevents</ParentRole>
      <Position>169</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="20-F" isDefinitelyFs="true" isIfrs="true" isUsgaap="true" original="xp-20241231.htm">xp-20241231.htm</File>
    <File>xp-20241231.xsd</File>
    <File>xp-20241231_cal.xml</File>
    <File>xp-20241231_def.xml</File>
    <File>xp-20241231_lab.xml</File>
    <File>xp-20241231_pre.xml</File>
  </InputFiles>
  <SupplementalFiles>
    <File>xp-20241231_g1.gif</File>
    <File>xp-20241231_g2.jpg</File>
    <File>xp-20241231_g3.jpg</File>
    <File>xp-20241231_g4.jpg</File>
    <File>xp-20241231_g5.jpg</File>
    <File>xp-20241231_g6.jpg</File>
    <File>xp-20241231_g7.jpg</File>
    <File>xp-20241231_g8.jpg</File>
    <File>xp-20241231_g9.jpg</File>
  </SupplementalFiles>
  <BaseTaxonomies>
    <BaseTaxonomy items="8">http://xbrl.sec.gov/cyd/2024</BaseTaxonomy>
    <BaseTaxonomy items="45">http://xbrl.sec.gov/dei/2024</BaseTaxonomy>
    <BaseTaxonomy items="1">http://xbrl.sec.gov/ecd/2024</BaseTaxonomy>
    <BaseTaxonomy items="2915">https://xbrl.ifrs.org/taxonomy/2024-03-27/ifrs-full</BaseTaxonomy>
  </BaseTaxonomies>
  <HasPresentationLinkbase>true</HasPresentationLinkbase>
  <HasCalculationLinkbase>true</HasCalculationLinkbase>
</FilingSummary>
