<?xml version='1.0' encoding='UTF-8'?>
<FilingSummary>
  <Version>3.5.0.2</Version>
  <ProcessingTime/>
  <ReportFormat>html</ReportFormat>
  <ContextCount>238</ContextCount>
  <ElementCount>253</ElementCount>
  <EntityCount>1</EntityCount>
  <FootnotesReported>false</FootnotesReported>
  <SegmentCount>42</SegmentCount>
  <ScenarioCount>0</ScenarioCount>
  <TuplesReported>false</TuplesReported>
  <UnitCount>7</UnitCount>
  <MyReports>
    <Report instance="pfis-20160630.xml">
      <IsDefault>false</IsDefault>
      <HasEmbeddedReports>false</HasEmbeddedReports>
      <HtmlFileName>R1.htm</HtmlFileName>
      <LongName>00090 - Document - Document and Entity Information</LongName>
      <ReportType>Sheet</ReportType>
      <Role>http://imetrix.edgar-online.com/role/DocumentDocumentAndEntityInformation</Role>
      <ShortName>Document and Entity Information</ShortName>
      <MenuCategory>Cover</MenuCategory>
      <Position>1</Position>
    </Report>
    <Report instance="pfis-20160630.xml">
      <IsDefault>false</IsDefault>
      <HasEmbeddedReports>false</HasEmbeddedReports>
      <HtmlFileName>R2.htm</HtmlFileName>
      <LongName>00100 - Statement - Consolidated Balance Sheets</LongName>
      <ReportType>Sheet</ReportType>
      <Role>http://imetrix.edgar-online.com/role/StatementConsolidatedBalanceSheets</Role>
      <ShortName>Consolidated Balance Sheets</ShortName>
      <MenuCategory>Statements</MenuCategory>
      <Position>2</Position>
    </Report>
    <Report instance="pfis-20160630.xml">
      <IsDefault>false</IsDefault>
      <HasEmbeddedReports>false</HasEmbeddedReports>
      <HtmlFileName>R3.htm</HtmlFileName>
      <LongName>00105 - Statement - Consolidated Balance Sheets (Parenthetical)</LongName>
      <ReportType>Sheet</ReportType>
      <Role>http://imetrix.edgar-online.com/role/StatementConsolidatedBalanceSheetsParenthetical</Role>
      <ShortName>Consolidated Balance Sheets (Parenthetical)</ShortName>
      <MenuCategory>Statements</MenuCategory>
      <Position>3</Position>
    </Report>
    <Report instance="pfis-20160630.xml">
      <IsDefault>false</IsDefault>
      <HasEmbeddedReports>false</HasEmbeddedReports>
      <HtmlFileName>R4.htm</HtmlFileName>
      <LongName>00200 - Statement - Consolidated Statements of Income and Comprehensive Income</LongName>
      <ReportType>Sheet</ReportType>
      <Role>http://imetrix.edgar-online.com/role/StatementConsolidatedStatementsOfIncomeAndComprehensiveIncome</Role>
      <ShortName>Consolidated Statements of Income and Comprehensive Income</ShortName>
      <MenuCategory>Statements</MenuCategory>
      <Position>4</Position>
    </Report>
    <Report instance="pfis-20160630.xml">
      <IsDefault>false</IsDefault>
      <HasEmbeddedReports>false</HasEmbeddedReports>
      <HtmlFileName>R5.htm</HtmlFileName>
      <LongName>00300 - Statement - Consolidated Statements of Changes in Stockholders' Equity</LongName>
      <ReportType>Sheet</ReportType>
      <Role>http://imetrix.edgar-online.com/role/StatementConsolidatedStatementsOfChangesInStockholdersEquity</Role>
      <ShortName>Consolidated Statements of Changes in Stockholders' Equity</ShortName>
      <MenuCategory>Statements</MenuCategory>
      <Position>5</Position>
    </Report>
    <Report instance="pfis-20160630.xml">
      <IsDefault>false</IsDefault>
      <HasEmbeddedReports>false</HasEmbeddedReports>
      <HtmlFileName>R6.htm</HtmlFileName>
      <LongName>00305 - Statement - Consolidated Statements of Changes in Stockholders' Equity (Parenthetical)</LongName>
      <ReportType>Sheet</ReportType>
      <Role>http://imetrix.edgar-online.com/role/StatementConsolidatedStatementsOfChangesInStockholdersEquityParenthetical</Role>
      <ShortName>Consolidated Statements of Changes in Stockholders' Equity (Parenthetical)</ShortName>
      <MenuCategory>Statements</MenuCategory>
      <Position>6</Position>
    </Report>
    <Report instance="pfis-20160630.xml">
      <IsDefault>false</IsDefault>
      <HasEmbeddedReports>false</HasEmbeddedReports>
      <HtmlFileName>R7.htm</HtmlFileName>
      <LongName>00400 - Statement - Consolidated Statements of Cash Flows</LongName>
      <ReportType>Sheet</ReportType>
      <Role>http://imetrix.edgar-online.com/role/StatementConsolidatedStatementsOfCashFlows</Role>
      <ShortName>Consolidated Statements of Cash Flows</ShortName>
      <MenuCategory>Statements</MenuCategory>
      <Position>7</Position>
    </Report>
    <Report instance="pfis-20160630.xml">
      <IsDefault>false</IsDefault>
      <HasEmbeddedReports>false</HasEmbeddedReports>
      <HtmlFileName>R8.htm</HtmlFileName>
      <LongName>10101 - Disclosure - Summary of significant accounting policies</LongName>
      <ReportType>Sheet</ReportType>
      <Role>http://imetrix.edgar-online.com/role/DisclosureSummaryOfSignificantAccountingPolicies</Role>
      <ShortName>Summary of significant accounting policies</ShortName>
      <MenuCategory>Notes</MenuCategory>
      <Position>8</Position>
    </Report>
    <Report instance="pfis-20160630.xml">
      <IsDefault>false</IsDefault>
      <HasEmbeddedReports>false</HasEmbeddedReports>
      <HtmlFileName>R9.htm</HtmlFileName>
      <LongName>10201 - Disclosure - Other comprehensive income (loss)</LongName>
      <ReportType>Sheet</ReportType>
      <Role>http://imetrix.edgar-online.com/role/DisclosureOtherComprehensiveIncomeLoss</Role>
      <ShortName>Other comprehensive income (loss)</ShortName>
      <MenuCategory>Notes</MenuCategory>
      <Position>9</Position>
    </Report>
    <Report instance="pfis-20160630.xml">
      <IsDefault>false</IsDefault>
      <HasEmbeddedReports>false</HasEmbeddedReports>
      <HtmlFileName>R10.htm</HtmlFileName>
      <LongName>10301 - Disclosure - Earnings per share</LongName>
      <ReportType>Sheet</ReportType>
      <Role>http://imetrix.edgar-online.com/role/DisclosureEarningsPerShare</Role>
      <ShortName>Earnings per share</ShortName>
      <MenuCategory>Notes</MenuCategory>
      <Position>10</Position>
    </Report>
    <Report instance="pfis-20160630.xml">
      <IsDefault>false</IsDefault>
      <HasEmbeddedReports>false</HasEmbeddedReports>
      <HtmlFileName>R11.htm</HtmlFileName>
      <LongName>10401 - Disclosure - Investment securities</LongName>
      <ReportType>Sheet</ReportType>
      <Role>http://imetrix.edgar-online.com/role/DisclosureInvestmentSecurities</Role>
      <ShortName>Investment securities</ShortName>
      <MenuCategory>Notes</MenuCategory>
      <Position>11</Position>
    </Report>
    <Report instance="pfis-20160630.xml">
      <IsDefault>false</IsDefault>
      <HasEmbeddedReports>false</HasEmbeddedReports>
      <HtmlFileName>R12.htm</HtmlFileName>
      <LongName>10501 - Disclosure - Loans, net and allowance for loan losses</LongName>
      <ReportType>Sheet</ReportType>
      <Role>http://imetrix.edgar-online.com/role/DisclosureLoansNetAndAllowanceForLoanLosses</Role>
      <ShortName>Loans, net and allowance for loan losses</ShortName>
      <MenuCategory>Notes</MenuCategory>
      <Position>12</Position>
    </Report>
    <Report instance="pfis-20160630.xml">
      <IsDefault>false</IsDefault>
      <HasEmbeddedReports>false</HasEmbeddedReports>
      <HtmlFileName>R13.htm</HtmlFileName>
      <LongName>10601 - Disclosure - Other assets</LongName>
      <ReportType>Sheet</ReportType>
      <Role>http://imetrix.edgar-online.com/role/DisclosureOtherAssets</Role>
      <ShortName>Other assets</ShortName>
      <MenuCategory>Notes</MenuCategory>
      <Position>13</Position>
    </Report>
    <Report instance="pfis-20160630.xml">
      <IsDefault>false</IsDefault>
      <HasEmbeddedReports>false</HasEmbeddedReports>
      <HtmlFileName>R14.htm</HtmlFileName>
      <LongName>10701 - Disclosure - Fair value estimates</LongName>
      <ReportType>Sheet</ReportType>
      <Role>http://imetrix.edgar-online.com/role/DisclosureFairValueEstimates</Role>
      <ShortName>Fair value estimates</ShortName>
      <MenuCategory>Notes</MenuCategory>
      <Position>14</Position>
    </Report>
    <Report instance="pfis-20160630.xml">
      <IsDefault>false</IsDefault>
      <HasEmbeddedReports>false</HasEmbeddedReports>
      <HtmlFileName>R15.htm</HtmlFileName>
      <LongName>10801 - Disclosure - Employee benefit plans</LongName>
      <ReportType>Sheet</ReportType>
      <Role>http://imetrix.edgar-online.com/role/DisclosureEmployeeBenefitPlans</Role>
      <ShortName>Employee benefit plans</ShortName>
      <MenuCategory>Notes</MenuCategory>
      <Position>15</Position>
    </Report>
    <Report instance="pfis-20160630.xml">
      <IsDefault>false</IsDefault>
      <HasEmbeddedReports>false</HasEmbeddedReports>
      <HtmlFileName>R16.htm</HtmlFileName>
      <LongName>30203 - Disclosure - Other comprehensive income (loss) (Tables)</LongName>
      <ReportType>Sheet</ReportType>
      <Role>http://imetrix.edgar-online.com/role/DisclosureOtherComprehensiveIncomeLossTables</Role>
      <ShortName>Other comprehensive income (loss) (Tables)</ShortName>
      <MenuCategory>Tables</MenuCategory>
      <ParentRole>http://imetrix.edgar-online.com/role/DisclosureOtherComprehensiveIncomeLoss</ParentRole>
      <Position>16</Position>
    </Report>
    <Report instance="pfis-20160630.xml">
      <IsDefault>false</IsDefault>
      <HasEmbeddedReports>false</HasEmbeddedReports>
      <HtmlFileName>R17.htm</HtmlFileName>
      <LongName>30303 - Disclosure - Earnings per share (Tables)</LongName>
      <ReportType>Sheet</ReportType>
      <Role>http://imetrix.edgar-online.com/role/DisclosureEarningsPerShareTables</Role>
      <ShortName>Earnings per share (Tables)</ShortName>
      <MenuCategory>Tables</MenuCategory>
      <ParentRole>http://imetrix.edgar-online.com/role/DisclosureEarningsPerShare</ParentRole>
      <Position>17</Position>
    </Report>
    <Report instance="pfis-20160630.xml">
      <IsDefault>false</IsDefault>
      <HasEmbeddedReports>false</HasEmbeddedReports>
      <HtmlFileName>R18.htm</HtmlFileName>
      <LongName>30403 - Disclosure - Investment securities (Tables)</LongName>
      <ReportType>Sheet</ReportType>
      <Role>http://imetrix.edgar-online.com/role/DisclosureInvestmentSecuritiesTables</Role>
      <ShortName>Investment securities (Tables)</ShortName>
      <MenuCategory>Tables</MenuCategory>
      <ParentRole>http://imetrix.edgar-online.com/role/DisclosureInvestmentSecurities</ParentRole>
      <Position>18</Position>
    </Report>
    <Report instance="pfis-20160630.xml">
      <IsDefault>false</IsDefault>
      <HasEmbeddedReports>false</HasEmbeddedReports>
      <HtmlFileName>R19.htm</HtmlFileName>
      <LongName>30503 - Disclosure - Loans, net and allowance for loan losses (Tables)</LongName>
      <ReportType>Sheet</ReportType>
      <Role>http://imetrix.edgar-online.com/role/DisclosureLoansNetAndAllowanceForLoanLossesTables</Role>
      <ShortName>Loans, net and allowance for loan losses (Tables)</ShortName>
      <MenuCategory>Tables</MenuCategory>
      <ParentRole>http://imetrix.edgar-online.com/role/DisclosureLoansNetAndAllowanceForLoanLosses</ParentRole>
      <Position>19</Position>
    </Report>
    <Report instance="pfis-20160630.xml">
      <IsDefault>false</IsDefault>
      <HasEmbeddedReports>false</HasEmbeddedReports>
      <HtmlFileName>R20.htm</HtmlFileName>
      <LongName>30603 - Disclosure - Other assets (Tables)</LongName>
      <ReportType>Sheet</ReportType>
      <Role>http://imetrix.edgar-online.com/role/DisclosureOtherAssetsTables</Role>
      <ShortName>Other assets (Tables)</ShortName>
      <MenuCategory>Tables</MenuCategory>
      <ParentRole>http://imetrix.edgar-online.com/role/DisclosureOtherAssets</ParentRole>
      <Position>20</Position>
    </Report>
    <Report instance="pfis-20160630.xml">
      <IsDefault>false</IsDefault>
      <HasEmbeddedReports>false</HasEmbeddedReports>
      <HtmlFileName>R21.htm</HtmlFileName>
      <LongName>30703 - Disclosure - Fair value estimates (Tables)</LongName>
      <ReportType>Sheet</ReportType>
      <Role>http://imetrix.edgar-online.com/role/DisclosureFairValueEstimatesTables</Role>
      <ShortName>Fair value estimates (Tables)</ShortName>
      <MenuCategory>Tables</MenuCategory>
      <ParentRole>http://imetrix.edgar-online.com/role/DisclosureFairValueEstimates</ParentRole>
      <Position>21</Position>
    </Report>
    <Report instance="pfis-20160630.xml">
      <IsDefault>false</IsDefault>
      <HasEmbeddedReports>false</HasEmbeddedReports>
      <HtmlFileName>R22.htm</HtmlFileName>
      <LongName>30803 - Disclosure - Employee benefit plans (Tables)</LongName>
      <ReportType>Sheet</ReportType>
      <Role>http://imetrix.edgar-online.com/role/DisclosureEmployeeBenefitPlansTables</Role>
      <ShortName>Employee benefit plans (Tables)</ShortName>
      <MenuCategory>Tables</MenuCategory>
      <ParentRole>http://imetrix.edgar-online.com/role/DisclosureEmployeeBenefitPlans</ParentRole>
      <Position>22</Position>
    </Report>
    <Report instance="pfis-20160630.xml">
      <IsDefault>false</IsDefault>
      <HasEmbeddedReports>false</HasEmbeddedReports>
      <HtmlFileName>R23.htm</HtmlFileName>
      <LongName>40101 - Disclosure - Summary of significant accounting policies - Additional Information (Details)</LongName>
      <ReportType>Sheet</ReportType>
      <Role>http://imetrix.edgar-online.com/role/DisclosureSummaryOfSignificantAccountingPoliciesAdditionalInformationDetails</Role>
      <ShortName>Summary of significant accounting policies - Additional Information (Details)</ShortName>
      <MenuCategory>Details</MenuCategory>
      <Position>23</Position>
    </Report>
    <Report instance="pfis-20160630.xml">
      <IsDefault>false</IsDefault>
      <HasEmbeddedReports>false</HasEmbeddedReports>
      <HtmlFileName>R24.htm</HtmlFileName>
      <LongName>40201 - Disclosure - Other comprehensive income (loss) - Components of Accumulated Other Comprehensive Loss (Details)</LongName>
      <ReportType>Sheet</ReportType>
      <Role>http://imetrix.edgar-online.com/role/DisclosureOtherComprehensiveIncomeLossComponentsOfAccumulatedOtherComprehensiveLossDetails</Role>
      <ShortName>Other comprehensive income (loss) - Components of Accumulated Other Comprehensive Loss (Details)</ShortName>
      <MenuCategory>Details</MenuCategory>
      <ParentRole>http://imetrix.edgar-online.com/role/DisclosureOtherComprehensiveIncomeLossTables</ParentRole>
      <Position>24</Position>
    </Report>
    <Report instance="pfis-20160630.xml">
      <IsDefault>false</IsDefault>
      <HasEmbeddedReports>false</HasEmbeddedReports>
      <HtmlFileName>R25.htm</HtmlFileName>
      <LongName>40202 - Disclosure - Other comprehensive income (loss) - Other Comprehensive Income (Loss) and Related Tax Effects (Details)</LongName>
      <ReportType>Sheet</ReportType>
      <Role>http://imetrix.edgar-online.com/role/DisclosureOtherComprehensiveIncomeLossOtherComprehensiveIncomeLossAndRelatedTaxEffectsDetails</Role>
      <ShortName>Other comprehensive income (loss) - Other Comprehensive Income (Loss) and Related Tax Effects (Details)</ShortName>
      <MenuCategory>Details</MenuCategory>
      <ParentRole>http://imetrix.edgar-online.com/role/DisclosureOtherComprehensiveIncomeLossTables</ParentRole>
      <Position>25</Position>
    </Report>
    <Report instance="pfis-20160630.xml">
      <IsDefault>false</IsDefault>
      <HasEmbeddedReports>false</HasEmbeddedReports>
      <HtmlFileName>R26.htm</HtmlFileName>
      <LongName>40301 - Disclosure - Earnings per share - Shares Considered Anti-dilutive (Details)</LongName>
      <ReportType>Sheet</ReportType>
      <Role>http://imetrix.edgar-online.com/role/DisclosureEarningsPerShareSharesConsideredAntiDilutiveDetails</Role>
      <ShortName>Earnings per share - Shares Considered Anti-dilutive (Details)</ShortName>
      <MenuCategory>Details</MenuCategory>
      <Position>26</Position>
    </Report>
    <Report instance="pfis-20160630.xml">
      <IsDefault>false</IsDefault>
      <HasEmbeddedReports>false</HasEmbeddedReports>
      <HtmlFileName>R27.htm</HtmlFileName>
      <LongName>40302 - Disclosure - Earnings per share - Schedule of Earnings per Share (Details)</LongName>
      <ReportType>Sheet</ReportType>
      <Role>http://imetrix.edgar-online.com/role/DisclosureEarningsPerShareScheduleOfEarningsPerShareDetails</Role>
      <ShortName>Earnings per share - Schedule of Earnings per Share (Details)</ShortName>
      <MenuCategory>Details</MenuCategory>
      <Position>27</Position>
    </Report>
    <Report instance="pfis-20160630.xml">
      <IsDefault>false</IsDefault>
      <HasEmbeddedReports>false</HasEmbeddedReports>
      <HtmlFileName>R28.htm</HtmlFileName>
      <LongName>40401 - Disclosure - Investment securities - Amortized Cost and Fair Value of Investment Securities Aggregated by Investment Category (Details)</LongName>
      <ReportType>Sheet</ReportType>
      <Role>http://imetrix.edgar-online.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>28</Position>
    </Report>
    <Report instance="pfis-20160630.xml">
      <IsDefault>false</IsDefault>
      <HasEmbeddedReports>false</HasEmbeddedReports>
      <HtmlFileName>R29.htm</HtmlFileName>
      <LongName>40402 - Disclosure - Investment securities - Maturity Distribution of Debt Securities Classified as Available-for-Sale (Details)</LongName>
      <ReportType>Sheet</ReportType>
      <Role>http://imetrix.edgar-online.com/role/DisclosureInvestmentSecuritiesMaturityDistributionOfDebtSecuritiesClassifiedAsAvailableForSaleDetails</Role>
      <ShortName>Investment securities - Maturity Distribution of Debt Securities Classified as Available-for-Sale (Details)</ShortName>
      <MenuCategory>Details</MenuCategory>
      <Position>29</Position>
    </Report>
    <Report instance="pfis-20160630.xml">
      <IsDefault>false</IsDefault>
      <HasEmbeddedReports>false</HasEmbeddedReports>
      <HtmlFileName>R30.htm</HtmlFileName>
      <LongName>40403 - Disclosure - Investment securities - Summary of Amortized Cost and Fair Value of Securities by Contractual Maturity (Details)</LongName>
      <ReportType>Sheet</ReportType>
      <Role>http://imetrix.edgar-online.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>30</Position>
    </Report>
    <Report instance="pfis-20160630.xml">
      <IsDefault>false</IsDefault>
      <HasEmbeddedReports>false</HasEmbeddedReports>
      <HtmlFileName>R31.htm</HtmlFileName>
      <LongName>40404 - Disclosure - Investment securities - Additional Information (Details)</LongName>
      <ReportType>Sheet</ReportType>
      <Role>http://imetrix.edgar-online.com/role/DisclosureInvestmentSecuritiesAdditionalInformationDetails</Role>
      <ShortName>Investment securities - Additional Information (Details)</ShortName>
      <MenuCategory>Details</MenuCategory>
      <Position>31</Position>
    </Report>
    <Report instance="pfis-20160630.xml">
      <IsDefault>false</IsDefault>
      <HasEmbeddedReports>false</HasEmbeddedReports>
      <HtmlFileName>R32.htm</HtmlFileName>
      <LongName>40405 - Disclosure - Investment securities - Fair Value and Unrealized Losses of Investment Securities in Continuous Unrealized Loss Position (Details)</LongName>
      <ReportType>Sheet</ReportType>
      <Role>http://imetrix.edgar-online.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>32</Position>
    </Report>
    <Report instance="pfis-20160630.xml">
      <IsDefault>false</IsDefault>
      <HasEmbeddedReports>false</HasEmbeddedReports>
      <HtmlFileName>R33.htm</HtmlFileName>
      <LongName>40501 - Disclosure - Loans, net and allowance for loan losses - Additional Information (Details)</LongName>
      <ReportType>Sheet</ReportType>
      <Role>http://imetrix.edgar-online.com/role/DisclosureLoansNetAndAllowanceForLoanLossesAdditionalInformationDetails</Role>
      <ShortName>Loans, net and allowance for loan losses - Additional Information (Details)</ShortName>
      <MenuCategory>Details</MenuCategory>
      <Position>33</Position>
    </Report>
    <Report instance="pfis-20160630.xml">
      <IsDefault>false</IsDefault>
      <HasEmbeddedReports>false</HasEmbeddedReports>
      <HtmlFileName>R34.htm</HtmlFileName>
      <LongName>40502 - Disclosure - Loans, net and allowance for loan losses - Major Classifications of Loans Outstanding (Details)</LongName>
      <ReportType>Sheet</ReportType>
      <Role>http://imetrix.edgar-online.com/role/DisclosureLoansNetAndAllowanceForLoanLossesMajorClassificationsOfLoansOutstandingDetails</Role>
      <ShortName>Loans, net and allowance for loan losses - Major Classifications of Loans Outstanding (Details)</ShortName>
      <MenuCategory>Details</MenuCategory>
      <Position>34</Position>
    </Report>
    <Report instance="pfis-20160630.xml">
      <IsDefault>false</IsDefault>
      <HasEmbeddedReports>false</HasEmbeddedReports>
      <HtmlFileName>R35.htm</HtmlFileName>
      <LongName>40503 - Disclosure - Loans, net and allowance for loan losses - Changes in Allowance for Loan Losses Account by Major Classification of Loans (Details)</LongName>
      <ReportType>Sheet</ReportType>
      <Role>http://imetrix.edgar-online.com/role/DisclosureLoansNetAndAllowanceForLoanLossesChangesInAllowanceForLoanLossesAccountByMajorClassificationOfLoansDetails</Role>
      <ShortName>Loans, net and allowance for loan losses - Changes in Allowance for Loan Losses Account by Major Classification of Loans (Details)</ShortName>
      <MenuCategory>Details</MenuCategory>
      <Position>35</Position>
    </Report>
    <Report instance="pfis-20160630.xml">
      <IsDefault>false</IsDefault>
      <HasEmbeddedReports>false</HasEmbeddedReports>
      <HtmlFileName>R36.htm</HtmlFileName>
      <LongName>40504 - Disclosure - Loans, net and allowance for loan losses - Allocation of Allowance for Loan Losses and Related Loans by Major Classification of Loans (Details)</LongName>
      <ReportType>Sheet</ReportType>
      <Role>http://imetrix.edgar-online.com/role/DisclosureLoansNetAndAllowanceForLoanLossesAllocationOfAllowanceForLoanLossesAndRelatedLoansByMajorClassificationOfLoansDetails</Role>
      <ShortName>Loans, net and allowance for loan losses - Allocation of Allowance for Loan Losses and Related Loans by Major Classification of Loans (Details)</ShortName>
      <MenuCategory>Details</MenuCategory>
      <Position>36</Position>
    </Report>
    <Report instance="pfis-20160630.xml">
      <IsDefault>false</IsDefault>
      <HasEmbeddedReports>false</HasEmbeddedReports>
      <HtmlFileName>R37.htm</HtmlFileName>
      <LongName>40505 - Disclosure - Loans, net and allowance for loan losses - Major Classification of Loans Portfolio Summarized by Credit Quality (Details)</LongName>
      <ReportType>Sheet</ReportType>
      <Role>http://imetrix.edgar-online.com/role/DisclosureLoansNetAndAllowanceForLoanLossesMajorClassificationOfLoansPortfolioSummarizedByCreditQualityDetails</Role>
      <ShortName>Loans, net and allowance for loan losses - Major Classification of Loans Portfolio Summarized by Credit Quality (Details)</ShortName>
      <MenuCategory>Details</MenuCategory>
      <Position>37</Position>
    </Report>
    <Report instance="pfis-20160630.xml">
      <IsDefault>false</IsDefault>
      <HasEmbeddedReports>false</HasEmbeddedReports>
      <HtmlFileName>R38.htm</HtmlFileName>
      <LongName>40506 - Disclosure - Loans, net and allowance for loan losses - Information Concerning Nonaccrual Loans by Major Loan Classification (Details)</LongName>
      <ReportType>Sheet</ReportType>
      <Role>http://imetrix.edgar-online.com/role/DisclosureLoansNetAndAllowanceForLoanLossesInformationConcerningNonaccrualLoansByMajorLoanClassificationDetails</Role>
      <ShortName>Loans, net and allowance for loan losses - Information Concerning Nonaccrual Loans by Major Loan Classification (Details)</ShortName>
      <MenuCategory>Details</MenuCategory>
      <Position>38</Position>
    </Report>
    <Report instance="pfis-20160630.xml">
      <IsDefault>false</IsDefault>
      <HasEmbeddedReports>false</HasEmbeddedReports>
      <HtmlFileName>R39.htm</HtmlFileName>
      <LongName>40507 - Disclosure - Loans, net and allowance for loan losses - Major Classification of Loans by Past Due Status (Details)</LongName>
      <ReportType>Sheet</ReportType>
      <Role>http://imetrix.edgar-online.com/role/DisclosureLoansNetAndAllowanceForLoanLossesMajorClassificationOfLoansByPastDueStatusDetails</Role>
      <ShortName>Loans, net and allowance for loan losses - Major Classification of Loans by Past Due Status (Details)</ShortName>
      <MenuCategory>Details</MenuCategory>
      <Position>39</Position>
    </Report>
    <Report instance="pfis-20160630.xml">
      <IsDefault>false</IsDefault>
      <HasEmbeddedReports>false</HasEmbeddedReports>
      <HtmlFileName>R40.htm</HtmlFileName>
      <LongName>40508 - Disclosure - Loans, net and allowance for loan losses - Summarize Information in Concerning to Impaired Loans (Details)</LongName>
      <ReportType>Sheet</ReportType>
      <Role>http://imetrix.edgar-online.com/role/DisclosureLoansNetAndAllowanceForLoanLossesSummarizeInformationInConcerningToImpairedLoansDetails</Role>
      <ShortName>Loans, net and allowance for loan losses - Summarize Information in Concerning to Impaired Loans (Details)</ShortName>
      <MenuCategory>Details</MenuCategory>
      <Position>40</Position>
    </Report>
    <Report instance="pfis-20160630.xml">
      <IsDefault>false</IsDefault>
      <HasEmbeddedReports>false</HasEmbeddedReports>
      <HtmlFileName>R41.htm</HtmlFileName>
      <LongName>40601 - Disclosure - Other assets - Components of Other Assets (Details)</LongName>
      <ReportType>Sheet</ReportType>
      <Role>http://imetrix.edgar-online.com/role/DisclosureOtherAssetsComponentsOfOtherAssetsDetails</Role>
      <ShortName>Other assets - Components of Other Assets (Details)</ShortName>
      <MenuCategory>Details</MenuCategory>
      <Position>41</Position>
    </Report>
    <Report instance="pfis-20160630.xml">
      <IsDefault>false</IsDefault>
      <HasEmbeddedReports>false</HasEmbeddedReports>
      <HtmlFileName>R42.htm</HtmlFileName>
      <LongName>40701 - Disclosure - Fair value estimates - Additional Information (Details)</LongName>
      <ReportType>Sheet</ReportType>
      <Role>http://imetrix.edgar-online.com/role/DisclosureFairValueEstimatesAdditionalInformationDetails</Role>
      <ShortName>Fair value estimates - Additional Information (Details)</ShortName>
      <MenuCategory>Details</MenuCategory>
      <Position>42</Position>
    </Report>
    <Report instance="pfis-20160630.xml">
      <IsDefault>false</IsDefault>
      <HasEmbeddedReports>false</HasEmbeddedReports>
      <HtmlFileName>R43.htm</HtmlFileName>
      <LongName>40702 - Disclosure - Fair value estimates - Schedule of Assets and Liabilities Measured at Fair Value on Recurring Basis (Details)</LongName>
      <ReportType>Sheet</ReportType>
      <Role>http://imetrix.edgar-online.com/role/DisclosureFairValueEstimatesScheduleOfAssetsAndLiabilitiesMeasuredAtFairValueOnRecurringBasisDetails</Role>
      <ShortName>Fair value estimates - Schedule of Assets and Liabilities Measured at Fair Value on Recurring Basis (Details)</ShortName>
      <MenuCategory>Details</MenuCategory>
      <Position>43</Position>
    </Report>
    <Report instance="pfis-20160630.xml">
      <IsDefault>false</IsDefault>
      <HasEmbeddedReports>false</HasEmbeddedReports>
      <HtmlFileName>R44.htm</HtmlFileName>
      <LongName>40703 - Disclosure - Fair value estimates - Schedule of Assets and Liabilities Measured at Fair Value on Nonrecurring Basis (Details)</LongName>
      <ReportType>Sheet</ReportType>
      <Role>http://imetrix.edgar-online.com/role/DisclosureFairValueEstimatesScheduleOfAssetsAndLiabilitiesMeasuredAtFairValueOnNonrecurringBasisDetails</Role>
      <ShortName>Fair value estimates - Schedule of Assets and Liabilities Measured at Fair Value on Nonrecurring Basis (Details)</ShortName>
      <MenuCategory>Details</MenuCategory>
      <Position>44</Position>
    </Report>
    <Report instance="pfis-20160630.xml">
      <IsDefault>false</IsDefault>
      <HasEmbeddedReports>false</HasEmbeddedReports>
      <HtmlFileName>R45.htm</HtmlFileName>
      <LongName>40704 - Disclosure - Fair value estimates - Additional Quantitative Information about Assets Measured at Fair Value on Nonrecurring Basis (Details)</LongName>
      <ReportType>Sheet</ReportType>
      <Role>http://imetrix.edgar-online.com/role/DisclosureFairValueEstimatesAdditionalQuantitativeInformationAboutAssetsMeasuredAtFairValueOnNonrecurringBasisDetails</Role>
      <ShortName>Fair value estimates - Additional Quantitative Information about Assets Measured at Fair Value on Nonrecurring Basis (Details)</ShortName>
      <MenuCategory>Details</MenuCategory>
      <Position>45</Position>
    </Report>
    <Report instance="pfis-20160630.xml">
      <IsDefault>false</IsDefault>
      <HasEmbeddedReports>false</HasEmbeddedReports>
      <HtmlFileName>R46.htm</HtmlFileName>
      <LongName>40705 - Disclosure - Fair value estimates - Carrying and Fair Values of Financial Instruments (Details)</LongName>
      <ReportType>Sheet</ReportType>
      <Role>http://imetrix.edgar-online.com/role/DisclosureFairValueEstimatesCarryingAndFairValuesOfFinancialInstrumentsDetails</Role>
      <ShortName>Fair value estimates - Carrying and Fair Values of Financial Instruments (Details)</ShortName>
      <MenuCategory>Details</MenuCategory>
      <Position>46</Position>
    </Report>
    <Report instance="pfis-20160630.xml">
      <IsDefault>false</IsDefault>
      <HasEmbeddedReports>false</HasEmbeddedReports>
      <HtmlFileName>R47.htm</HtmlFileName>
      <LongName>40801 - Disclosure - Employee benefit plans - Salaries and Employee Benefits Expense (Details)</LongName>
      <ReportType>Sheet</ReportType>
      <Role>http://imetrix.edgar-online.com/role/DisclosureEmployeeBenefitPlansSalariesAndEmployeeBenefitsExpenseDetails</Role>
      <ShortName>Employee benefit plans - Salaries and Employee Benefits Expense (Details)</ShortName>
      <MenuCategory>Details</MenuCategory>
      <Position>47</Position>
    </Report>
    <Report instance="pfis-20160630.xml">
      <IsDefault>false</IsDefault>
      <HasEmbeddedReports>false</HasEmbeddedReports>
      <HtmlFileName>R48.htm</HtmlFileName>
      <LongName>40802 - Disclosure - Employee benefit plans - Net Periodic Pension Cost (Details)</LongName>
      <ReportType>Sheet</ReportType>
      <Role>http://imetrix.edgar-online.com/role/DisclosureEmployeeBenefitPlansNetPeriodicPensionCostDetails</Role>
      <ShortName>Employee benefit plans - Net Periodic Pension Cost (Details)</ShortName>
      <MenuCategory>Details</MenuCategory>
      <Position>48</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-20160630.xml</File>
    <File>pfis-20160630.xsd</File>
    <File>pfis-20160630_cal.xml</File>
    <File>pfis-20160630_def.xml</File>
    <File>pfis-20160630_lab.xml</File>
    <File>pfis-20160630_pre.xml</File>
  </InputFiles>
  <SupplementalFiles/>
  <BaseTaxonomies/>
  <HasPresentationLinkbase>true</HasPresentationLinkbase>
  <HasCalculationLinkbase>true</HasCalculationLinkbase>
</FilingSummary>
