<?xml version='1.0' encoding='utf-8'?>
<FilingSummary>
  <Version>3.26.1</Version>
  <ProcessingTime/>
  <ReportFormat>html</ReportFormat>
  <ContextCount>649</ContextCount>
  <ElementCount>782</ElementCount>
  <EntityCount>1</EntityCount>
  <FootnotesReported>false</FootnotesReported>
  <SegmentCount>171</SegmentCount>
  <ScenarioCount>0</ScenarioCount>
  <TuplesReported>false</TuplesReported>
  <UnitCount>11</UnitCount>
  <MyReports>
    <Report instance="pfis-20251231x10k.htm">
      <IsDefault>false</IsDefault>
      <HasEmbeddedReports>false</HasEmbeddedReports>
      <HtmlFileName>R1.htm</HtmlFileName>
      <LongName>995200090 - Document - Document and Entity Information</LongName>
      <ReportType>Sheet</ReportType>
      <Role>http://www.peoplesfinancial.com/role/DocumentDocumentAndEntityInformation</Role>
      <ShortName>Document and Entity Information</ShortName>
      <MenuCategory>Cover</MenuCategory>
      <Position>1</Position>
    </Report>
    <Report instance="pfis-20251231x10k.htm">
      <IsDefault>false</IsDefault>
      <HasEmbeddedReports>false</HasEmbeddedReports>
      <HtmlFileName>R2.htm</HtmlFileName>
      <LongName>995200100 - Statement - CONSOLIDATED BALANCE SHEETS</LongName>
      <ReportType>Sheet</ReportType>
      <Role>http://www.peoplesfinancial.com/role/StatementConsolidatedBalanceSheets</Role>
      <ShortName>CONSOLIDATED BALANCE SHEETS</ShortName>
      <MenuCategory>Statements</MenuCategory>
      <Position>2</Position>
    </Report>
    <Report instance="pfis-20251231x10k.htm">
      <IsDefault>false</IsDefault>
      <HasEmbeddedReports>false</HasEmbeddedReports>
      <HtmlFileName>R3.htm</HtmlFileName>
      <LongName>995200105 - Statement - CONSOLIDATED BALANCE SHEETS (Parenthetical)</LongName>
      <ReportType>Sheet</ReportType>
      <Role>http://www.peoplesfinancial.com/role/StatementConsolidatedBalanceSheetsParenthetical</Role>
      <ShortName>CONSOLIDATED BALANCE SHEETS (Parenthetical)</ShortName>
      <MenuCategory>Statements</MenuCategory>
      <Position>3</Position>
    </Report>
    <Report instance="pfis-20251231x10k.htm">
      <IsDefault>false</IsDefault>
      <HasEmbeddedReports>false</HasEmbeddedReports>
      <HtmlFileName>R4.htm</HtmlFileName>
      <LongName>995200200 - Statement - CONSOLIDATED STATEMENTS OF INCOME AND COMPREHENSIVE INCOME</LongName>
      <ReportType>Sheet</ReportType>
      <Role>http://www.peoplesfinancial.com/role/StatementConsolidatedStatementsOfIncomeAndComprehensiveIncome</Role>
      <ShortName>CONSOLIDATED STATEMENTS OF INCOME AND COMPREHENSIVE INCOME</ShortName>
      <MenuCategory>Statements</MenuCategory>
      <Position>4</Position>
    </Report>
    <Report instance="pfis-20251231x10k.htm">
      <IsDefault>false</IsDefault>
      <HasEmbeddedReports>false</HasEmbeddedReports>
      <HtmlFileName>R5.htm</HtmlFileName>
      <LongName>995200300 - Statement - CONSOLIDATED STATEMENTS OF CHANGES IN STOCKHOLDERS' EQUITY</LongName>
      <ReportType>Sheet</ReportType>
      <Role>http://www.peoplesfinancial.com/role/StatementConsolidatedStatementsOfChangesInStockholdersEquity</Role>
      <ShortName>CONSOLIDATED STATEMENTS OF CHANGES IN STOCKHOLDERS' EQUITY</ShortName>
      <MenuCategory>Statements</MenuCategory>
      <Position>5</Position>
    </Report>
    <Report instance="pfis-20251231x10k.htm">
      <IsDefault>false</IsDefault>
      <HasEmbeddedReports>false</HasEmbeddedReports>
      <HtmlFileName>R6.htm</HtmlFileName>
      <LongName>995200305 - Statement - CONSOLIDATED STATEMENTS OF CHANGES IN STOCKHOLDERS' EQUITY (Parenthetical)</LongName>
      <ReportType>Sheet</ReportType>
      <Role>http://www.peoplesfinancial.com/role/StatementConsolidatedStatementsOfChangesInStockholdersEquityParenthetical</Role>
      <ShortName>CONSOLIDATED STATEMENTS OF CHANGES IN STOCKHOLDERS' EQUITY (Parenthetical)</ShortName>
      <MenuCategory>Statements</MenuCategory>
      <Position>6</Position>
    </Report>
    <Report instance="pfis-20251231x10k.htm">
      <IsDefault>false</IsDefault>
      <HasEmbeddedReports>false</HasEmbeddedReports>
      <HtmlFileName>R7.htm</HtmlFileName>
      <LongName>995200400 - Statement - CONSOLIDATED STATEMENTS OF CASH FLOWS</LongName>
      <ReportType>Sheet</ReportType>
      <Role>http://www.peoplesfinancial.com/role/StatementConsolidatedStatementsOfCashFlows</Role>
      <ShortName>CONSOLIDATED STATEMENTS OF CASH FLOWS</ShortName>
      <MenuCategory>Statements</MenuCategory>
      <Position>7</Position>
    </Report>
    <Report instance="pfis-20251231x10k.htm">
      <IsDefault>false</IsDefault>
      <HasEmbeddedReports>false</HasEmbeddedReports>
      <HtmlFileName>R8.htm</HtmlFileName>
      <LongName>995210101 - Disclosure - Summary of significant accounting policies</LongName>
      <ReportType>Sheet</ReportType>
      <Role>http://www.peoplesfinancial.com/role/DisclosureSummaryOfSignificantAccountingPolicies</Role>
      <ShortName>Summary of significant accounting policies</ShortName>
      <MenuCategory>Notes</MenuCategory>
      <Position>8</Position>
    </Report>
    <Report instance="pfis-20251231x10k.htm">
      <IsDefault>false</IsDefault>
      <HasEmbeddedReports>false</HasEmbeddedReports>
      <HtmlFileName>R9.htm</HtmlFileName>
      <LongName>995210201 - Disclosure - Business Combinations</LongName>
      <ReportType>Sheet</ReportType>
      <Role>http://www.peoplesfinancial.com/role/DisclosureBusinessCombinations</Role>
      <ShortName>Business Combinations</ShortName>
      <MenuCategory>Notes</MenuCategory>
      <Position>9</Position>
    </Report>
    <Report instance="pfis-20251231x10k.htm">
      <IsDefault>false</IsDefault>
      <HasEmbeddedReports>false</HasEmbeddedReports>
      <HtmlFileName>R10.htm</HtmlFileName>
      <LongName>995210301 - Disclosure - Investment securities</LongName>
      <ReportType>Sheet</ReportType>
      <Role>http://www.peoplesfinancial.com/role/DisclosureInvestmentSecurities</Role>
      <ShortName>Investment securities</ShortName>
      <MenuCategory>Notes</MenuCategory>
      <Position>10</Position>
    </Report>
    <Report instance="pfis-20251231x10k.htm">
      <IsDefault>false</IsDefault>
      <HasEmbeddedReports>false</HasEmbeddedReports>
      <HtmlFileName>R11.htm</HtmlFileName>
      <LongName>995210401 - Disclosure - Loans, net and allowance for credit losses</LongName>
      <ReportType>Sheet</ReportType>
      <Role>http://www.peoplesfinancial.com/role/DisclosureLoansNetAndAllowanceForCreditLosses</Role>
      <ShortName>Loans, net and allowance for credit losses</ShortName>
      <MenuCategory>Notes</MenuCategory>
      <Position>11</Position>
    </Report>
    <Report instance="pfis-20251231x10k.htm">
      <IsDefault>false</IsDefault>
      <HasEmbeddedReports>false</HasEmbeddedReports>
      <HtmlFileName>R12.htm</HtmlFileName>
      <LongName>995210501 - Disclosure - Related party transactions</LongName>
      <ReportType>Sheet</ReportType>
      <Role>http://www.peoplesfinancial.com/role/DisclosureRelatedPartyTransactions</Role>
      <ShortName>Related party transactions</ShortName>
      <MenuCategory>Notes</MenuCategory>
      <Position>12</Position>
    </Report>
    <Report instance="pfis-20251231x10k.htm">
      <IsDefault>false</IsDefault>
      <HasEmbeddedReports>false</HasEmbeddedReports>
      <HtmlFileName>R13.htm</HtmlFileName>
      <LongName>995210601 - Disclosure - Off-balance sheet financial instruments</LongName>
      <ReportType>Sheet</ReportType>
      <Role>http://www.peoplesfinancial.com/role/DisclosureOffBalanceSheetFinancialInstruments</Role>
      <ShortName>Off-balance sheet financial instruments</ShortName>
      <MenuCategory>Notes</MenuCategory>
      <Position>13</Position>
    </Report>
    <Report instance="pfis-20251231x10k.htm">
      <IsDefault>false</IsDefault>
      <HasEmbeddedReports>false</HasEmbeddedReports>
      <HtmlFileName>R14.htm</HtmlFileName>
      <LongName>995210701 - Disclosure - Premises and equipment, net</LongName>
      <ReportType>Sheet</ReportType>
      <Role>http://www.peoplesfinancial.com/role/DisclosurePremisesAndEquipmentNet</Role>
      <ShortName>Premises and equipment, net</ShortName>
      <MenuCategory>Notes</MenuCategory>
      <Position>14</Position>
    </Report>
    <Report instance="pfis-20251231x10k.htm">
      <IsDefault>false</IsDefault>
      <HasEmbeddedReports>false</HasEmbeddedReports>
      <HtmlFileName>R15.htm</HtmlFileName>
      <LongName>995210801 - Disclosure - Operating lease commitments and contingencies</LongName>
      <ReportType>Sheet</ReportType>
      <Role>http://www.peoplesfinancial.com/role/DisclosureOperatingLeaseCommitmentsAndContingencies</Role>
      <ShortName>Operating lease commitments and contingencies</ShortName>
      <MenuCategory>Notes</MenuCategory>
      <Position>15</Position>
    </Report>
    <Report instance="pfis-20251231x10k.htm">
      <IsDefault>false</IsDefault>
      <HasEmbeddedReports>false</HasEmbeddedReports>
      <HtmlFileName>R16.htm</HtmlFileName>
      <LongName>995210901 - Disclosure - Goodwill and other intangibles</LongName>
      <ReportType>Sheet</ReportType>
      <Role>http://www.peoplesfinancial.com/role/DisclosureGoodwillAndOtherIntangibles</Role>
      <ShortName>Goodwill and other intangibles</ShortName>
      <MenuCategory>Notes</MenuCategory>
      <Position>16</Position>
    </Report>
    <Report instance="pfis-20251231x10k.htm">
      <IsDefault>false</IsDefault>
      <HasEmbeddedReports>false</HasEmbeddedReports>
      <HtmlFileName>R17.htm</HtmlFileName>
      <LongName>995211001 - Disclosure - Other assets</LongName>
      <ReportType>Sheet</ReportType>
      <Role>http://www.peoplesfinancial.com/role/DisclosureOtherAssets</Role>
      <ShortName>Other assets</ShortName>
      <MenuCategory>Notes</MenuCategory>
      <Position>17</Position>
    </Report>
    <Report instance="pfis-20251231x10k.htm">
      <IsDefault>false</IsDefault>
      <HasEmbeddedReports>false</HasEmbeddedReports>
      <HtmlFileName>R18.htm</HtmlFileName>
      <LongName>995211101 - Disclosure - Deposits</LongName>
      <ReportType>Sheet</ReportType>
      <Role>http://www.peoplesfinancial.com/role/DisclosureDeposits</Role>
      <ShortName>Deposits</ShortName>
      <MenuCategory>Notes</MenuCategory>
      <Position>18</Position>
    </Report>
    <Report instance="pfis-20251231x10k.htm">
      <IsDefault>false</IsDefault>
      <HasEmbeddedReports>false</HasEmbeddedReports>
      <HtmlFileName>R19.htm</HtmlFileName>
      <LongName>995211201 - Disclosure - Short-term borrowings</LongName>
      <ReportType>Sheet</ReportType>
      <Role>http://www.peoplesfinancial.com/role/DisclosureShortTermBorrowings</Role>
      <ShortName>Short-term borrowings</ShortName>
      <MenuCategory>Notes</MenuCategory>
      <Position>19</Position>
    </Report>
    <Report instance="pfis-20251231x10k.htm">
      <IsDefault>false</IsDefault>
      <HasEmbeddedReports>false</HasEmbeddedReports>
      <HtmlFileName>R20.htm</HtmlFileName>
      <LongName>995211301 - Disclosure - Long-term debt</LongName>
      <ReportType>Sheet</ReportType>
      <Role>http://www.peoplesfinancial.com/role/DisclosureLongTermDebt</Role>
      <ShortName>Long-term debt</ShortName>
      <MenuCategory>Notes</MenuCategory>
      <Position>20</Position>
    </Report>
    <Report instance="pfis-20251231x10k.htm">
      <IsDefault>false</IsDefault>
      <HasEmbeddedReports>false</HasEmbeddedReports>
      <HtmlFileName>R21.htm</HtmlFileName>
      <LongName>995211401 - Disclosure - Subordinated debt</LongName>
      <ReportType>Sheet</ReportType>
      <Role>http://www.peoplesfinancial.com/role/DisclosureSubordinatedDebt</Role>
      <ShortName>Subordinated debt</ShortName>
      <MenuCategory>Notes</MenuCategory>
      <Position>21</Position>
    </Report>
    <Report instance="pfis-20251231x10k.htm">
      <IsDefault>false</IsDefault>
      <HasEmbeddedReports>false</HasEmbeddedReports>
      <HtmlFileName>R22.htm</HtmlFileName>
      <LongName>995211501 - Disclosure - Fair value of financial instruments</LongName>
      <ReportType>Sheet</ReportType>
      <Role>http://www.peoplesfinancial.com/role/DisclosureFairValueOfFinancialInstruments</Role>
      <ShortName>Fair value of financial instruments</ShortName>
      <MenuCategory>Notes</MenuCategory>
      <Position>22</Position>
    </Report>
    <Report instance="pfis-20251231x10k.htm">
      <IsDefault>false</IsDefault>
      <HasEmbeddedReports>false</HasEmbeddedReports>
      <HtmlFileName>R23.htm</HtmlFileName>
      <LongName>995211601 - Disclosure - Derivatives and hedging activities</LongName>
      <ReportType>Sheet</ReportType>
      <Role>http://www.peoplesfinancial.com/role/DisclosureDerivativesAndHedgingActivities</Role>
      <ShortName>Derivatives and hedging activities</ShortName>
      <MenuCategory>Notes</MenuCategory>
      <Position>23</Position>
    </Report>
    <Report instance="pfis-20251231x10k.htm">
      <IsDefault>false</IsDefault>
      <HasEmbeddedReports>false</HasEmbeddedReports>
      <HtmlFileName>R24.htm</HtmlFileName>
      <LongName>995211701 - Disclosure - Stock plans</LongName>
      <ReportType>Sheet</ReportType>
      <Role>http://www.peoplesfinancial.com/role/DisclosureStockPlans</Role>
      <ShortName>Stock plans</ShortName>
      <MenuCategory>Notes</MenuCategory>
      <Position>24</Position>
    </Report>
    <Report instance="pfis-20251231x10k.htm">
      <IsDefault>false</IsDefault>
      <HasEmbeddedReports>false</HasEmbeddedReports>
      <HtmlFileName>R25.htm</HtmlFileName>
      <LongName>995211801 - Disclosure - Employee benefit plans</LongName>
      <ReportType>Sheet</ReportType>
      <Role>http://www.peoplesfinancial.com/role/DisclosureEmployeeBenefitPlans</Role>
      <ShortName>Employee benefit plans</ShortName>
      <MenuCategory>Notes</MenuCategory>
      <Position>25</Position>
    </Report>
    <Report instance="pfis-20251231x10k.htm">
      <IsDefault>false</IsDefault>
      <HasEmbeddedReports>false</HasEmbeddedReports>
      <HtmlFileName>R26.htm</HtmlFileName>
      <LongName>995211901 - Disclosure - Income taxes</LongName>
      <ReportType>Sheet</ReportType>
      <Role>http://www.peoplesfinancial.com/role/DisclosureIncomeTaxes</Role>
      <ShortName>Income taxes</ShortName>
      <MenuCategory>Notes</MenuCategory>
      <Position>26</Position>
    </Report>
    <Report instance="pfis-20251231x10k.htm">
      <IsDefault>false</IsDefault>
      <HasEmbeddedReports>false</HasEmbeddedReports>
      <HtmlFileName>R27.htm</HtmlFileName>
      <LongName>995212001 - Disclosure - Segment Reporting</LongName>
      <ReportType>Sheet</ReportType>
      <Role>http://www.peoplesfinancial.com/role/DisclosureSegmentReporting</Role>
      <ShortName>Segment Reporting</ShortName>
      <MenuCategory>Notes</MenuCategory>
      <Position>27</Position>
    </Report>
    <Report instance="pfis-20251231x10k.htm">
      <IsDefault>false</IsDefault>
      <HasEmbeddedReports>false</HasEmbeddedReports>
      <HtmlFileName>R28.htm</HtmlFileName>
      <LongName>995212101 - Disclosure - Parent Company financial statements</LongName>
      <ReportType>Sheet</ReportType>
      <Role>http://www.peoplesfinancial.com/role/DisclosureParentCompanyFinancialStatements</Role>
      <ShortName>Parent Company financial statements</ShortName>
      <MenuCategory>Notes</MenuCategory>
      <Position>28</Position>
    </Report>
    <Report instance="pfis-20251231x10k.htm">
      <IsDefault>false</IsDefault>
      <HasEmbeddedReports>false</HasEmbeddedReports>
      <HtmlFileName>R29.htm</HtmlFileName>
      <LongName>995212201 - Disclosure - Regulatory matters</LongName>
      <ReportType>Sheet</ReportType>
      <Role>http://www.peoplesfinancial.com/role/DisclosureRegulatoryMatters</Role>
      <ShortName>Regulatory matters</ShortName>
      <MenuCategory>Notes</MenuCategory>
      <Position>29</Position>
    </Report>
    <Report instance="pfis-20251231x10k.htm">
      <IsDefault>false</IsDefault>
      <HasEmbeddedReports>false</HasEmbeddedReports>
      <HtmlFileName>R30.htm</HtmlFileName>
      <LongName>995212301 - Disclosure - Accumulated Other Comprehensive Loss</LongName>
      <ReportType>Sheet</ReportType>
      <Role>http://www.peoplesfinancial.com/role/DisclosureAccumulatedOtherComprehensiveLoss</Role>
      <ShortName>Accumulated Other Comprehensive Loss</ShortName>
      <MenuCategory>Notes</MenuCategory>
      <Position>30</Position>
    </Report>
    <Report instance="pfis-20251231x10k.htm">
      <IsDefault>false</IsDefault>
      <HasEmbeddedReports>false</HasEmbeddedReports>
      <HtmlFileName>R31.htm</HtmlFileName>
      <LongName>995410 - Disclosure - Pay vs Performance Disclosure</LongName>
      <ReportType>Sheet</ReportType>
      <Role>http://xbrl.sec.gov/ecd/role/PvpDisclosure</Role>
      <ShortName>Pay vs Performance Disclosure</ShortName>
      <MenuCategory>Notes</MenuCategory>
      <Position>31</Position>
    </Report>
    <Report instance="pfis-20251231x10k.htm">
      <IsDefault>false</IsDefault>
      <HasEmbeddedReports>false</HasEmbeddedReports>
      <HtmlFileName>R32.htm</HtmlFileName>
      <LongName>995445 - Disclosure - Insider Trading Arrangements</LongName>
      <ReportType>Sheet</ReportType>
      <Role>http://xbrl.sec.gov/ecd/role/InsiderTradingArrangements</Role>
      <ShortName>Insider Trading Arrangements</ShortName>
      <MenuCategory>Notes</MenuCategory>
      <Position>32</Position>
    </Report>
    <Report instance="pfis-20251231x10k.htm">
      <IsDefault>false</IsDefault>
      <HasEmbeddedReports>false</HasEmbeddedReports>
      <HtmlFileName>R33.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>33</Position>
    </Report>
    <Report instance="pfis-20251231x10k.htm">
      <IsDefault>false</IsDefault>
      <HasEmbeddedReports>false</HasEmbeddedReports>
      <HtmlFileName>R34.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>34</Position>
    </Report>
    <Report instance="pfis-20251231x10k.htm">
      <IsDefault>false</IsDefault>
      <HasEmbeddedReports>false</HasEmbeddedReports>
      <HtmlFileName>R35.htm</HtmlFileName>
      <LongName>99920102 - Disclosure - Summary of significant accounting policies (Policies)</LongName>
      <ReportType>Sheet</ReportType>
      <Role>http://www.peoplesfinancial.com/role/DisclosureSummaryOfSignificantAccountingPoliciesPolicies</Role>
      <ShortName>Summary of significant accounting policies (Policies)</ShortName>
      <MenuCategory>Policies</MenuCategory>
      <Position>35</Position>
    </Report>
    <Report instance="pfis-20251231x10k.htm">
      <IsDefault>false</IsDefault>
      <HasEmbeddedReports>false</HasEmbeddedReports>
      <HtmlFileName>R36.htm</HtmlFileName>
      <LongName>99930103 - Disclosure - Summary of significant accounting policies (Tables)</LongName>
      <ReportType>Sheet</ReportType>
      <Role>http://www.peoplesfinancial.com/role/DisclosureSummaryOfSignificantAccountingPoliciesTables</Role>
      <ShortName>Summary of significant accounting policies (Tables)</ShortName>
      <MenuCategory>Tables</MenuCategory>
      <ParentRole>http://www.peoplesfinancial.com/role/DisclosureSummaryOfSignificantAccountingPolicies</ParentRole>
      <Position>36</Position>
    </Report>
    <Report instance="pfis-20251231x10k.htm">
      <IsDefault>false</IsDefault>
      <HasEmbeddedReports>false</HasEmbeddedReports>
      <HtmlFileName>R37.htm</HtmlFileName>
      <LongName>99930303 - Disclosure - Investment securities (Tables)</LongName>
      <ReportType>Sheet</ReportType>
      <Role>http://www.peoplesfinancial.com/role/DisclosureInvestmentSecuritiesTables</Role>
      <ShortName>Investment securities (Tables)</ShortName>
      <MenuCategory>Tables</MenuCategory>
      <ParentRole>http://www.peoplesfinancial.com/role/DisclosureInvestmentSecurities</ParentRole>
      <Position>37</Position>
    </Report>
    <Report instance="pfis-20251231x10k.htm">
      <IsDefault>false</IsDefault>
      <HasEmbeddedReports>false</HasEmbeddedReports>
      <HtmlFileName>R38.htm</HtmlFileName>
      <LongName>99930403 - Disclosure - Loans, net and allowance for credit losses (Tables)</LongName>
      <ReportType>Sheet</ReportType>
      <Role>http://www.peoplesfinancial.com/role/DisclosureLoansNetAndAllowanceForCreditLossesTables</Role>
      <ShortName>Loans, net and allowance for credit losses (Tables)</ShortName>
      <MenuCategory>Tables</MenuCategory>
      <ParentRole>http://www.peoplesfinancial.com/role/DisclosureLoansNetAndAllowanceForCreditLosses</ParentRole>
      <Position>38</Position>
    </Report>
    <Report instance="pfis-20251231x10k.htm">
      <IsDefault>false</IsDefault>
      <HasEmbeddedReports>false</HasEmbeddedReports>
      <HtmlFileName>R39.htm</HtmlFileName>
      <LongName>99930503 - Disclosure - Related party transactions (Tables)</LongName>
      <ReportType>Sheet</ReportType>
      <Role>http://www.peoplesfinancial.com/role/DisclosureRelatedPartyTransactionsTables</Role>
      <ShortName>Related party transactions (Tables)</ShortName>
      <MenuCategory>Tables</MenuCategory>
      <ParentRole>http://www.peoplesfinancial.com/role/DisclosureRelatedPartyTransactions</ParentRole>
      <Position>39</Position>
    </Report>
    <Report instance="pfis-20251231x10k.htm">
      <IsDefault>false</IsDefault>
      <HasEmbeddedReports>false</HasEmbeddedReports>
      <HtmlFileName>R40.htm</HtmlFileName>
      <LongName>99930603 - Disclosure - Off-balance sheet financial instruments (Tables)</LongName>
      <ReportType>Sheet</ReportType>
      <Role>http://www.peoplesfinancial.com/role/DisclosureOffBalanceSheetFinancialInstrumentsTables</Role>
      <ShortName>Off-balance sheet financial instruments (Tables)</ShortName>
      <MenuCategory>Tables</MenuCategory>
      <ParentRole>http://www.peoplesfinancial.com/role/DisclosureOffBalanceSheetFinancialInstruments</ParentRole>
      <Position>40</Position>
    </Report>
    <Report instance="pfis-20251231x10k.htm">
      <IsDefault>false</IsDefault>
      <HasEmbeddedReports>false</HasEmbeddedReports>
      <HtmlFileName>R41.htm</HtmlFileName>
      <LongName>99930703 - Disclosure - Premises and equipment, net (Tables)</LongName>
      <ReportType>Sheet</ReportType>
      <Role>http://www.peoplesfinancial.com/role/DisclosurePremisesAndEquipmentNetTables</Role>
      <ShortName>Premises and equipment, net (Tables)</ShortName>
      <MenuCategory>Tables</MenuCategory>
      <ParentRole>http://www.peoplesfinancial.com/role/DisclosurePremisesAndEquipmentNet</ParentRole>
      <Position>41</Position>
    </Report>
    <Report instance="pfis-20251231x10k.htm">
      <IsDefault>false</IsDefault>
      <HasEmbeddedReports>false</HasEmbeddedReports>
      <HtmlFileName>R42.htm</HtmlFileName>
      <LongName>99930803 - Disclosure - Operating lease commitments and contingencies (Tables)</LongName>
      <ReportType>Sheet</ReportType>
      <Role>http://www.peoplesfinancial.com/role/DisclosureOperatingLeaseCommitmentsAndContingenciesTables</Role>
      <ShortName>Operating lease commitments and contingencies (Tables)</ShortName>
      <MenuCategory>Tables</MenuCategory>
      <ParentRole>http://www.peoplesfinancial.com/role/DisclosureOperatingLeaseCommitmentsAndContingencies</ParentRole>
      <Position>42</Position>
    </Report>
    <Report instance="pfis-20251231x10k.htm">
      <IsDefault>false</IsDefault>
      <HasEmbeddedReports>false</HasEmbeddedReports>
      <HtmlFileName>R43.htm</HtmlFileName>
      <LongName>99930903 - Disclosure - Goodwill and other intangibles (Tables)</LongName>
      <ReportType>Sheet</ReportType>
      <Role>http://www.peoplesfinancial.com/role/DisclosureGoodwillAndOtherIntangiblesTables</Role>
      <ShortName>Goodwill and other intangibles (Tables)</ShortName>
      <MenuCategory>Tables</MenuCategory>
      <ParentRole>http://www.peoplesfinancial.com/role/DisclosureGoodwillAndOtherIntangibles</ParentRole>
      <Position>43</Position>
    </Report>
    <Report instance="pfis-20251231x10k.htm">
      <IsDefault>false</IsDefault>
      <HasEmbeddedReports>false</HasEmbeddedReports>
      <HtmlFileName>R44.htm</HtmlFileName>
      <LongName>99931003 - Disclosure - Other assets (Tables)</LongName>
      <ReportType>Sheet</ReportType>
      <Role>http://www.peoplesfinancial.com/role/DisclosureOtherAssetsTables</Role>
      <ShortName>Other assets (Tables)</ShortName>
      <MenuCategory>Tables</MenuCategory>
      <ParentRole>http://www.peoplesfinancial.com/role/DisclosureOtherAssets</ParentRole>
      <Position>44</Position>
    </Report>
    <Report instance="pfis-20251231x10k.htm">
      <IsDefault>false</IsDefault>
      <HasEmbeddedReports>false</HasEmbeddedReports>
      <HtmlFileName>R45.htm</HtmlFileName>
      <LongName>99931103 - Disclosure - Deposits (Tables)</LongName>
      <ReportType>Sheet</ReportType>
      <Role>http://www.peoplesfinancial.com/role/DisclosureDepositsTables</Role>
      <ShortName>Deposits (Tables)</ShortName>
      <MenuCategory>Tables</MenuCategory>
      <ParentRole>http://www.peoplesfinancial.com/role/DisclosureDeposits</ParentRole>
      <Position>45</Position>
    </Report>
    <Report instance="pfis-20251231x10k.htm">
      <IsDefault>false</IsDefault>
      <HasEmbeddedReports>false</HasEmbeddedReports>
      <HtmlFileName>R46.htm</HtmlFileName>
      <LongName>99931203 - Disclosure - Short-term borrowings (Tables)</LongName>
      <ReportType>Sheet</ReportType>
      <Role>http://www.peoplesfinancial.com/role/DisclosureShortTermBorrowingsTables</Role>
      <ShortName>Short-term borrowings (Tables)</ShortName>
      <MenuCategory>Tables</MenuCategory>
      <ParentRole>http://www.peoplesfinancial.com/role/DisclosureShortTermBorrowings</ParentRole>
      <Position>46</Position>
    </Report>
    <Report instance="pfis-20251231x10k.htm">
      <IsDefault>false</IsDefault>
      <HasEmbeddedReports>false</HasEmbeddedReports>
      <HtmlFileName>R47.htm</HtmlFileName>
      <LongName>99931303 - Disclosure - Long-term debt (Tables)</LongName>
      <ReportType>Sheet</ReportType>
      <Role>http://www.peoplesfinancial.com/role/DisclosureLongTermDebtTables</Role>
      <ShortName>Long-term debt (Tables)</ShortName>
      <MenuCategory>Tables</MenuCategory>
      <ParentRole>http://www.peoplesfinancial.com/role/DisclosureLongTermDebt</ParentRole>
      <Position>47</Position>
    </Report>
    <Report instance="pfis-20251231x10k.htm">
      <IsDefault>false</IsDefault>
      <HasEmbeddedReports>false</HasEmbeddedReports>
      <HtmlFileName>R48.htm</HtmlFileName>
      <LongName>99931503 - Disclosure - Fair value of financial instruments (Tables)</LongName>
      <ReportType>Sheet</ReportType>
      <Role>http://www.peoplesfinancial.com/role/DisclosureFairValueOfFinancialInstrumentsTables</Role>
      <ShortName>Fair value of financial instruments (Tables)</ShortName>
      <MenuCategory>Tables</MenuCategory>
      <ParentRole>http://www.peoplesfinancial.com/role/DisclosureFairValueOfFinancialInstruments</ParentRole>
      <Position>48</Position>
    </Report>
    <Report instance="pfis-20251231x10k.htm">
      <IsDefault>false</IsDefault>
      <HasEmbeddedReports>false</HasEmbeddedReports>
      <HtmlFileName>R49.htm</HtmlFileName>
      <LongName>99931603 - Disclosure - Derivatives and hedging activities (Tables)</LongName>
      <ReportType>Sheet</ReportType>
      <Role>http://www.peoplesfinancial.com/role/DisclosureDerivativesAndHedgingActivitiesTables</Role>
      <ShortName>Derivatives and hedging activities (Tables)</ShortName>
      <MenuCategory>Tables</MenuCategory>
      <ParentRole>http://www.peoplesfinancial.com/role/DisclosureDerivativesAndHedgingActivities</ParentRole>
      <Position>49</Position>
    </Report>
    <Report instance="pfis-20251231x10k.htm">
      <IsDefault>false</IsDefault>
      <HasEmbeddedReports>false</HasEmbeddedReports>
      <HtmlFileName>R50.htm</HtmlFileName>
      <LongName>99931703 - Disclosure - Stock plans (Tables)</LongName>
      <ReportType>Sheet</ReportType>
      <Role>http://www.peoplesfinancial.com/role/DisclosureStockPlansTables</Role>
      <ShortName>Stock plans (Tables)</ShortName>
      <MenuCategory>Tables</MenuCategory>
      <ParentRole>http://www.peoplesfinancial.com/role/DisclosureStockPlans</ParentRole>
      <Position>50</Position>
    </Report>
    <Report instance="pfis-20251231x10k.htm">
      <IsDefault>false</IsDefault>
      <HasEmbeddedReports>false</HasEmbeddedReports>
      <HtmlFileName>R51.htm</HtmlFileName>
      <LongName>99931803 - Disclosure - Employee benefit plans (Tables)</LongName>
      <ReportType>Sheet</ReportType>
      <Role>http://www.peoplesfinancial.com/role/DisclosureEmployeeBenefitPlansTables</Role>
      <ShortName>Employee benefit plans (Tables)</ShortName>
      <MenuCategory>Tables</MenuCategory>
      <ParentRole>http://www.peoplesfinancial.com/role/DisclosureEmployeeBenefitPlans</ParentRole>
      <Position>51</Position>
    </Report>
    <Report instance="pfis-20251231x10k.htm">
      <IsDefault>false</IsDefault>
      <HasEmbeddedReports>false</HasEmbeddedReports>
      <HtmlFileName>R52.htm</HtmlFileName>
      <LongName>99931903 - Disclosure - Income taxes (Tables)</LongName>
      <ReportType>Sheet</ReportType>
      <Role>http://www.peoplesfinancial.com/role/DisclosureIncomeTaxesTables</Role>
      <ShortName>Income taxes (Tables)</ShortName>
      <MenuCategory>Tables</MenuCategory>
      <ParentRole>http://www.peoplesfinancial.com/role/DisclosureIncomeTaxes</ParentRole>
      <Position>52</Position>
    </Report>
    <Report instance="pfis-20251231x10k.htm">
      <IsDefault>false</IsDefault>
      <HasEmbeddedReports>false</HasEmbeddedReports>
      <HtmlFileName>R53.htm</HtmlFileName>
      <LongName>99932103 - Disclosure - Parent Company financial statements (Tables)</LongName>
      <ReportType>Sheet</ReportType>
      <Role>http://www.peoplesfinancial.com/role/DisclosureParentCompanyFinancialStatementsTables</Role>
      <ShortName>Parent Company financial statements (Tables)</ShortName>
      <MenuCategory>Tables</MenuCategory>
      <ParentRole>http://www.peoplesfinancial.com/role/DisclosureParentCompanyFinancialStatements</ParentRole>
      <Position>53</Position>
    </Report>
    <Report instance="pfis-20251231x10k.htm">
      <IsDefault>false</IsDefault>
      <HasEmbeddedReports>false</HasEmbeddedReports>
      <HtmlFileName>R54.htm</HtmlFileName>
      <LongName>99932203 - Disclosure - Regulatory matters (Tables)</LongName>
      <ReportType>Sheet</ReportType>
      <Role>http://www.peoplesfinancial.com/role/DisclosureRegulatoryMattersTables</Role>
      <ShortName>Regulatory matters (Tables)</ShortName>
      <MenuCategory>Tables</MenuCategory>
      <ParentRole>http://www.peoplesfinancial.com/role/DisclosureRegulatoryMatters</ParentRole>
      <Position>54</Position>
    </Report>
    <Report instance="pfis-20251231x10k.htm">
      <IsDefault>false</IsDefault>
      <HasEmbeddedReports>false</HasEmbeddedReports>
      <HtmlFileName>R55.htm</HtmlFileName>
      <LongName>99932303 - Disclosure - Accumulated Other Comprehensive Loss (Tables)</LongName>
      <ReportType>Sheet</ReportType>
      <Role>http://www.peoplesfinancial.com/role/DisclosureAccumulatedOtherComprehensiveLossTables</Role>
      <ShortName>Accumulated Other Comprehensive Loss (Tables)</ShortName>
      <MenuCategory>Tables</MenuCategory>
      <ParentRole>http://www.peoplesfinancial.com/role/DisclosureAccumulatedOtherComprehensiveLoss</ParentRole>
      <Position>55</Position>
    </Report>
    <Report instance="pfis-20251231x10k.htm">
      <IsDefault>false</IsDefault>
      <HasEmbeddedReports>false</HasEmbeddedReports>
      <HtmlFileName>R56.htm</HtmlFileName>
      <LongName>99940101 - Disclosure - Summary of significant accounting policies - Nature of operations and Basis of presentation (Details)</LongName>
      <ReportType>Sheet</ReportType>
      <Role>http://www.peoplesfinancial.com/role/DisclosureSummaryOfSignificantAccountingPoliciesNatureOfOperationsAndBasisOfPresentationDetails</Role>
      <ShortName>Summary of significant accounting policies - Nature of operations and Basis of presentation (Details)</ShortName>
      <MenuCategory>Details</MenuCategory>
      <Position>56</Position>
    </Report>
    <Report instance="pfis-20251231x10k.htm">
      <IsDefault>false</IsDefault>
      <HasEmbeddedReports>false</HasEmbeddedReports>
      <HtmlFileName>R57.htm</HtmlFileName>
      <LongName>99940102 - Disclosure - Summary of significant accounting policies - Investment securities (Details)</LongName>
      <ReportType>Sheet</ReportType>
      <Role>http://www.peoplesfinancial.com/role/DisclosureSummaryOfSignificantAccountingPoliciesInvestmentSecuritiesDetails</Role>
      <ShortName>Summary of significant accounting policies - Investment securities (Details)</ShortName>
      <MenuCategory>Details</MenuCategory>
      <Position>57</Position>
    </Report>
    <Report instance="pfis-20251231x10k.htm">
      <IsDefault>false</IsDefault>
      <HasEmbeddedReports>false</HasEmbeddedReports>
      <HtmlFileName>R58.htm</HtmlFileName>
      <LongName>99940103 - Disclosure - Summary of significant accounting policies - Loans, net (Details)</LongName>
      <ReportType>Sheet</ReportType>
      <Role>http://www.peoplesfinancial.com/role/DisclosureSummaryOfSignificantAccountingPoliciesLoansNetDetails</Role>
      <ShortName>Summary of significant accounting policies - Loans, net (Details)</ShortName>
      <MenuCategory>Details</MenuCategory>
      <Position>58</Position>
    </Report>
    <Report instance="pfis-20251231x10k.htm">
      <IsDefault>false</IsDefault>
      <HasEmbeddedReports>false</HasEmbeddedReports>
      <HtmlFileName>R59.htm</HtmlFileName>
      <LongName>99940104 - Disclosure - Summary of significant accounting policies - Off-balance sheet financial instruments (Details)</LongName>
      <ReportType>Sheet</ReportType>
      <Role>http://www.peoplesfinancial.com/role/DisclosureSummaryOfSignificantAccountingPoliciesOffBalanceSheetFinancialInstrumentsDetails</Role>
      <ShortName>Summary of significant accounting policies - Off-balance sheet financial instruments (Details)</ShortName>
      <MenuCategory>Details</MenuCategory>
      <Position>59</Position>
    </Report>
    <Report instance="pfis-20251231x10k.htm">
      <IsDefault>false</IsDefault>
      <HasEmbeddedReports>false</HasEmbeddedReports>
      <HtmlFileName>R60.htm</HtmlFileName>
      <LongName>99940105 - Disclosure - Summary of significant accounting policies - Nonperforming assets (Details)</LongName>
      <ReportType>Sheet</ReportType>
      <Role>http://www.peoplesfinancial.com/role/DisclosureSummaryOfSignificantAccountingPoliciesNonperformingAssetsDetails</Role>
      <ShortName>Summary of significant accounting policies - Nonperforming assets (Details)</ShortName>
      <MenuCategory>Details</MenuCategory>
      <Position>60</Position>
    </Report>
    <Report instance="pfis-20251231x10k.htm">
      <IsDefault>false</IsDefault>
      <HasEmbeddedReports>false</HasEmbeddedReports>
      <HtmlFileName>R61.htm</HtmlFileName>
      <LongName>99940106 - Disclosure - Summary of significant accounting policies - Adoption of new accounting standard (Details)</LongName>
      <ReportType>Sheet</ReportType>
      <Role>http://www.peoplesfinancial.com/role/DisclosureSummaryOfSignificantAccountingPoliciesAdoptionOfNewAccountingStandardDetails</Role>
      <ShortName>Summary of significant accounting policies - Adoption of new accounting standard (Details)</ShortName>
      <MenuCategory>Details</MenuCategory>
      <Position>61</Position>
    </Report>
    <Report instance="pfis-20251231x10k.htm">
      <IsDefault>false</IsDefault>
      <HasEmbeddedReports>false</HasEmbeddedReports>
      <HtmlFileName>R62.htm</HtmlFileName>
      <LongName>99940107 - Disclosure - Summary of significant accounting policies - Premises, equipment and lease commitments (Details)</LongName>
      <ReportType>Sheet</ReportType>
      <Role>http://www.peoplesfinancial.com/role/DisclosureSummaryOfSignificantAccountingPoliciesPremisesEquipmentAndLeaseCommitmentsDetails</Role>
      <ShortName>Summary of significant accounting policies - Premises, equipment and lease commitments (Details)</ShortName>
      <MenuCategory>Details</MenuCategory>
      <Position>62</Position>
    </Report>
    <Report instance="pfis-20251231x10k.htm">
      <IsDefault>false</IsDefault>
      <HasEmbeddedReports>false</HasEmbeddedReports>
      <HtmlFileName>R63.htm</HtmlFileName>
      <LongName>99940108 - Disclosure - Summary of significant accounting policies - Goodwill and other intangible assets, net (Details)</LongName>
      <ReportType>Sheet</ReportType>
      <Role>http://www.peoplesfinancial.com/role/DisclosureSummaryOfSignificantAccountingPoliciesGoodwillAndOtherIntangibleAssetsNetDetails</Role>
      <ShortName>Summary of significant accounting policies - Goodwill and other intangible assets, net (Details)</ShortName>
      <MenuCategory>Details</MenuCategory>
      <Position>63</Position>
    </Report>
    <Report instance="pfis-20251231x10k.htm">
      <IsDefault>false</IsDefault>
      <HasEmbeddedReports>false</HasEmbeddedReports>
      <HtmlFileName>R64.htm</HtmlFileName>
      <LongName>99940109 - Disclosure - Summary of significant accounting policies - Income Taxes (Details)</LongName>
      <ReportType>Sheet</ReportType>
      <Role>http://www.peoplesfinancial.com/role/DisclosureSummaryOfSignificantAccountingPoliciesIncomeTaxesDetails</Role>
      <ShortName>Summary of significant accounting policies - Income Taxes (Details)</ShortName>
      <MenuCategory>Details</MenuCategory>
      <Position>64</Position>
    </Report>
    <Report instance="pfis-20251231x10k.htm">
      <IsDefault>false</IsDefault>
      <HasEmbeddedReports>false</HasEmbeddedReports>
      <HtmlFileName>R65.htm</HtmlFileName>
      <LongName>99940110 - Disclosure - Summary of significant accounting policies - Earnings per share (Details)</LongName>
      <ReportType>Sheet</ReportType>
      <Role>http://www.peoplesfinancial.com/role/DisclosureSummaryOfSignificantAccountingPoliciesEarningsPerShareDetails</Role>
      <ShortName>Summary of significant accounting policies - Earnings per share (Details)</ShortName>
      <MenuCategory>Details</MenuCategory>
      <Position>65</Position>
    </Report>
    <Report instance="pfis-20251231x10k.htm">
      <IsDefault>false</IsDefault>
      <HasEmbeddedReports>false</HasEmbeddedReports>
      <HtmlFileName>R66.htm</HtmlFileName>
      <LongName>99940201 - Disclosure - Business Combinations - Merger with FNCB Bancorp Inc. (Details)</LongName>
      <ReportType>Sheet</ReportType>
      <Role>http://www.peoplesfinancial.com/role/DisclosureBusinessCombinationsMergerWithFncbBancorpIncDetails</Role>
      <ShortName>Business Combinations - Merger with FNCB Bancorp Inc. (Details)</ShortName>
      <MenuCategory>Details</MenuCategory>
      <Position>66</Position>
    </Report>
    <Report instance="pfis-20251231x10k.htm">
      <IsDefault>false</IsDefault>
      <HasEmbeddedReports>false</HasEmbeddedReports>
      <HtmlFileName>R67.htm</HtmlFileName>
      <LongName>99940301 - Disclosure - Investment securities - Amortized Cost and Fair Value of Investment Securities Aggregated by Investment Category (Details)</LongName>
      <ReportType>Sheet</ReportType>
      <Role>http://www.peoplesfinancial.com/role/DisclosureInvestmentSecuritiesAmortizedCostAndFairValueOfInvestmentSecuritiesAggregatedByInvestmentCategoryDetails</Role>
      <ShortName>Investment securities - Amortized Cost and Fair Value of Investment Securities Aggregated by Investment Category (Details)</ShortName>
      <MenuCategory>Details</MenuCategory>
      <Position>67</Position>
    </Report>
    <Report instance="pfis-20251231x10k.htm">
      <IsDefault>false</IsDefault>
      <HasEmbeddedReports>false</HasEmbeddedReports>
      <HtmlFileName>R68.htm</HtmlFileName>
      <LongName>99940302 - Disclosure - Investment securities - Maturity Distribution of Debt Securities Classified as Available-for-Sale (Details)</LongName>
      <ReportType>Sheet</ReportType>
      <Role>http://www.peoplesfinancial.com/role/DisclosureInvestmentSecuritiesMaturityDistributionOfDebtSecuritiesClassifiedAsAvailableForSaleDetails</Role>
      <ShortName>Investment securities - Maturity Distribution of Debt Securities Classified as Available-for-Sale (Details)</ShortName>
      <MenuCategory>Details</MenuCategory>
      <Position>68</Position>
    </Report>
    <Report instance="pfis-20251231x10k.htm">
      <IsDefault>false</IsDefault>
      <HasEmbeddedReports>false</HasEmbeddedReports>
      <HtmlFileName>R69.htm</HtmlFileName>
      <LongName>99940303 - Disclosure - Investment securities - Summary of Amortized Cost and Fair Value of Securities by Contractual Maturity (Details)</LongName>
      <ReportType>Sheet</ReportType>
      <Role>http://www.peoplesfinancial.com/role/DisclosureInvestmentSecuritiesSummaryOfAmortizedCostAndFairValueOfSecuritiesByContractualMaturityDetails</Role>
      <ShortName>Investment securities - Summary of Amortized Cost and Fair Value of Securities by Contractual Maturity (Details)</ShortName>
      <MenuCategory>Details</MenuCategory>
      <Position>69</Position>
    </Report>
    <Report instance="pfis-20251231x10k.htm">
      <IsDefault>false</IsDefault>
      <HasEmbeddedReports>false</HasEmbeddedReports>
      <HtmlFileName>R70.htm</HtmlFileName>
      <LongName>99940304 - Disclosure - Investment securities - Pledged Securities (Details)</LongName>
      <ReportType>Sheet</ReportType>
      <Role>http://www.peoplesfinancial.com/role/DisclosureInvestmentSecuritiesPledgedSecuritiesDetails</Role>
      <ShortName>Investment securities - Pledged Securities (Details)</ShortName>
      <MenuCategory>Details</MenuCategory>
      <Position>70</Position>
    </Report>
    <Report instance="pfis-20251231x10k.htm">
      <IsDefault>false</IsDefault>
      <HasEmbeddedReports>false</HasEmbeddedReports>
      <HtmlFileName>R71.htm</HtmlFileName>
      <LongName>99940305 - Disclosure - Investment securities - Fair Value and Unrealized Losses of Investment Securities in Continuous Unrealized Loss Position (Details)</LongName>
      <ReportType>Sheet</ReportType>
      <Role>http://www.peoplesfinancial.com/role/DisclosureInvestmentSecuritiesFairValueAndUnrealizedLossesOfInvestmentSecuritiesInContinuousUnrealizedLossPositionDetails</Role>
      <ShortName>Investment securities - Fair Value and Unrealized Losses of Investment Securities in Continuous Unrealized Loss Position (Details)</ShortName>
      <MenuCategory>Details</MenuCategory>
      <Position>71</Position>
    </Report>
    <Report instance="pfis-20251231x10k.htm">
      <IsDefault>false</IsDefault>
      <HasEmbeddedReports>false</HasEmbeddedReports>
      <HtmlFileName>R72.htm</HtmlFileName>
      <LongName>99940306 - Disclosure - Investment securities - Unrealized and realized gains and losses (Details)</LongName>
      <ReportType>Sheet</ReportType>
      <Role>http://www.peoplesfinancial.com/role/DisclosureInvestmentSecuritiesUnrealizedAndRealizedGainsAndLossesDetails</Role>
      <ShortName>Investment securities - Unrealized and realized gains and losses (Details)</ShortName>
      <MenuCategory>Details</MenuCategory>
      <Position>72</Position>
    </Report>
    <Report instance="pfis-20251231x10k.htm">
      <IsDefault>false</IsDefault>
      <HasEmbeddedReports>false</HasEmbeddedReports>
      <HtmlFileName>R73.htm</HtmlFileName>
      <LongName>99940307 - Disclosure - Investment securities (Details)</LongName>
      <ReportType>Sheet</ReportType>
      <Role>http://www.peoplesfinancial.com/role/DisclosureInvestmentSecuritiesDetails</Role>
      <ShortName>Investment securities (Details)</ShortName>
      <MenuCategory>Details</MenuCategory>
      <ParentRole>http://www.peoplesfinancial.com/role/DisclosureInvestmentSecuritiesTables</ParentRole>
      <Position>73</Position>
    </Report>
    <Report instance="pfis-20251231x10k.htm">
      <IsDefault>false</IsDefault>
      <HasEmbeddedReports>false</HasEmbeddedReports>
      <HtmlFileName>R74.htm</HtmlFileName>
      <LongName>99940401 - Disclosure - Loans, net and allowance for credit losses - Net Deferred Loan Costs (Details)</LongName>
      <ReportType>Sheet</ReportType>
      <Role>http://www.peoplesfinancial.com/role/DisclosureLoansNetAndAllowanceForCreditLossesNetDeferredLoanCostsDetails</Role>
      <ShortName>Loans, net and allowance for credit losses - Net Deferred Loan Costs (Details)</ShortName>
      <MenuCategory>Details</MenuCategory>
      <Position>74</Position>
    </Report>
    <Report instance="pfis-20251231x10k.htm">
      <IsDefault>false</IsDefault>
      <HasEmbeddedReports>false</HasEmbeddedReports>
      <HtmlFileName>R75.htm</HtmlFileName>
      <LongName>99940402 - Disclosure - Loans, net and allowance for credit losses - Major Classifications of Loans Outstanding (Details)</LongName>
      <ReportType>Sheet</ReportType>
      <Role>http://www.peoplesfinancial.com/role/DisclosureLoansNetAndAllowanceForCreditLossesMajorClassificationsOfLoansOutstandingDetails</Role>
      <ShortName>Loans, net and allowance for credit losses - Major Classifications of Loans Outstanding (Details)</ShortName>
      <MenuCategory>Details</MenuCategory>
      <Position>75</Position>
    </Report>
    <Report instance="pfis-20251231x10k.htm">
      <IsDefault>false</IsDefault>
      <HasEmbeddedReports>false</HasEmbeddedReports>
      <HtmlFileName>R76.htm</HtmlFileName>
      <LongName>99940403 - Disclosure - Loans, net and allowance for credit losses- Major Classification of Loans by Past Due Status (Details)</LongName>
      <ReportType>Sheet</ReportType>
      <Role>http://www.peoplesfinancial.com/role/DisclosureLoansNetAndAllowanceForCreditLossesMajorClassificationOfLoansByPastDueStatusDetails</Role>
      <ShortName>Loans, net and allowance for credit losses- Major Classification of Loans by Past Due Status (Details)</ShortName>
      <MenuCategory>Details</MenuCategory>
      <Position>76</Position>
    </Report>
    <Report instance="pfis-20251231x10k.htm">
      <IsDefault>false</IsDefault>
      <HasEmbeddedReports>false</HasEmbeddedReports>
      <HtmlFileName>R77.htm</HtmlFileName>
      <LongName>99940404 - Disclosure - Loans, net and allowance for credit losses - Nonaccrual Loans (Details)</LongName>
      <ReportType>Sheet</ReportType>
      <Role>http://www.peoplesfinancial.com/role/DisclosureLoansNetAndAllowanceForCreditLossesNonaccrualLoansDetails</Role>
      <ShortName>Loans, net and allowance for credit losses - Nonaccrual Loans (Details)</ShortName>
      <MenuCategory>Details</MenuCategory>
      <Position>77</Position>
    </Report>
    <Report instance="pfis-20251231x10k.htm">
      <IsDefault>false</IsDefault>
      <HasEmbeddedReports>false</HasEmbeddedReports>
      <HtmlFileName>R78.htm</HtmlFileName>
      <LongName>99940405 - Disclosure - Loans, net and allowance for credit losses - Major Classification of Loans Portfolio Summarized by Credit Quality (Details)</LongName>
      <ReportType>Sheet</ReportType>
      <Role>http://www.peoplesfinancial.com/role/DisclosureLoansNetAndAllowanceForCreditLossesMajorClassificationOfLoansPortfolioSummarizedByCreditQualityDetails</Role>
      <ShortName>Loans, net and allowance for credit losses - Major Classification of Loans Portfolio Summarized by Credit Quality (Details)</ShortName>
      <MenuCategory>Details</MenuCategory>
      <Position>78</Position>
    </Report>
    <Report instance="pfis-20251231x10k.htm">
      <IsDefault>false</IsDefault>
      <HasEmbeddedReports>false</HasEmbeddedReports>
      <HtmlFileName>R79.htm</HtmlFileName>
      <LongName>99940406 - Disclosure - Loans, net and allowance for credit losses -Modifications to Borrowers Experiencing Financial Difficulty (Details)</LongName>
      <ReportType>Sheet</ReportType>
      <Role>http://www.peoplesfinancial.com/role/DisclosureLoansNetAndAllowanceForCreditLossesModificationsToBorrowersExperiencingFinancialDifficultyDetails</Role>
      <ShortName>Loans, net and allowance for credit losses -Modifications to Borrowers Experiencing Financial Difficulty (Details)</ShortName>
      <MenuCategory>Details</MenuCategory>
      <Position>79</Position>
    </Report>
    <Report instance="pfis-20251231x10k.htm">
      <IsDefault>false</IsDefault>
      <HasEmbeddedReports>false</HasEmbeddedReports>
      <HtmlFileName>R80.htm</HtmlFileName>
      <LongName>99940407 - Disclosure - Loans, net and allowance for credit losses - Amortized cost and performance status of nonaccrual modified loans (Details)</LongName>
      <ReportType>Sheet</ReportType>
      <Role>http://www.peoplesfinancial.com/role/DisclosureLoansNetAndAllowanceForCreditLossesAmortizedCostAndPerformanceStatusOfNonaccrualModifiedLoansDetails</Role>
      <ShortName>Loans, net and allowance for credit losses - Amortized cost and performance status of nonaccrual modified loans (Details)</ShortName>
      <MenuCategory>Details</MenuCategory>
      <Position>80</Position>
    </Report>
    <Report instance="pfis-20251231x10k.htm">
      <IsDefault>false</IsDefault>
      <HasEmbeddedReports>false</HasEmbeddedReports>
      <HtmlFileName>R81.htm</HtmlFileName>
      <LongName>99940408 - Disclosure - Loans, net and allowance for credit losses - Allocation of Allowance for Loan Losses and Related Loans by Major Classification of Loans (Details)</LongName>
      <ReportType>Sheet</ReportType>
      <Role>http://www.peoplesfinancial.com/role/DisclosureLoansNetAndAllowanceForCreditLossesAllocationOfAllowanceForLoanLossesAndRelatedLoansByMajorClassificationOfLoansDetails</Role>
      <ShortName>Loans, net and allowance for credit losses - Allocation of Allowance for Loan Losses and Related Loans by Major Classification of Loans (Details)</ShortName>
      <MenuCategory>Details</MenuCategory>
      <Position>81</Position>
    </Report>
    <Report instance="pfis-20251231x10k.htm">
      <IsDefault>false</IsDefault>
      <HasEmbeddedReports>false</HasEmbeddedReports>
      <HtmlFileName>R82.htm</HtmlFileName>
      <LongName>99940409 - Disclosure - Loans, net and allowance for credit losses - Allowance for Credit Losses on Off Balance Sheet Commitments (Details)</LongName>
      <ReportType>Sheet</ReportType>
      <Role>http://www.peoplesfinancial.com/role/DisclosureLoansNetAndAllowanceForCreditLossesAllowanceForCreditLossesOnOffBalanceSheetCommitmentsDetails</Role>
      <ShortName>Loans, net and allowance for credit losses - Allowance for Credit Losses on Off Balance Sheet Commitments (Details)</ShortName>
      <MenuCategory>Details</MenuCategory>
      <Position>82</Position>
    </Report>
    <Report instance="pfis-20251231x10k.htm">
      <IsDefault>false</IsDefault>
      <HasEmbeddedReports>false</HasEmbeddedReports>
      <HtmlFileName>R83.htm</HtmlFileName>
      <LongName>99940501 - Disclosure - Related party transactions - Outstanding loans (Details)</LongName>
      <ReportType>Sheet</ReportType>
      <Role>http://www.peoplesfinancial.com/role/DisclosureRelatedPartyTransactionsOutstandingLoansDetails</Role>
      <ShortName>Related party transactions - Outstanding loans (Details)</ShortName>
      <MenuCategory>Details</MenuCategory>
      <Position>83</Position>
    </Report>
    <Report instance="pfis-20251231x10k.htm">
      <IsDefault>false</IsDefault>
      <HasEmbeddedReports>false</HasEmbeddedReports>
      <HtmlFileName>R84.htm</HtmlFileName>
      <LongName>99940502 - Disclosure - Related party transactions (Details)</LongName>
      <ReportType>Sheet</ReportType>
      <Role>http://www.peoplesfinancial.com/role/DisclosureRelatedPartyTransactionsDetails</Role>
      <ShortName>Related party transactions (Details)</ShortName>
      <MenuCategory>Details</MenuCategory>
      <ParentRole>http://www.peoplesfinancial.com/role/DisclosureRelatedPartyTransactionsTables</ParentRole>
      <Position>84</Position>
    </Report>
    <Report instance="pfis-20251231x10k.htm">
      <IsDefault>false</IsDefault>
      <HasEmbeddedReports>false</HasEmbeddedReports>
      <HtmlFileName>R85.htm</HtmlFileName>
      <LongName>99940601 - Disclosure - Off-balance sheet financial instruments - Summary of Contractual Amounts of Off-balance Sheet Commitments (Details)</LongName>
      <ReportType>Sheet</ReportType>
      <Role>http://www.peoplesfinancial.com/role/DisclosureOffBalanceSheetFinancialInstrumentsSummaryOfContractualAmountsOfOffBalanceSheetCommitmentsDetails</Role>
      <ShortName>Off-balance sheet financial instruments - Summary of Contractual Amounts of Off-balance Sheet Commitments (Details)</ShortName>
      <MenuCategory>Details</MenuCategory>
      <Position>85</Position>
    </Report>
    <Report instance="pfis-20251231x10k.htm">
      <IsDefault>false</IsDefault>
      <HasEmbeddedReports>false</HasEmbeddedReports>
      <HtmlFileName>R86.htm</HtmlFileName>
      <LongName>99940602 - Disclosure - Off-balance sheet financial instruments - Additional Information (Details)</LongName>
      <ReportType>Sheet</ReportType>
      <Role>http://www.peoplesfinancial.com/role/DisclosureOffBalanceSheetFinancialInstrumentsAdditionalInformationDetails</Role>
      <ShortName>Off-balance sheet financial instruments - Additional Information (Details)</ShortName>
      <MenuCategory>Details</MenuCategory>
      <Position>86</Position>
    </Report>
    <Report instance="pfis-20251231x10k.htm">
      <IsDefault>false</IsDefault>
      <HasEmbeddedReports>false</HasEmbeddedReports>
      <HtmlFileName>R87.htm</HtmlFileName>
      <LongName>99940701 - Disclosure - Premises and equipment, net - Summary of Premises and Equipment (Details)</LongName>
      <ReportType>Sheet</ReportType>
      <Role>http://www.peoplesfinancial.com/role/DisclosurePremisesAndEquipmentNetSummaryOfPremisesAndEquipmentDetails</Role>
      <ShortName>Premises and equipment, net - Summary of Premises and Equipment (Details)</ShortName>
      <MenuCategory>Details</MenuCategory>
      <Position>87</Position>
    </Report>
    <Report instance="pfis-20251231x10k.htm">
      <IsDefault>false</IsDefault>
      <HasEmbeddedReports>false</HasEmbeddedReports>
      <HtmlFileName>R88.htm</HtmlFileName>
      <LongName>99940702 - Disclosure - Premises and equipment, net (Details)</LongName>
      <ReportType>Sheet</ReportType>
      <Role>http://www.peoplesfinancial.com/role/DisclosurePremisesAndEquipmentNetDetails</Role>
      <ShortName>Premises and equipment, net (Details)</ShortName>
      <MenuCategory>Details</MenuCategory>
      <ParentRole>http://www.peoplesfinancial.com/role/DisclosurePremisesAndEquipmentNetTables</ParentRole>
      <Position>88</Position>
    </Report>
    <Report instance="pfis-20251231x10k.htm">
      <IsDefault>false</IsDefault>
      <HasEmbeddedReports>false</HasEmbeddedReports>
      <HtmlFileName>R89.htm</HtmlFileName>
      <LongName>99940801 - Disclosure - Operating lease commitments and contingencies (Details)</LongName>
      <ReportType>Sheet</ReportType>
      <Role>http://www.peoplesfinancial.com/role/DisclosureOperatingLeaseCommitmentsAndContingenciesDetails</Role>
      <ShortName>Operating lease commitments and contingencies (Details)</ShortName>
      <MenuCategory>Details</MenuCategory>
      <ParentRole>http://www.peoplesfinancial.com/role/DisclosureOperatingLeaseCommitmentsAndContingenciesTables</ParentRole>
      <Position>89</Position>
    </Report>
    <Report instance="pfis-20251231x10k.htm">
      <IsDefault>false</IsDefault>
      <HasEmbeddedReports>false</HasEmbeddedReports>
      <HtmlFileName>R90.htm</HtmlFileName>
      <LongName>99940802 - Disclosure - Operating lease commitments and contingencies - Summary of Future Minimum Rental Commitments Under Operating Leases (Details)</LongName>
      <ReportType>Sheet</ReportType>
      <Role>http://www.peoplesfinancial.com/role/DisclosureOperatingLeaseCommitmentsAndContingenciesSummaryOfFutureMinimumRentalCommitmentsUnderOperatingLeasesDetails</Role>
      <ShortName>Operating lease commitments and contingencies - Summary of Future Minimum Rental Commitments Under Operating Leases (Details)</ShortName>
      <MenuCategory>Details</MenuCategory>
      <Position>90</Position>
    </Report>
    <Report instance="pfis-20251231x10k.htm">
      <IsDefault>false</IsDefault>
      <HasEmbeddedReports>false</HasEmbeddedReports>
      <HtmlFileName>R91.htm</HtmlFileName>
      <LongName>99940901 - Disclosure - Goodwill and other intangibles (Details)</LongName>
      <ReportType>Sheet</ReportType>
      <Role>http://www.peoplesfinancial.com/role/DisclosureGoodwillAndOtherIntangiblesDetails</Role>
      <ShortName>Goodwill and other intangibles (Details)</ShortName>
      <MenuCategory>Details</MenuCategory>
      <ParentRole>http://www.peoplesfinancial.com/role/DisclosureGoodwillAndOtherIntangiblesTables</ParentRole>
      <Position>91</Position>
    </Report>
    <Report instance="pfis-20251231x10k.htm">
      <IsDefault>false</IsDefault>
      <HasEmbeddedReports>false</HasEmbeddedReports>
      <HtmlFileName>R92.htm</HtmlFileName>
      <LongName>99940902 - Disclosure - Goodwill and other intangibles - Additional Information (Details)</LongName>
      <ReportType>Sheet</ReportType>
      <Role>http://www.peoplesfinancial.com/role/DisclosureGoodwillAndOtherIntangiblesAdditionalInformationDetails</Role>
      <ShortName>Goodwill and other intangibles - Additional Information (Details)</ShortName>
      <MenuCategory>Details</MenuCategory>
      <Position>92</Position>
    </Report>
    <Report instance="pfis-20251231x10k.htm">
      <IsDefault>false</IsDefault>
      <HasEmbeddedReports>false</HasEmbeddedReports>
      <HtmlFileName>R93.htm</HtmlFileName>
      <LongName>99940903 - Disclosure - Goodwill and other intangibles - Summary of Estimated Amortization Expense on Intangible Assets (Details)</LongName>
      <ReportType>Sheet</ReportType>
      <Role>http://www.peoplesfinancial.com/role/DisclosureGoodwillAndOtherIntangiblesSummaryOfEstimatedAmortizationExpenseOnIntangibleAssetsDetails</Role>
      <ShortName>Goodwill and other intangibles - Summary of Estimated Amortization Expense on Intangible Assets (Details)</ShortName>
      <MenuCategory>Details</MenuCategory>
      <Position>93</Position>
    </Report>
    <Report instance="pfis-20251231x10k.htm">
      <IsDefault>false</IsDefault>
      <HasEmbeddedReports>false</HasEmbeddedReports>
      <HtmlFileName>R94.htm</HtmlFileName>
      <LongName>99941001 - Disclosure - Other assets - Components of Other Assets (Details)</LongName>
      <ReportType>Sheet</ReportType>
      <Role>http://www.peoplesfinancial.com/role/DisclosureOtherAssetsComponentsOfOtherAssetsDetails</Role>
      <ShortName>Other assets - Components of Other Assets (Details)</ShortName>
      <MenuCategory>Details</MenuCategory>
      <Position>94</Position>
    </Report>
    <Report instance="pfis-20251231x10k.htm">
      <IsDefault>false</IsDefault>
      <HasEmbeddedReports>false</HasEmbeddedReports>
      <HtmlFileName>R95.htm</HtmlFileName>
      <LongName>99941002 - Disclosure - Other assets - Unpaid Principal Balances (Details)</LongName>
      <ReportType>Sheet</ReportType>
      <Role>http://www.peoplesfinancial.com/role/DisclosureOtherAssetsUnpaidPrincipalBalancesDetails</Role>
      <ShortName>Other assets - Unpaid Principal Balances (Details)</ShortName>
      <MenuCategory>Details</MenuCategory>
      <Position>95</Position>
    </Report>
    <Report instance="pfis-20251231x10k.htm">
      <IsDefault>false</IsDefault>
      <HasEmbeddedReports>false</HasEmbeddedReports>
      <HtmlFileName>R96.htm</HtmlFileName>
      <LongName>99941101 - Disclosure - Deposits - Components of Interest-bearing and Noninterest-bearing Deposits (Details)</LongName>
      <ReportType>Sheet</ReportType>
      <Role>http://www.peoplesfinancial.com/role/DisclosureDepositsComponentsOfInterestBearingAndNoninterestBearingDepositsDetails</Role>
      <ShortName>Deposits - Components of Interest-bearing and Noninterest-bearing Deposits (Details)</ShortName>
      <MenuCategory>Details</MenuCategory>
      <Position>96</Position>
    </Report>
    <Report instance="pfis-20251231x10k.htm">
      <IsDefault>false</IsDefault>
      <HasEmbeddedReports>false</HasEmbeddedReports>
      <HtmlFileName>R97.htm</HtmlFileName>
      <LongName>99941102 - Disclosure - Deposits - Schedule of Maturities of Time Deposits (Details)</LongName>
      <ReportType>Sheet</ReportType>
      <Role>http://www.peoplesfinancial.com/role/DisclosureDepositsScheduleOfMaturitiesOfTimeDepositsDetails</Role>
      <ShortName>Deposits - Schedule of Maturities of Time Deposits (Details)</ShortName>
      <MenuCategory>Details</MenuCategory>
      <Position>97</Position>
    </Report>
    <Report instance="pfis-20251231x10k.htm">
      <IsDefault>false</IsDefault>
      <HasEmbeddedReports>false</HasEmbeddedReports>
      <HtmlFileName>R98.htm</HtmlFileName>
      <LongName>99941103 - Disclosure - Deposits (Details)</LongName>
      <ReportType>Sheet</ReportType>
      <Role>http://www.peoplesfinancial.com/role/DisclosureDepositsDetails</Role>
      <ShortName>Deposits (Details)</ShortName>
      <MenuCategory>Details</MenuCategory>
      <ParentRole>http://www.peoplesfinancial.com/role/DisclosureDepositsTables</ParentRole>
      <Position>98</Position>
    </Report>
    <Report instance="pfis-20251231x10k.htm">
      <IsDefault>false</IsDefault>
      <HasEmbeddedReports>false</HasEmbeddedReports>
      <HtmlFileName>R99.htm</HtmlFileName>
      <LongName>99941201 - Disclosure - Short-term borrowings (Details)</LongName>
      <ReportType>Sheet</ReportType>
      <Role>http://www.peoplesfinancial.com/role/DisclosureShortTermBorrowingsDetails</Role>
      <ShortName>Short-term borrowings (Details)</ShortName>
      <MenuCategory>Details</MenuCategory>
      <ParentRole>http://www.peoplesfinancial.com/role/DisclosureShortTermBorrowingsTables</ParentRole>
      <Position>99</Position>
    </Report>
    <Report instance="pfis-20251231x10k.htm">
      <IsDefault>false</IsDefault>
      <HasEmbeddedReports>false</HasEmbeddedReports>
      <HtmlFileName>R100.htm</HtmlFileName>
      <LongName>99941202 - Disclosure - Short-term borrowings - Additional Information (Details)</LongName>
      <ReportType>Sheet</ReportType>
      <Role>http://www.peoplesfinancial.com/role/DisclosureShortTermBorrowingsAdditionalInformationDetails</Role>
      <ShortName>Short-term borrowings - Additional Information (Details)</ShortName>
      <MenuCategory>Details</MenuCategory>
      <Position>100</Position>
    </Report>
    <Report instance="pfis-20251231x10k.htm">
      <IsDefault>false</IsDefault>
      <HasEmbeddedReports>false</HasEmbeddedReports>
      <HtmlFileName>R101.htm</HtmlFileName>
      <LongName>99941301 - Disclosure - Long-term debt - Long-term debt advances (Details)</LongName>
      <ReportType>Sheet</ReportType>
      <Role>http://www.peoplesfinancial.com/role/DisclosureLongTermDebtLongTermDebtAdvancesDetails</Role>
      <ShortName>Long-term debt - Long-term debt advances (Details)</ShortName>
      <MenuCategory>Details</MenuCategory>
      <Position>101</Position>
    </Report>
    <Report instance="pfis-20251231x10k.htm">
      <IsDefault>false</IsDefault>
      <HasEmbeddedReports>false</HasEmbeddedReports>
      <HtmlFileName>R102.htm</HtmlFileName>
      <LongName>99941302 - Disclosure - Long-term debt - Maturities of long-term debt (Details)</LongName>
      <ReportType>Sheet</ReportType>
      <Role>http://www.peoplesfinancial.com/role/DisclosureLongTermDebtMaturitiesOfLongTermDebtDetails</Role>
      <ShortName>Long-term debt - Maturities of long-term debt (Details)</ShortName>
      <MenuCategory>Details</MenuCategory>
      <Position>102</Position>
    </Report>
    <Report instance="pfis-20251231x10k.htm">
      <IsDefault>false</IsDefault>
      <HasEmbeddedReports>false</HasEmbeddedReports>
      <HtmlFileName>R103.htm</HtmlFileName>
      <LongName>99941401 - Disclosure - Subordinated debt (Details)</LongName>
      <ReportType>Sheet</ReportType>
      <Role>http://www.peoplesfinancial.com/role/DisclosureSubordinatedDebtDetails</Role>
      <ShortName>Subordinated debt (Details)</ShortName>
      <MenuCategory>Details</MenuCategory>
      <ParentRole>http://www.peoplesfinancial.com/role/DisclosureSubordinatedDebt</ParentRole>
      <Position>103</Position>
    </Report>
    <Report instance="pfis-20251231x10k.htm">
      <IsDefault>false</IsDefault>
      <HasEmbeddedReports>false</HasEmbeddedReports>
      <HtmlFileName>R104.htm</HtmlFileName>
      <LongName>99941501 - Disclosure - Fair value of financial instruments (Details)</LongName>
      <ReportType>Sheet</ReportType>
      <Role>http://www.peoplesfinancial.com/role/DisclosureFairValueOfFinancialInstrumentsDetails</Role>
      <ShortName>Fair value of financial instruments (Details)</ShortName>
      <MenuCategory>Details</MenuCategory>
      <ParentRole>http://www.peoplesfinancial.com/role/DisclosureFairValueOfFinancialInstrumentsTables</ParentRole>
      <Position>104</Position>
    </Report>
    <Report instance="pfis-20251231x10k.htm">
      <IsDefault>false</IsDefault>
      <HasEmbeddedReports>false</HasEmbeddedReports>
      <HtmlFileName>R105.htm</HtmlFileName>
      <LongName>99941502 - Disclosure - Fair value of financial instruments - Schedule of Assets and Liabilities Measured at Fair Value on Recurring Basis (Details)</LongName>
      <ReportType>Sheet</ReportType>
      <Role>http://www.peoplesfinancial.com/role/DisclosureFairValueOfFinancialInstrumentsScheduleOfAssetsAndLiabilitiesMeasuredAtFairValueOnRecurringBasisDetails</Role>
      <ShortName>Fair value of financial instruments - Schedule of Assets and Liabilities Measured at Fair Value on Recurring Basis (Details)</ShortName>
      <MenuCategory>Details</MenuCategory>
      <Position>105</Position>
    </Report>
    <Report instance="pfis-20251231x10k.htm">
      <IsDefault>false</IsDefault>
      <HasEmbeddedReports>false</HasEmbeddedReports>
      <HtmlFileName>R106.htm</HtmlFileName>
      <LongName>99941503 - Disclosure - Fair value of financial instruments - Schedule of Assets and Liabilities Measured at Fair Value on Nonrecurring Basis (Details)</LongName>
      <ReportType>Sheet</ReportType>
      <Role>http://www.peoplesfinancial.com/role/DisclosureFairValueOfFinancialInstrumentsScheduleOfAssetsAndLiabilitiesMeasuredAtFairValueOnNonrecurringBasisDetails</Role>
      <ShortName>Fair value of financial instruments - Schedule of Assets and Liabilities Measured at Fair Value on Nonrecurring Basis (Details)</ShortName>
      <MenuCategory>Details</MenuCategory>
      <Position>106</Position>
    </Report>
    <Report instance="pfis-20251231x10k.htm">
      <IsDefault>false</IsDefault>
      <HasEmbeddedReports>false</HasEmbeddedReports>
      <HtmlFileName>R107.htm</HtmlFileName>
      <LongName>99941504 - Disclosure - Fair value of financial instruments - Additional Quantitative Information about Assets Measured at Fair Value on Nonrecurring Basis (Details)</LongName>
      <ReportType>Sheet</ReportType>
      <Role>http://www.peoplesfinancial.com/role/DisclosureFairValueOfFinancialInstrumentsAdditionalQuantitativeInformationAboutAssetsMeasuredAtFairValueOnNonrecurringBasisDetails</Role>
      <ShortName>Fair value of financial instruments - Additional Quantitative Information about Assets Measured at Fair Value on Nonrecurring Basis (Details)</ShortName>
      <MenuCategory>Details</MenuCategory>
      <Position>107</Position>
    </Report>
    <Report instance="pfis-20251231x10k.htm">
      <IsDefault>false</IsDefault>
      <HasEmbeddedReports>false</HasEmbeddedReports>
      <HtmlFileName>R108.htm</HtmlFileName>
      <LongName>99941505 - Disclosure - Fair value of financial instruments - Carrying and Fair Values of Financial Instruments (Details)</LongName>
      <ReportType>Sheet</ReportType>
      <Role>http://www.peoplesfinancial.com/role/DisclosureFairValueOfFinancialInstrumentsCarryingAndFairValuesOfFinancialInstrumentsDetails</Role>
      <ShortName>Fair value of financial instruments - Carrying and Fair Values of Financial Instruments (Details)</ShortName>
      <MenuCategory>Details</MenuCategory>
      <Position>108</Position>
    </Report>
    <Report instance="pfis-20251231x10k.htm">
      <IsDefault>false</IsDefault>
      <HasEmbeddedReports>false</HasEmbeddedReports>
      <HtmlFileName>R109.htm</HtmlFileName>
      <LongName>99941601 - Disclosure - Derivatives and hedging activities - Cumulative Basis Adjustment for Fair Value Hedges (Details)</LongName>
      <ReportType>Sheet</ReportType>
      <Role>http://www.peoplesfinancial.com/role/DisclosureDerivativesAndHedgingActivitiesCumulativeBasisAdjustmentForFairValueHedgesDetails</Role>
      <ShortName>Derivatives and hedging activities - Cumulative Basis Adjustment for Fair Value Hedges (Details)</ShortName>
      <MenuCategory>Details</MenuCategory>
      <Position>109</Position>
    </Report>
    <Report instance="pfis-20251231x10k.htm">
      <IsDefault>false</IsDefault>
      <HasEmbeddedReports>false</HasEmbeddedReports>
      <HtmlFileName>R110.htm</HtmlFileName>
      <LongName>99941602 - Disclosure - Derivatives and hedging activities - Fair Values of Derivative Instruments (Details)</LongName>
      <ReportType>Sheet</ReportType>
      <Role>http://www.peoplesfinancial.com/role/DisclosureDerivativesAndHedgingActivitiesFairValuesOfDerivativeInstrumentsDetails</Role>
      <ShortName>Derivatives and hedging activities - Fair Values of Derivative Instruments (Details)</ShortName>
      <MenuCategory>Details</MenuCategory>
      <Position>110</Position>
    </Report>
    <Report instance="pfis-20251231x10k.htm">
      <IsDefault>false</IsDefault>
      <HasEmbeddedReports>false</HasEmbeddedReports>
      <HtmlFileName>R111.htm</HtmlFileName>
      <LongName>99941603 - Disclosure - Derivatives and hedging activities - Effect of Fair Value and Cash Flow Hedge Accounting on the Consolidated Statements of Income and Comprehensive Income (Details)</LongName>
      <ReportType>Sheet</ReportType>
      <Role>http://www.peoplesfinancial.com/role/DisclosureDerivativesAndHedgingActivitiesEffectOfFairValueAndCashFlowHedgeAccountingOnConsolidatedStatementsOfIncomeAndComprehensiveIncomeDetails</Role>
      <ShortName>Derivatives and hedging activities - Effect of Fair Value and Cash Flow Hedge Accounting on the Consolidated Statements of Income and Comprehensive Income (Details)</ShortName>
      <MenuCategory>Details</MenuCategory>
      <Position>111</Position>
    </Report>
    <Report instance="pfis-20251231x10k.htm">
      <IsDefault>false</IsDefault>
      <HasEmbeddedReports>false</HasEmbeddedReports>
      <HtmlFileName>R112.htm</HtmlFileName>
      <LongName>99941604 - Disclosure - Derivatives and hedging activities - Effect of Derivative Instruments Not Designated as Hedging Instruments on the Consolidated Statements of Income and Comprehensive Income (Loss) (Details)</LongName>
      <ReportType>Sheet</ReportType>
      <Role>http://www.peoplesfinancial.com/role/DisclosureDerivativesAndHedgingActivitiesEffectOfDerivativeInstrumentsNotDesignatedAsHedgingInstrumentsOnConsolidatedStatementsOfIncomeAndComprehensiveIncomeLossDetails</Role>
      <ShortName>Derivatives and hedging activities - Effect of Derivative Instruments Not Designated as Hedging Instruments on the Consolidated Statements of Income and Comprehensive Income (Loss) (Details)</ShortName>
      <MenuCategory>Details</MenuCategory>
      <Position>112</Position>
    </Report>
    <Report instance="pfis-20251231x10k.htm">
      <IsDefault>false</IsDefault>
      <HasEmbeddedReports>false</HasEmbeddedReports>
      <HtmlFileName>R113.htm</HtmlFileName>
      <LongName>99941605 - Disclosure - Derivatives and hedging activities - Offsetting Derivatives (Details)</LongName>
      <ReportType>Sheet</ReportType>
      <Role>http://www.peoplesfinancial.com/role/DisclosureDerivativesAndHedgingActivitiesOffsettingDerivativesDetails</Role>
      <ShortName>Derivatives and hedging activities - Offsetting Derivatives (Details)</ShortName>
      <MenuCategory>Details</MenuCategory>
      <Position>113</Position>
    </Report>
    <Report instance="pfis-20251231x10k.htm">
      <IsDefault>false</IsDefault>
      <HasEmbeddedReports>false</HasEmbeddedReports>
      <HtmlFileName>R114.htm</HtmlFileName>
      <LongName>99941606 - Disclosure - Derivatives and hedging activities - Credit-risk-related Contingent Features (Details)</LongName>
      <ReportType>Sheet</ReportType>
      <Role>http://www.peoplesfinancial.com/role/DisclosureDerivativesAndHedgingActivitiesCreditRiskRelatedContingentFeaturesDetails</Role>
      <ShortName>Derivatives and hedging activities - Credit-risk-related Contingent Features (Details)</ShortName>
      <MenuCategory>Details</MenuCategory>
      <Position>114</Position>
    </Report>
    <Report instance="pfis-20251231x10k.htm">
      <IsDefault>false</IsDefault>
      <HasEmbeddedReports>false</HasEmbeddedReports>
      <HtmlFileName>R115.htm</HtmlFileName>
      <LongName>99941701 - Disclosure - Stock plans - Additional Information (Details)</LongName>
      <ReportType>Sheet</ReportType>
      <Role>http://www.peoplesfinancial.com/role/DisclosureStockPlansAdditionalInformationDetails</Role>
      <ShortName>Stock plans - Additional Information (Details)</ShortName>
      <MenuCategory>Details</MenuCategory>
      <Position>115</Position>
    </Report>
    <Report instance="pfis-20251231x10k.htm">
      <IsDefault>false</IsDefault>
      <HasEmbeddedReports>false</HasEmbeddedReports>
      <HtmlFileName>R116.htm</HtmlFileName>
      <LongName>99941702 - Disclosure - Stock plans - Schedule of Activity Related to Restricted Stock (Details)</LongName>
      <ReportType>Sheet</ReportType>
      <Role>http://www.peoplesfinancial.com/role/DisclosureStockPlansScheduleOfActivityRelatedToRestrictedStockDetails</Role>
      <ShortName>Stock plans - Schedule of Activity Related to Restricted Stock (Details)</ShortName>
      <MenuCategory>Details</MenuCategory>
      <Position>116</Position>
    </Report>
    <Report instance="pfis-20251231x10k.htm">
      <IsDefault>false</IsDefault>
      <HasEmbeddedReports>false</HasEmbeddedReports>
      <HtmlFileName>R117.htm</HtmlFileName>
      <LongName>99941801 - Disclosure - Employee benefit plans - Salaries and Employee Benefits Expense - ESOP (Details)</LongName>
      <ReportType>Sheet</ReportType>
      <Role>http://www.peoplesfinancial.com/role/DisclosureEmployeeBenefitPlansSalariesAndEmployeeBenefitsExpenseEsopDetails</Role>
      <ShortName>Employee benefit plans - Salaries and Employee Benefits Expense - ESOP (Details)</ShortName>
      <MenuCategory>Details</MenuCategory>
      <Position>117</Position>
    </Report>
    <Report instance="pfis-20251231x10k.htm">
      <IsDefault>false</IsDefault>
      <HasEmbeddedReports>false</HasEmbeddedReports>
      <HtmlFileName>R118.htm</HtmlFileName>
      <LongName>99941802 - Disclosure - Employee benefit plans - Salaries and Employee Benefits Expense - Profit Sharing (Details)</LongName>
      <ReportType>Sheet</ReportType>
      <Role>http://www.peoplesfinancial.com/role/DisclosureEmployeeBenefitPlansSalariesAndEmployeeBenefitsExpenseProfitSharingDetails</Role>
      <ShortName>Employee benefit plans - Salaries and Employee Benefits Expense - Profit Sharing (Details)</ShortName>
      <MenuCategory>Details</MenuCategory>
      <Position>118</Position>
    </Report>
    <Report instance="pfis-20251231x10k.htm">
      <IsDefault>false</IsDefault>
      <HasEmbeddedReports>false</HasEmbeddedReports>
      <HtmlFileName>R119.htm</HtmlFileName>
      <LongName>99941803 - Disclosure - Employee benefit plans - Salaries and Employee Benefits Expense - SERP and Employee Pension Plan (Details)</LongName>
      <ReportType>Sheet</ReportType>
      <Role>http://www.peoplesfinancial.com/role/DisclosureEmployeeBenefitPlansSalariesAndEmployeeBenefitsExpenseSerpAndEmployeePensionPlanDetails</Role>
      <ShortName>Employee benefit plans - Salaries and Employee Benefits Expense - SERP and Employee Pension Plan (Details)</ShortName>
      <MenuCategory>Details</MenuCategory>
      <Position>119</Position>
    </Report>
    <Report instance="pfis-20251231x10k.htm">
      <IsDefault>false</IsDefault>
      <HasEmbeddedReports>false</HasEmbeddedReports>
      <HtmlFileName>R120.htm</HtmlFileName>
      <LongName>99941804 - Disclosure - Employee benefit plans - Summary of Pension and Postretirement Life Insurance Plans (Details)</LongName>
      <ReportType>Sheet</ReportType>
      <Role>http://www.peoplesfinancial.com/role/DisclosureEmployeeBenefitPlansSummaryOfPensionAndPostretirementLifeInsurancePlansDetails</Role>
      <ShortName>Employee benefit plans - Summary of Pension and Postretirement Life Insurance Plans (Details)</ShortName>
      <MenuCategory>Details</MenuCategory>
      <Position>120</Position>
    </Report>
    <Report instance="pfis-20251231x10k.htm">
      <IsDefault>false</IsDefault>
      <HasEmbeddedReports>false</HasEmbeddedReports>
      <HtmlFileName>R121.htm</HtmlFileName>
      <LongName>99941805 - Disclosure - Employee benefit plans - Schedule of Amounts Recognized in Accumulated Other Comprehensive Income (Details)</LongName>
      <ReportType>Sheet</ReportType>
      <Role>http://www.peoplesfinancial.com/role/DisclosureEmployeeBenefitPlansScheduleOfAmountsRecognizedInAccumulatedOtherComprehensiveIncomeDetails</Role>
      <ShortName>Employee benefit plans - Schedule of Amounts Recognized in Accumulated Other Comprehensive Income (Details)</ShortName>
      <MenuCategory>Details</MenuCategory>
      <Position>121</Position>
    </Report>
    <Report instance="pfis-20251231x10k.htm">
      <IsDefault>false</IsDefault>
      <HasEmbeddedReports>false</HasEmbeddedReports>
      <HtmlFileName>R122.htm</HtmlFileName>
      <LongName>99941806 - Disclosure - Employee benefit plans - Components of Net Periodic Pension Income and Other Amounts Recognized in Other Comprehensive Income (Details)</LongName>
      <ReportType>Sheet</ReportType>
      <Role>http://www.peoplesfinancial.com/role/DisclosureEmployeeBenefitPlansComponentsOfNetPeriodicPensionIncomeAndOtherAmountsRecognizedInOtherComprehensiveIncomeDetails</Role>
      <ShortName>Employee benefit plans - Components of Net Periodic Pension Income and Other Amounts Recognized in Other Comprehensive Income (Details)</ShortName>
      <MenuCategory>Details</MenuCategory>
      <Position>122</Position>
    </Report>
    <Report instance="pfis-20251231x10k.htm">
      <IsDefault>false</IsDefault>
      <HasEmbeddedReports>false</HasEmbeddedReports>
      <HtmlFileName>R123.htm</HtmlFileName>
      <LongName>99941807 - Disclosure - Employee benefit plans - Schedule of Weighted-Average Assumptions Used to Determine Benefit Obligations and Related Expenses (Details)</LongName>
      <ReportType>Sheet</ReportType>
      <Role>http://www.peoplesfinancial.com/role/DisclosureEmployeeBenefitPlansScheduleOfWeightedAverageAssumptionsUsedToDetermineBenefitObligationsAndRelatedExpensesDetails</Role>
      <ShortName>Employee benefit plans - Schedule of Weighted-Average Assumptions Used to Determine Benefit Obligations and Related Expenses (Details)</ShortName>
      <MenuCategory>Details</MenuCategory>
      <Position>123</Position>
    </Report>
    <Report instance="pfis-20251231x10k.htm">
      <IsDefault>false</IsDefault>
      <HasEmbeddedReports>false</HasEmbeddedReports>
      <HtmlFileName>R124.htm</HtmlFileName>
      <LongName>99941808 - Disclosure - Employee benefit plans - Schedule of Pension Plan Weighted-Average Asset Allocations (Details)</LongName>
      <ReportType>Sheet</ReportType>
      <Role>http://www.peoplesfinancial.com/role/DisclosureEmployeeBenefitPlansScheduleOfPensionPlanWeightedAverageAssetAllocationsDetails</Role>
      <ShortName>Employee benefit plans - Schedule of Pension Plan Weighted-Average Asset Allocations (Details)</ShortName>
      <MenuCategory>Details</MenuCategory>
      <Position>124</Position>
    </Report>
    <Report instance="pfis-20251231x10k.htm">
      <IsDefault>false</IsDefault>
      <HasEmbeddedReports>false</HasEmbeddedReports>
      <HtmlFileName>R125.htm</HtmlFileName>
      <LongName>99941809 - Disclosure - Employee benefit plans - Fair Value Measurement of Pension Plan Assets (Details)</LongName>
      <ReportType>Sheet</ReportType>
      <Role>http://www.peoplesfinancial.com/role/DisclosureEmployeeBenefitPlansFairValueMeasurementOfPensionPlanAssetsDetails</Role>
      <ShortName>Employee benefit plans - Fair Value Measurement of Pension Plan Assets (Details)</ShortName>
      <MenuCategory>Details</MenuCategory>
      <Position>125</Position>
    </Report>
    <Report instance="pfis-20251231x10k.htm">
      <IsDefault>false</IsDefault>
      <HasEmbeddedReports>false</HasEmbeddedReports>
      <HtmlFileName>R126.htm</HtmlFileName>
      <LongName>99941810 - Disclosure - Employee benefit plans - Salaries and Employee Benefits Expense - Investment Percentages (Details)</LongName>
      <ReportType>Sheet</ReportType>
      <Role>http://www.peoplesfinancial.com/role/DisclosureEmployeeBenefitPlansSalariesAndEmployeeBenefitsExpenseInvestmentPercentagesDetails</Role>
      <ShortName>Employee benefit plans - Salaries and Employee Benefits Expense - Investment Percentages (Details)</ShortName>
      <MenuCategory>Details</MenuCategory>
      <Position>126</Position>
    </Report>
    <Report instance="pfis-20251231x10k.htm">
      <IsDefault>false</IsDefault>
      <HasEmbeddedReports>false</HasEmbeddedReports>
      <HtmlFileName>R127.htm</HtmlFileName>
      <LongName>99941811 - Disclosure - Employee benefit plans - Schedule of Benefit Payments Expected to be Paid (Details)</LongName>
      <ReportType>Sheet</ReportType>
      <Role>http://www.peoplesfinancial.com/role/DisclosureEmployeeBenefitPlansScheduleOfBenefitPaymentsExpectedToBePaidDetails</Role>
      <ShortName>Employee benefit plans - Schedule of Benefit Payments Expected to be Paid (Details)</ShortName>
      <MenuCategory>Details</MenuCategory>
      <Position>127</Position>
    </Report>
    <Report instance="pfis-20251231x10k.htm">
      <IsDefault>false</IsDefault>
      <HasEmbeddedReports>false</HasEmbeddedReports>
      <HtmlFileName>R128.htm</HtmlFileName>
      <LongName>99941901 - Disclosure - Income taxes - Foreign Income and Tax Expense (Details)</LongName>
      <ReportType>Sheet</ReportType>
      <Role>http://www.peoplesfinancial.com/role/DisclosureIncomeTaxesForeignIncomeAndTaxExpenseDetails</Role>
      <ShortName>Income taxes - Foreign Income and Tax Expense (Details)</ShortName>
      <MenuCategory>Details</MenuCategory>
      <Position>128</Position>
    </Report>
    <Report instance="pfis-20251231x10k.htm">
      <IsDefault>false</IsDefault>
      <HasEmbeddedReports>false</HasEmbeddedReports>
      <HtmlFileName>R129.htm</HtmlFileName>
      <LongName>99941902 - Disclosure - Income taxes - Current and Deferred Amounts of Provision for Income Taxes Expense (Benefit) (Details)</LongName>
      <ReportType>Sheet</ReportType>
      <Role>http://www.peoplesfinancial.com/role/DisclosureIncomeTaxesCurrentAndDeferredAmountsOfProvisionForIncomeTaxesExpenseBenefitDetails</Role>
      <ShortName>Income taxes - Current and Deferred Amounts of Provision for Income Taxes Expense (Benefit) (Details)</ShortName>
      <MenuCategory>Details</MenuCategory>
      <Position>129</Position>
    </Report>
    <Report instance="pfis-20251231x10k.htm">
      <IsDefault>false</IsDefault>
      <HasEmbeddedReports>false</HasEmbeddedReports>
      <HtmlFileName>R130.htm</HtmlFileName>
      <LongName>99941903 - Disclosure - Income taxes - Components of Net Deferred Tax Asset (Details)</LongName>
      <ReportType>Sheet</ReportType>
      <Role>http://www.peoplesfinancial.com/role/DisclosureIncomeTaxesComponentsOfNetDeferredTaxAssetDetails</Role>
      <ShortName>Income taxes - Components of Net Deferred Tax Asset (Details)</ShortName>
      <MenuCategory>Details</MenuCategory>
      <Position>130</Position>
    </Report>
    <Report instance="pfis-20251231x10k.htm">
      <IsDefault>false</IsDefault>
      <HasEmbeddedReports>false</HasEmbeddedReports>
      <HtmlFileName>R131.htm</HtmlFileName>
      <LongName>99941904 - Disclosure - Income taxes - Reconciliation of Effective Income Tax Expense (Details)</LongName>
      <ReportType>Sheet</ReportType>
      <Role>http://www.peoplesfinancial.com/role/DisclosureIncomeTaxesReconciliationOfEffectiveIncomeTaxExpenseDetails</Role>
      <ShortName>Income taxes - Reconciliation of Effective Income Tax Expense (Details)</ShortName>
      <MenuCategory>Details</MenuCategory>
      <Position>131</Position>
    </Report>
    <Report instance="pfis-20251231x10k.htm">
      <IsDefault>false</IsDefault>
      <HasEmbeddedReports>false</HasEmbeddedReports>
      <HtmlFileName>R132.htm</HtmlFileName>
      <LongName>99941905 - Disclosure - Income taxes - Income taxes paid (Details)</LongName>
      <ReportType>Sheet</ReportType>
      <Role>http://www.peoplesfinancial.com/role/DisclosureIncomeTaxesIncomeTaxesPaidDetails</Role>
      <ShortName>Income taxes - Income taxes paid (Details)</ShortName>
      <MenuCategory>Details</MenuCategory>
      <Position>132</Position>
    </Report>
    <Report instance="pfis-20251231x10k.htm">
      <IsDefault>false</IsDefault>
      <HasEmbeddedReports>false</HasEmbeddedReports>
      <HtmlFileName>R133.htm</HtmlFileName>
      <LongName>99942101 - Disclosure - Parent Company financial statements - Condensed Balance Sheets (Details)</LongName>
      <ReportType>Sheet</ReportType>
      <Role>http://www.peoplesfinancial.com/role/DisclosureParentCompanyFinancialStatementsCondensedBalanceSheetsDetails</Role>
      <ShortName>Parent Company financial statements - Condensed Balance Sheets (Details)</ShortName>
      <MenuCategory>Details</MenuCategory>
      <Position>133</Position>
    </Report>
    <Report instance="pfis-20251231x10k.htm">
      <IsDefault>false</IsDefault>
      <HasEmbeddedReports>false</HasEmbeddedReports>
      <HtmlFileName>R134.htm</HtmlFileName>
      <LongName>99942102 - Disclosure - Parent Company financial statements - Condensed Statements of Income (Details)</LongName>
      <ReportType>Sheet</ReportType>
      <Role>http://www.peoplesfinancial.com/role/DisclosureParentCompanyFinancialStatementsCondensedStatementsOfIncomeDetails</Role>
      <ShortName>Parent Company financial statements - Condensed Statements of Income (Details)</ShortName>
      <MenuCategory>Details</MenuCategory>
      <Position>134</Position>
    </Report>
    <Report instance="pfis-20251231x10k.htm">
      <IsDefault>false</IsDefault>
      <HasEmbeddedReports>false</HasEmbeddedReports>
      <HtmlFileName>R135.htm</HtmlFileName>
      <LongName>99942103 - Disclosure - Parent Company financial statements - Condensed Statements of Cash Flows (Details)</LongName>
      <ReportType>Sheet</ReportType>
      <Role>http://www.peoplesfinancial.com/role/DisclosureParentCompanyFinancialStatementsCondensedStatementsOfCashFlowsDetails</Role>
      <ShortName>Parent Company financial statements - Condensed Statements of Cash Flows (Details)</ShortName>
      <MenuCategory>Details</MenuCategory>
      <Position>135</Position>
    </Report>
    <Report instance="pfis-20251231x10k.htm">
      <IsDefault>false</IsDefault>
      <HasEmbeddedReports>false</HasEmbeddedReports>
      <HtmlFileName>R136.htm</HtmlFileName>
      <LongName>99942201 - Disclosure - Regulatory matters (Details)</LongName>
      <ReportType>Sheet</ReportType>
      <Role>http://www.peoplesfinancial.com/role/DisclosureRegulatoryMattersDetails</Role>
      <ShortName>Regulatory matters (Details)</ShortName>
      <MenuCategory>Details</MenuCategory>
      <ParentRole>http://www.peoplesfinancial.com/role/DisclosureRegulatoryMattersTables</ParentRole>
      <Position>136</Position>
    </Report>
    <Report instance="pfis-20251231x10k.htm">
      <IsDefault>false</IsDefault>
      <HasEmbeddedReports>false</HasEmbeddedReports>
      <HtmlFileName>R137.htm</HtmlFileName>
      <LongName>99942202 - Disclosure - Regulatory matters - Schedule of Bank's Capital Amounts and Ratios (Details)</LongName>
      <ReportType>Sheet</ReportType>
      <Role>http://www.peoplesfinancial.com/role/DisclosureRegulatoryMattersScheduleOfBankSCapitalAmountsAndRatiosDetails</Role>
      <ShortName>Regulatory matters - Schedule of Bank's Capital Amounts and Ratios (Details)</ShortName>
      <MenuCategory>Details</MenuCategory>
      <Position>137</Position>
    </Report>
    <Report instance="pfis-20251231x10k.htm">
      <IsDefault>false</IsDefault>
      <HasEmbeddedReports>false</HasEmbeddedReports>
      <HtmlFileName>R138.htm</HtmlFileName>
      <LongName>99942301 - Disclosure - Accumulated Other Comprehensive Loss - Components of Accumulated Other Comprehensive Loss (Details)</LongName>
      <ReportType>Sheet</ReportType>
      <Role>http://www.peoplesfinancial.com/role/DisclosureAccumulatedOtherComprehensiveLossComponentsOfAccumulatedOtherComprehensiveLossDetails</Role>
      <ShortName>Accumulated Other Comprehensive Loss - Components of Accumulated Other Comprehensive Loss (Details)</ShortName>
      <MenuCategory>Details</MenuCategory>
      <Position>138</Position>
    </Report>
    <Report instance="pfis-20251231x10k.htm">
      <IsDefault>false</IsDefault>
      <HasEmbeddedReports>false</HasEmbeddedReports>
      <HtmlFileName>R139.htm</HtmlFileName>
      <LongName>99942302 - Disclosure - Accumulated Other Comprehensive Loss - Other Comprehensive Income and Related Tax Effects (Details)</LongName>
      <ReportType>Sheet</ReportType>
      <Role>http://www.peoplesfinancial.com/role/DisclosureAccumulatedOtherComprehensiveLossOtherComprehensiveIncomeAndRelatedTaxEffectsDetails</Role>
      <ShortName>Accumulated Other Comprehensive Loss - Other Comprehensive Income and Related Tax Effects (Details)</ShortName>
      <MenuCategory>Details</MenuCategory>
      <Position>139</Position>
    </Report>
    <Report>
      <IsDefault>false</IsDefault>
      <HasEmbeddedReports>false</HasEmbeddedReports>
      <LongName>All Reports</LongName>
      <ReportType>Book</ReportType>
      <ShortName>All Reports</ShortName>
    </Report>
  </MyReports>
  <InputFiles>
    <File>pfis-20251231.xsd</File>
    <File>pfis-20251231_cal.xml</File>
    <File>pfis-20251231_def.xml</File>
    <File>pfis-20251231_lab.xml</File>
    <File>pfis-20251231_pre.xml</File>
    <File doctype="10-K" isDefinitelyFs="true" isUsgaap="true" original="pfis-20251231x10k.htm">pfis-20251231x10k.htm</File>
  </InputFiles>
  <SupplementalFiles>
    <File>pfis-20251231x10k006.jpg</File>
  </SupplementalFiles>
  <BaseTaxonomies>
    <BaseTaxonomy items="4">http://fasb.org/srt/2025</BaseTaxonomy>
    <BaseTaxonomy items="2508">http://fasb.org/us-gaap/2025</BaseTaxonomy>
    <BaseTaxonomy items="14">http://xbrl.sec.gov/cyd/2025</BaseTaxonomy>
    <BaseTaxonomy items="38">http://xbrl.sec.gov/dei/2025</BaseTaxonomy>
    <BaseTaxonomy items="5">http://xbrl.sec.gov/ecd/2025</BaseTaxonomy>
  </BaseTaxonomies>
  <HasPresentationLinkbase>true</HasPresentationLinkbase>
  <HasCalculationLinkbase>true</HasCalculationLinkbase>
</FilingSummary>
