<?xml version='1.0' encoding='utf-8'?>
<FilingSummary>
  <Version>3.22.4</Version>
  <ProcessingTime/>
  <ReportFormat>html</ReportFormat>
  <ContextCount>283</ContextCount>
  <ElementCount>430</ElementCount>
  <EntityCount>1</EntityCount>
  <FootnotesReported>true</FootnotesReported>
  <SegmentCount>101</SegmentCount>
  <ScenarioCount>0</ScenarioCount>
  <TuplesReported>false</TuplesReported>
  <UnitCount>12</UnitCount>
  <MyReports>
    <Report instance="form10k.htm">
      <IsDefault>false</IsDefault>
      <HasEmbeddedReports>false</HasEmbeddedReports>
      <HtmlFileName>R1.htm</HtmlFileName>
      <LongName>000100 - Document - Document and Entity Information</LongName>
      <ReportType>Sheet</ReportType>
      <Role>http://yorkwater.com/role/DocumentAndEntityInformation</Role>
      <ShortName>Document and Entity Information</ShortName>
      <MenuCategory>Cover</MenuCategory>
      <Position>1</Position>
    </Report>
    <Report instance="form10k.htm">
      <IsDefault>false</IsDefault>
      <HasEmbeddedReports>false</HasEmbeddedReports>
      <HtmlFileName>R2.htm</HtmlFileName>
      <LongName>010000 - Statement - Balance Sheets</LongName>
      <ReportType>Sheet</ReportType>
      <Role>http://yorkwater.com/role/BalanceSheets</Role>
      <ShortName>Balance Sheets</ShortName>
      <MenuCategory>Statements</MenuCategory>
      <Position>2</Position>
    </Report>
    <Report instance="form10k.htm">
      <IsDefault>false</IsDefault>
      <HasEmbeddedReports>false</HasEmbeddedReports>
      <HtmlFileName>R3.htm</HtmlFileName>
      <LongName>010100 - Statement - Balance Sheets (Parenthetical)</LongName>
      <ReportType>Sheet</ReportType>
      <Role>http://yorkwater.com/role/BalanceSheetsParenthetical</Role>
      <ShortName>Balance Sheets (Parenthetical)</ShortName>
      <MenuCategory>Statements</MenuCategory>
      <Position>3</Position>
    </Report>
    <Report instance="form10k.htm">
      <IsDefault>false</IsDefault>
      <HasEmbeddedReports>false</HasEmbeddedReports>
      <HtmlFileName>R4.htm</HtmlFileName>
      <LongName>020000 - Statement - Statements of Income</LongName>
      <ReportType>Sheet</ReportType>
      <Role>http://yorkwater.com/role/StatementsOfIncome</Role>
      <ShortName>Statements of Income</ShortName>
      <MenuCategory>Statements</MenuCategory>
      <Position>4</Position>
    </Report>
    <Report instance="form10k.htm">
      <IsDefault>false</IsDefault>
      <HasEmbeddedReports>false</HasEmbeddedReports>
      <HtmlFileName>R5.htm</HtmlFileName>
      <LongName>030000 - Statement - Statements of Common Stockholders' Equity</LongName>
      <ReportType>Sheet</ReportType>
      <Role>http://yorkwater.com/role/StatementsOfCommonStockholdersEquity</Role>
      <ShortName>Statements of Common Stockholders' Equity</ShortName>
      <MenuCategory>Statements</MenuCategory>
      <Position>5</Position>
    </Report>
    <Report instance="form10k.htm">
      <IsDefault>false</IsDefault>
      <HasEmbeddedReports>false</HasEmbeddedReports>
      <HtmlFileName>R6.htm</HtmlFileName>
      <LongName>030100 - Statement - Statements of Common Stockholders' Equity (Parenthetical)</LongName>
      <ReportType>Sheet</ReportType>
      <Role>http://yorkwater.com/role/StatementsOfCommonStockholdersEquityParenthetical</Role>
      <ShortName>Statements of Common Stockholders' Equity (Parenthetical)</ShortName>
      <MenuCategory>Statements</MenuCategory>
      <Position>6</Position>
    </Report>
    <Report instance="form10k.htm">
      <IsDefault>false</IsDefault>
      <HasEmbeddedReports>false</HasEmbeddedReports>
      <HtmlFileName>R7.htm</HtmlFileName>
      <LongName>040000 - Statement - Statements of Cash Flows</LongName>
      <ReportType>Sheet</ReportType>
      <Role>http://yorkwater.com/role/StatementsOfCashFlows</Role>
      <ShortName>Statements of Cash Flows</ShortName>
      <MenuCategory>Statements</MenuCategory>
      <Position>7</Position>
    </Report>
    <Report instance="form10k.htm">
      <IsDefault>false</IsDefault>
      <HasEmbeddedReports>false</HasEmbeddedReports>
      <HtmlFileName>R8.htm</HtmlFileName>
      <LongName>040100 - Statement - Statements of Cash Flows (Parenthetical)</LongName>
      <ReportType>Sheet</ReportType>
      <Role>http://yorkwater.com/role/StatementsOfCashFlowsParenthetical</Role>
      <ShortName>Statements of Cash Flows (Parenthetical)</ShortName>
      <MenuCategory>Statements</MenuCategory>
      <Position>8</Position>
    </Report>
    <Report instance="form10k.htm">
      <IsDefault>false</IsDefault>
      <HasEmbeddedReports>false</HasEmbeddedReports>
      <HtmlFileName>R9.htm</HtmlFileName>
      <LongName>060100 - Disclosure - Significant Accounting Policies</LongName>
      <ReportType>Sheet</ReportType>
      <Role>http://yorkwater.com/role/SignificantAccountingPolicies</Role>
      <ShortName>Significant Accounting Policies</ShortName>
      <MenuCategory>Notes</MenuCategory>
      <Position>9</Position>
    </Report>
    <Report instance="form10k.htm">
      <IsDefault>false</IsDefault>
      <HasEmbeddedReports>false</HasEmbeddedReports>
      <HtmlFileName>R10.htm</HtmlFileName>
      <LongName>060200 - Disclosure - Acquisitions</LongName>
      <ReportType>Sheet</ReportType>
      <Role>http://yorkwater.com/role/Acquisitions</Role>
      <ShortName>Acquisitions</ShortName>
      <MenuCategory>Notes</MenuCategory>
      <Position>10</Position>
    </Report>
    <Report instance="form10k.htm">
      <IsDefault>false</IsDefault>
      <HasEmbeddedReports>false</HasEmbeddedReports>
      <HtmlFileName>R11.htm</HtmlFileName>
      <LongName>060300 - Disclosure - Accounts Receivable and Contract Assets</LongName>
      <ReportType>Sheet</ReportType>
      <Role>http://yorkwater.com/role/AccountsReceivableAndContractAssets</Role>
      <ShortName>Accounts Receivable and Contract Assets</ShortName>
      <MenuCategory>Notes</MenuCategory>
      <Position>11</Position>
    </Report>
    <Report instance="form10k.htm">
      <IsDefault>false</IsDefault>
      <HasEmbeddedReports>false</HasEmbeddedReports>
      <HtmlFileName>R12.htm</HtmlFileName>
      <LongName>060400 - Disclosure - Note Receivable and Customers' Advances for Construction</LongName>
      <ReportType>Sheet</ReportType>
      <Role>http://yorkwater.com/role/NoteReceivableAndCustomersAdvancesForConstruction</Role>
      <ShortName>Note Receivable and Customers' Advances for Construction</ShortName>
      <MenuCategory>Notes</MenuCategory>
      <Position>12</Position>
    </Report>
    <Report instance="form10k.htm">
      <IsDefault>false</IsDefault>
      <HasEmbeddedReports>false</HasEmbeddedReports>
      <HtmlFileName>R13.htm</HtmlFileName>
      <LongName>060500 - Disclosure - Common Stock and Earnings Per Share</LongName>
      <ReportType>Sheet</ReportType>
      <Role>http://yorkwater.com/role/CommonStockAndEarningsPerShare</Role>
      <ShortName>Common Stock and Earnings Per Share</ShortName>
      <MenuCategory>Notes</MenuCategory>
      <Position>13</Position>
    </Report>
    <Report instance="form10k.htm">
      <IsDefault>false</IsDefault>
      <HasEmbeddedReports>false</HasEmbeddedReports>
      <HtmlFileName>R14.htm</HtmlFileName>
      <LongName>060600 - Disclosure - Long-Term Debt and Short-Term Borrowings</LongName>
      <ReportType>Sheet</ReportType>
      <Role>http://yorkwater.com/role/LongtermDebtAndShorttermBorrowings</Role>
      <ShortName>Long-Term Debt and Short-Term Borrowings</ShortName>
      <MenuCategory>Notes</MenuCategory>
      <Position>14</Position>
    </Report>
    <Report instance="form10k.htm">
      <IsDefault>false</IsDefault>
      <HasEmbeddedReports>false</HasEmbeddedReports>
      <HtmlFileName>R15.htm</HtmlFileName>
      <LongName>060700 - Disclosure - Fair Value of Financial Instruments</LongName>
      <ReportType>Sheet</ReportType>
      <Role>http://yorkwater.com/role/FairValueOfFinancialInstruments</Role>
      <ShortName>Fair Value of Financial Instruments</ShortName>
      <MenuCategory>Notes</MenuCategory>
      <Position>15</Position>
    </Report>
    <Report instance="form10k.htm">
      <IsDefault>false</IsDefault>
      <HasEmbeddedReports>false</HasEmbeddedReports>
      <HtmlFileName>R16.htm</HtmlFileName>
      <LongName>060800 - Disclosure - Commitments</LongName>
      <ReportType>Sheet</ReportType>
      <Role>http://yorkwater.com/role/Commitments</Role>
      <ShortName>Commitments</ShortName>
      <MenuCategory>Notes</MenuCategory>
      <Position>16</Position>
    </Report>
    <Report instance="form10k.htm">
      <IsDefault>false</IsDefault>
      <HasEmbeddedReports>false</HasEmbeddedReports>
      <HtmlFileName>R17.htm</HtmlFileName>
      <LongName>060900 - Disclosure - Revenue</LongName>
      <ReportType>Sheet</ReportType>
      <Role>http://yorkwater.com/role/Revenue</Role>
      <ShortName>Revenue</ShortName>
      <MenuCategory>Notes</MenuCategory>
      <Position>17</Position>
    </Report>
    <Report instance="form10k.htm">
      <IsDefault>false</IsDefault>
      <HasEmbeddedReports>false</HasEmbeddedReports>
      <HtmlFileName>R18.htm</HtmlFileName>
      <LongName>061000 - Disclosure - Rate Matters</LongName>
      <ReportType>Sheet</ReportType>
      <Role>http://yorkwater.com/role/RateMatters</Role>
      <ShortName>Rate Matters</ShortName>
      <MenuCategory>Notes</MenuCategory>
      <Position>18</Position>
    </Report>
    <Report instance="form10k.htm">
      <IsDefault>false</IsDefault>
      <HasEmbeddedReports>false</HasEmbeddedReports>
      <HtmlFileName>R19.htm</HtmlFileName>
      <LongName>061100 - Disclosure - Employee Benefit Plans</LongName>
      <ReportType>Sheet</ReportType>
      <Role>http://yorkwater.com/role/EmployeeBenefitPlans</Role>
      <ShortName>Employee Benefit Plans</ShortName>
      <MenuCategory>Notes</MenuCategory>
      <Position>19</Position>
    </Report>
    <Report instance="form10k.htm">
      <IsDefault>false</IsDefault>
      <HasEmbeddedReports>false</HasEmbeddedReports>
      <HtmlFileName>R20.htm</HtmlFileName>
      <LongName>061200 - Disclosure - Stock-Based Compensation</LongName>
      <ReportType>Sheet</ReportType>
      <Role>http://yorkwater.com/role/StockbasedCompensation</Role>
      <ShortName>Stock-Based Compensation</ShortName>
      <MenuCategory>Notes</MenuCategory>
      <Position>20</Position>
    </Report>
    <Report instance="form10k.htm">
      <IsDefault>false</IsDefault>
      <HasEmbeddedReports>false</HasEmbeddedReports>
      <HtmlFileName>R21.htm</HtmlFileName>
      <LongName>061300 - Disclosure - Taxes Other than Income Taxes</LongName>
      <ReportType>Sheet</ReportType>
      <Role>http://yorkwater.com/role/TaxesOtherThanIncomeTaxes</Role>
      <ShortName>Taxes Other than Income Taxes</ShortName>
      <MenuCategory>Notes</MenuCategory>
      <Position>21</Position>
    </Report>
    <Report instance="form10k.htm">
      <IsDefault>false</IsDefault>
      <HasEmbeddedReports>false</HasEmbeddedReports>
      <HtmlFileName>R22.htm</HtmlFileName>
      <LongName>061400 - Disclosure - Income Taxes</LongName>
      <ReportType>Sheet</ReportType>
      <Role>http://yorkwater.com/role/IncomeTaxes</Role>
      <ShortName>Income Taxes</ShortName>
      <MenuCategory>Notes</MenuCategory>
      <Position>22</Position>
    </Report>
    <Report instance="form10k.htm">
      <IsDefault>false</IsDefault>
      <HasEmbeddedReports>false</HasEmbeddedReports>
      <HtmlFileName>R23.htm</HtmlFileName>
      <LongName>061500 - Disclosure - Subsequent Event</LongName>
      <ReportType>Sheet</ReportType>
      <Role>http://yorkwater.com/role/SubsequentEvent</Role>
      <ShortName>Subsequent Event</ShortName>
      <MenuCategory>Notes</MenuCategory>
      <Position>23</Position>
    </Report>
    <Report instance="form10k.htm">
      <IsDefault>false</IsDefault>
      <HasEmbeddedReports>false</HasEmbeddedReports>
      <HtmlFileName>R24.htm</HtmlFileName>
      <LongName>061600 - Schedule - Schedule II - Valuation and Qualifying Accounts</LongName>
      <ReportType>Sheet</ReportType>
      <Role>http://yorkwater.com/role/ScheduleIiValuationAndQualifyingAccounts</Role>
      <ShortName>Schedule II - Valuation and Qualifying Accounts</ShortName>
      <MenuCategory>Uncategorized</MenuCategory>
      <Position>24</Position>
    </Report>
    <Report instance="form10k.htm">
      <IsDefault>false</IsDefault>
      <HasEmbeddedReports>false</HasEmbeddedReports>
      <HtmlFileName>R25.htm</HtmlFileName>
      <LongName>070100 - Disclosure - Significant Accounting Policies (Policies)</LongName>
      <ReportType>Sheet</ReportType>
      <Role>http://yorkwater.com/role/SignificantAccountingPoliciesPolicies</Role>
      <ShortName>Significant Accounting Policies (Policies)</ShortName>
      <MenuCategory>Notes</MenuCategory>
      <Position>25</Position>
    </Report>
    <Report instance="form10k.htm">
      <IsDefault>false</IsDefault>
      <HasEmbeddedReports>false</HasEmbeddedReports>
      <HtmlFileName>R26.htm</HtmlFileName>
      <LongName>070900 - Disclosure - Revenue (Policies)</LongName>
      <ReportType>Sheet</ReportType>
      <Role>http://yorkwater.com/role/RevenuePolicies</Role>
      <ShortName>Revenue (Policies)</ShortName>
      <MenuCategory>Policies</MenuCategory>
      <ParentRole>http://yorkwater.com/role/SignificantAccountingPolicies</ParentRole>
      <Position>26</Position>
    </Report>
    <Report instance="form10k.htm">
      <IsDefault>false</IsDefault>
      <HasEmbeddedReports>false</HasEmbeddedReports>
      <HtmlFileName>R27.htm</HtmlFileName>
      <LongName>080100 - Disclosure - Significant Accounting Policies (Tables)</LongName>
      <ReportType>Sheet</ReportType>
      <Role>http://yorkwater.com/role/SignificantAccountingPoliciesTables</Role>
      <ShortName>Significant Accounting Policies (Tables)</ShortName>
      <MenuCategory>Tables</MenuCategory>
      <ParentRole>http://yorkwater.com/role/SignificantAccountingPolicies</ParentRole>
      <Position>27</Position>
    </Report>
    <Report instance="form10k.htm">
      <IsDefault>false</IsDefault>
      <HasEmbeddedReports>false</HasEmbeddedReports>
      <HtmlFileName>R28.htm</HtmlFileName>
      <LongName>080300 - Disclosure - Accounts Receivable and Contract Assets (Tables)</LongName>
      <ReportType>Sheet</ReportType>
      <Role>http://yorkwater.com/role/AccountsReceivableAndContractAssetsTables</Role>
      <ShortName>Accounts Receivable and Contract Assets (Tables)</ShortName>
      <MenuCategory>Tables</MenuCategory>
      <ParentRole>http://yorkwater.com/role/AccountsReceivableAndContractAssets</ParentRole>
      <Position>28</Position>
    </Report>
    <Report instance="form10k.htm">
      <IsDefault>false</IsDefault>
      <HasEmbeddedReports>false</HasEmbeddedReports>
      <HtmlFileName>R29.htm</HtmlFileName>
      <LongName>080400 - Disclosure - Note Receivable and Customers' Advances for Construction (Tables)</LongName>
      <ReportType>Sheet</ReportType>
      <Role>http://yorkwater.com/role/NoteReceivableAndCustomersAdvancesForConstructionTables</Role>
      <ShortName>Note Receivable and Customers' Advances for Construction (Tables)</ShortName>
      <MenuCategory>Tables</MenuCategory>
      <ParentRole>http://yorkwater.com/role/NoteReceivableAndCustomersAdvancesForConstruction</ParentRole>
      <Position>29</Position>
    </Report>
    <Report instance="form10k.htm">
      <IsDefault>false</IsDefault>
      <HasEmbeddedReports>false</HasEmbeddedReports>
      <HtmlFileName>R30.htm</HtmlFileName>
      <LongName>080500 - Disclosure - Common Stock and Earnings Per Share (Tables)</LongName>
      <ReportType>Sheet</ReportType>
      <Role>http://yorkwater.com/role/CommonStockAndEarningsPerShareTables</Role>
      <ShortName>Common Stock and Earnings Per Share (Tables)</ShortName>
      <MenuCategory>Tables</MenuCategory>
      <ParentRole>http://yorkwater.com/role/CommonStockAndEarningsPerShare</ParentRole>
      <Position>30</Position>
    </Report>
    <Report instance="form10k.htm">
      <IsDefault>false</IsDefault>
      <HasEmbeddedReports>false</HasEmbeddedReports>
      <HtmlFileName>R31.htm</HtmlFileName>
      <LongName>080600 - Disclosure - Long-Term Debt and Short-Term Borrowings (Tables)</LongName>
      <ReportType>Sheet</ReportType>
      <Role>http://yorkwater.com/role/LongtermDebtAndShorttermBorrowingsTables</Role>
      <ShortName>Long-Term Debt and Short-Term Borrowings (Tables)</ShortName>
      <MenuCategory>Tables</MenuCategory>
      <ParentRole>http://yorkwater.com/role/LongtermDebtAndShorttermBorrowings</ParentRole>
      <Position>31</Position>
    </Report>
    <Report instance="form10k.htm">
      <IsDefault>false</IsDefault>
      <HasEmbeddedReports>false</HasEmbeddedReports>
      <HtmlFileName>R32.htm</HtmlFileName>
      <LongName>080700 - Disclosure - Fair Value of Financial Instruments (Tables)</LongName>
      <ReportType>Sheet</ReportType>
      <Role>http://yorkwater.com/role/FairValueOfFinancialInstrumentsTables</Role>
      <ShortName>Fair Value of Financial Instruments (Tables)</ShortName>
      <MenuCategory>Tables</MenuCategory>
      <ParentRole>http://yorkwater.com/role/FairValueOfFinancialInstruments</ParentRole>
      <Position>32</Position>
    </Report>
    <Report instance="form10k.htm">
      <IsDefault>false</IsDefault>
      <HasEmbeddedReports>false</HasEmbeddedReports>
      <HtmlFileName>R33.htm</HtmlFileName>
      <LongName>080900 - Disclosure - Revenue (Tables)</LongName>
      <ReportType>Sheet</ReportType>
      <Role>http://yorkwater.com/role/RevenueTables</Role>
      <ShortName>Revenue (Tables)</ShortName>
      <MenuCategory>Tables</MenuCategory>
      <ParentRole>http://yorkwater.com/role/Revenue</ParentRole>
      <Position>33</Position>
    </Report>
    <Report instance="form10k.htm">
      <IsDefault>false</IsDefault>
      <HasEmbeddedReports>false</HasEmbeddedReports>
      <HtmlFileName>R34.htm</HtmlFileName>
      <LongName>081100 - Disclosure - Employee Benefit Plans (Tables)</LongName>
      <ReportType>Sheet</ReportType>
      <Role>http://yorkwater.com/role/EmployeeBenefitPlansTables</Role>
      <ShortName>Employee Benefit Plans (Tables)</ShortName>
      <MenuCategory>Tables</MenuCategory>
      <ParentRole>http://yorkwater.com/role/EmployeeBenefitPlans</ParentRole>
      <Position>34</Position>
    </Report>
    <Report instance="form10k.htm">
      <IsDefault>false</IsDefault>
      <HasEmbeddedReports>false</HasEmbeddedReports>
      <HtmlFileName>R35.htm</HtmlFileName>
      <LongName>081200 - Disclosure - Stock-Based Compensation (Tables)</LongName>
      <ReportType>Sheet</ReportType>
      <Role>http://yorkwater.com/role/StockbasedCompensationTables</Role>
      <ShortName>Stock-Based Compensation (Tables)</ShortName>
      <MenuCategory>Tables</MenuCategory>
      <ParentRole>http://yorkwater.com/role/StockbasedCompensation</ParentRole>
      <Position>35</Position>
    </Report>
    <Report instance="form10k.htm">
      <IsDefault>false</IsDefault>
      <HasEmbeddedReports>false</HasEmbeddedReports>
      <HtmlFileName>R36.htm</HtmlFileName>
      <LongName>081300 - Disclosure - Taxes Other than Income Taxes (Tables)</LongName>
      <ReportType>Sheet</ReportType>
      <Role>http://yorkwater.com/role/TaxesOtherThanIncomeTaxesTables</Role>
      <ShortName>Taxes Other than Income Taxes (Tables)</ShortName>
      <MenuCategory>Tables</MenuCategory>
      <ParentRole>http://yorkwater.com/role/TaxesOtherThanIncomeTaxes</ParentRole>
      <Position>36</Position>
    </Report>
    <Report instance="form10k.htm">
      <IsDefault>false</IsDefault>
      <HasEmbeddedReports>false</HasEmbeddedReports>
      <HtmlFileName>R37.htm</HtmlFileName>
      <LongName>081400 - Disclosure - Income Taxes (Tables)</LongName>
      <ReportType>Sheet</ReportType>
      <Role>http://yorkwater.com/role/IncomeTaxesTables</Role>
      <ShortName>Income Taxes (Tables)</ShortName>
      <MenuCategory>Tables</MenuCategory>
      <ParentRole>http://yorkwater.com/role/IncomeTaxes</ParentRole>
      <Position>37</Position>
    </Report>
    <Report instance="form10k.htm">
      <IsDefault>false</IsDefault>
      <HasEmbeddedReports>false</HasEmbeddedReports>
      <HtmlFileName>R38.htm</HtmlFileName>
      <LongName>090100 - Disclosure - Significant Accounting Policies, Utility Plant and Depreciation (Details)</LongName>
      <ReportType>Sheet</ReportType>
      <Role>http://yorkwater.com/role/SignificantAccountingPoliciesUtilityPlantAndDepreciationDetails</Role>
      <ShortName>Significant Accounting Policies, Utility Plant and Depreciation (Details)</ShortName>
      <MenuCategory>Details</MenuCategory>
      <Position>38</Position>
    </Report>
    <Report instance="form10k.htm">
      <IsDefault>false</IsDefault>
      <HasEmbeddedReports>false</HasEmbeddedReports>
      <HtmlFileName>R39.htm</HtmlFileName>
      <LongName>090102 - Disclosure - Significant Accounting Policies, Restricted Cash (Details)</LongName>
      <ReportType>Sheet</ReportType>
      <Role>http://yorkwater.com/role/SignificantAccountingPoliciesRestrictedCashDetails</Role>
      <ShortName>Significant Accounting Policies, Restricted Cash (Details)</ShortName>
      <MenuCategory>Details</MenuCategory>
      <Position>39</Position>
    </Report>
    <Report instance="form10k.htm">
      <IsDefault>false</IsDefault>
      <HasEmbeddedReports>false</HasEmbeddedReports>
      <HtmlFileName>R40.htm</HtmlFileName>
      <LongName>090104 - Disclosure - Significant Accounting Policies, Regulatory Assets and Liabilities (Details)</LongName>
      <ReportType>Sheet</ReportType>
      <Role>http://yorkwater.com/role/SignificantAccountingPoliciesRegulatoryAssetsAndLiabilitiesDetails</Role>
      <ShortName>Significant Accounting Policies, Regulatory Assets and Liabilities (Details)</ShortName>
      <MenuCategory>Details</MenuCategory>
      <Position>40</Position>
    </Report>
    <Report instance="form10k.htm">
      <IsDefault>false</IsDefault>
      <HasEmbeddedReports>false</HasEmbeddedReports>
      <HtmlFileName>R41.htm</HtmlFileName>
      <LongName>090106 - Disclosure - Significant Accounting Policies, Interest Rate Swap Agreement (Details)</LongName>
      <ReportType>Sheet</ReportType>
      <Role>http://yorkwater.com/role/SignificantAccountingPoliciesInterestRateSwapAgreementDetails</Role>
      <ShortName>Significant Accounting Policies, Interest Rate Swap Agreement (Details)</ShortName>
      <MenuCategory>Details</MenuCategory>
      <Position>41</Position>
    </Report>
    <Report instance="form10k.htm">
      <IsDefault>false</IsDefault>
      <HasEmbeddedReports>false</HasEmbeddedReports>
      <HtmlFileName>R42.htm</HtmlFileName>
      <LongName>090108 - Disclosure - Significant Accounting Policies, Income Taxes (Details)</LongName>
      <ReportType>Sheet</ReportType>
      <Role>http://yorkwater.com/role/SignificantAccountingPoliciesIncomeTaxesDetails</Role>
      <ShortName>Significant Accounting Policies, Income Taxes (Details)</ShortName>
      <MenuCategory>Details</MenuCategory>
      <Position>42</Position>
    </Report>
    <Report instance="form10k.htm">
      <IsDefault>false</IsDefault>
      <HasEmbeddedReports>false</HasEmbeddedReports>
      <HtmlFileName>R43.htm</HtmlFileName>
      <LongName>090110 - Disclosure - Significant Accounting Policies, Allowance for Funds Used During Construction (Details)</LongName>
      <ReportType>Sheet</ReportType>
      <Role>http://yorkwater.com/role/SignificantAccountingPoliciesAllowanceForFundsUsedDuringConstructionDetails</Role>
      <ShortName>Significant Accounting Policies, Allowance for Funds Used During Construction (Details)</ShortName>
      <MenuCategory>Details</MenuCategory>
      <Position>43</Position>
    </Report>
    <Report instance="form10k.htm">
      <IsDefault>false</IsDefault>
      <HasEmbeddedReports>false</HasEmbeddedReports>
      <HtmlFileName>R44.htm</HtmlFileName>
      <LongName>090200 - Disclosure - Acquisitions (Details)</LongName>
      <ReportType>Sheet</ReportType>
      <Role>http://yorkwater.com/role/AcquisitionsDetails</Role>
      <ShortName>Acquisitions (Details)</ShortName>
      <MenuCategory>Details</MenuCategory>
      <ParentRole>http://yorkwater.com/role/Acquisitions</ParentRole>
      <Position>44</Position>
    </Report>
    <Report instance="form10k.htm">
      <IsDefault>false</IsDefault>
      <HasEmbeddedReports>false</HasEmbeddedReports>
      <HtmlFileName>R45.htm</HtmlFileName>
      <LongName>090300 - Disclosure - Accounts Receivable and Contract Assets (Details)</LongName>
      <ReportType>Sheet</ReportType>
      <Role>http://yorkwater.com/role/AccountsReceivableAndContractAssetsDetails</Role>
      <ShortName>Accounts Receivable and Contract Assets (Details)</ShortName>
      <MenuCategory>Details</MenuCategory>
      <ParentRole>http://yorkwater.com/role/AccountsReceivableAndContractAssetsTables</ParentRole>
      <Position>45</Position>
    </Report>
    <Report instance="form10k.htm">
      <IsDefault>false</IsDefault>
      <HasEmbeddedReports>false</HasEmbeddedReports>
      <HtmlFileName>R46.htm</HtmlFileName>
      <LongName>090400 - Disclosure - Note Receivable and Customers' Advances for Construction (Details)</LongName>
      <ReportType>Sheet</ReportType>
      <Role>http://yorkwater.com/role/NoteReceivableAndCustomersAdvancesForConstructionDetails</Role>
      <ShortName>Note Receivable and Customers' Advances for Construction (Details)</ShortName>
      <MenuCategory>Details</MenuCategory>
      <ParentRole>http://yorkwater.com/role/NoteReceivableAndCustomersAdvancesForConstructionTables</ParentRole>
      <Position>46</Position>
    </Report>
    <Report instance="form10k.htm">
      <IsDefault>false</IsDefault>
      <HasEmbeddedReports>false</HasEmbeddedReports>
      <HtmlFileName>R47.htm</HtmlFileName>
      <LongName>090500 - Disclosure - Common Stock and Earnings Per Share (Details)</LongName>
      <ReportType>Sheet</ReportType>
      <Role>http://yorkwater.com/role/CommonStockAndEarningsPerShareDetails</Role>
      <ShortName>Common Stock and Earnings Per Share (Details)</ShortName>
      <MenuCategory>Details</MenuCategory>
      <ParentRole>http://yorkwater.com/role/CommonStockAndEarningsPerShareTables</ParentRole>
      <Position>47</Position>
    </Report>
    <Report instance="form10k.htm">
      <IsDefault>false</IsDefault>
      <HasEmbeddedReports>false</HasEmbeddedReports>
      <HtmlFileName>R48.htm</HtmlFileName>
      <LongName>090600 - Disclosure - Long-Term Debt and Short-Term Borrowings, Long-Term Debt (Details)</LongName>
      <ReportType>Sheet</ReportType>
      <Role>http://yorkwater.com/role/LongtermDebtAndShorttermBorrowingsLongtermDebtDetails</Role>
      <ShortName>Long-Term Debt and Short-Term Borrowings, Long-Term Debt (Details)</ShortName>
      <MenuCategory>Details</MenuCategory>
      <Position>48</Position>
    </Report>
    <Report instance="form10k.htm">
      <IsDefault>false</IsDefault>
      <HasEmbeddedReports>false</HasEmbeddedReports>
      <HtmlFileName>R49.htm</HtmlFileName>
      <LongName>090602 - Disclosure - Long-Term Debt and Short-Term Borrowings, Payments Due by Year (Details)</LongName>
      <ReportType>Sheet</ReportType>
      <Role>http://yorkwater.com/role/LongtermDebtAndShorttermBorrowingsPaymentsDueByYearDetails</Role>
      <ShortName>Long-Term Debt and Short-Term Borrowings, Payments Due by Year (Details)</ShortName>
      <MenuCategory>Details</MenuCategory>
      <Position>49</Position>
    </Report>
    <Report instance="form10k.htm">
      <IsDefault>false</IsDefault>
      <HasEmbeddedReports>false</HasEmbeddedReports>
      <HtmlFileName>R50.htm</HtmlFileName>
      <LongName>090604 - Disclosure - Long-Term Debt and Short-Term Borrowings, Fixed Rate Long-Term Debt (Details)</LongName>
      <ReportType>Sheet</ReportType>
      <Role>http://yorkwater.com/role/LongtermDebtAndShorttermBorrowingsFixedRateLongtermDebtDetails</Role>
      <ShortName>Long-Term Debt and Short-Term Borrowings, Fixed Rate Long-Term Debt (Details)</ShortName>
      <MenuCategory>Details</MenuCategory>
      <Position>50</Position>
    </Report>
    <Report instance="form10k.htm">
      <IsDefault>false</IsDefault>
      <HasEmbeddedReports>false</HasEmbeddedReports>
      <HtmlFileName>R51.htm</HtmlFileName>
      <LongName>090606 - Disclosure - Long-Term Debt and Short-Term Borrowings, Variable Rate Long-Term Debt (Details)</LongName>
      <ReportType>Sheet</ReportType>
      <Role>http://yorkwater.com/role/LongtermDebtAndShorttermBorrowingsVariableRateLongtermDebtDetails</Role>
      <ShortName>Long-Term Debt and Short-Term Borrowings, Variable Rate Long-Term Debt (Details)</ShortName>
      <MenuCategory>Details</MenuCategory>
      <Position>51</Position>
    </Report>
    <Report instance="form10k.htm">
      <IsDefault>false</IsDefault>
      <HasEmbeddedReports>false</HasEmbeddedReports>
      <HtmlFileName>R52.htm</HtmlFileName>
      <LongName>090608 - Disclosure - Long-Term Debt and Short-Term Borrowings, Interest Rate Swap Agreement (Details)</LongName>
      <ReportType>Sheet</ReportType>
      <Role>http://yorkwater.com/role/LongtermDebtAndShorttermBorrowingsInterestRateSwapAgreementDetails</Role>
      <ShortName>Long-Term Debt and Short-Term Borrowings, Interest Rate Swap Agreement (Details)</ShortName>
      <MenuCategory>Details</MenuCategory>
      <Position>52</Position>
    </Report>
    <Report instance="form10k.htm">
      <IsDefault>false</IsDefault>
      <HasEmbeddedReports>false</HasEmbeddedReports>
      <HtmlFileName>R53.htm</HtmlFileName>
      <LongName>090610 - Disclosure - Long-Term Debt and Short-Term Borrowings, Line of Credit Borrowings (Details)</LongName>
      <ReportType>Sheet</ReportType>
      <Role>http://yorkwater.com/role/LongtermDebtAndShorttermBorrowingsLineOfCreditBorrowingsDetails</Role>
      <ShortName>Long-Term Debt and Short-Term Borrowings, Line of Credit Borrowings (Details)</ShortName>
      <MenuCategory>Details</MenuCategory>
      <Position>53</Position>
    </Report>
    <Report instance="form10k.htm">
      <IsDefault>false</IsDefault>
      <HasEmbeddedReports>false</HasEmbeddedReports>
      <HtmlFileName>R54.htm</HtmlFileName>
      <LongName>090612 - Disclosure - Long-Term Debt and Short-Term Borrowings, Debt Covenants and Restrictions (Details)</LongName>
      <ReportType>Sheet</ReportType>
      <Role>http://yorkwater.com/role/LongtermDebtAndShorttermBorrowingsDebtCovenantsAndRestrictionsDetails</Role>
      <ShortName>Long-Term Debt and Short-Term Borrowings, Debt Covenants and Restrictions (Details)</ShortName>
      <MenuCategory>Details</MenuCategory>
      <Position>54</Position>
    </Report>
    <Report instance="form10k.htm">
      <IsDefault>false</IsDefault>
      <HasEmbeddedReports>false</HasEmbeddedReports>
      <HtmlFileName>R55.htm</HtmlFileName>
      <LongName>090700 - Disclosure - Fair Value of Financial Instruments (Details)</LongName>
      <ReportType>Sheet</ReportType>
      <Role>http://yorkwater.com/role/FairValueOfFinancialInstrumentsDetails</Role>
      <ShortName>Fair Value of Financial Instruments (Details)</ShortName>
      <MenuCategory>Details</MenuCategory>
      <ParentRole>http://yorkwater.com/role/FairValueOfFinancialInstrumentsTables</ParentRole>
      <Position>55</Position>
    </Report>
    <Report instance="form10k.htm">
      <IsDefault>false</IsDefault>
      <HasEmbeddedReports>false</HasEmbeddedReports>
      <HtmlFileName>R56.htm</HtmlFileName>
      <LongName>090800 - Disclosure - Commitments (Details)</LongName>
      <ReportType>Sheet</ReportType>
      <Role>http://yorkwater.com/role/CommitmentsDetails</Role>
      <ShortName>Commitments (Details)</ShortName>
      <MenuCategory>Details</MenuCategory>
      <ParentRole>http://yorkwater.com/role/Commitments</ParentRole>
      <Position>56</Position>
    </Report>
    <Report instance="form10k.htm">
      <IsDefault>false</IsDefault>
      <HasEmbeddedReports>false</HasEmbeddedReports>
      <HtmlFileName>R57.htm</HtmlFileName>
      <LongName>090900 - Disclosure - Revenue (Details)</LongName>
      <ReportType>Sheet</ReportType>
      <Role>http://yorkwater.com/role/RevenueDetails</Role>
      <ShortName>Revenue (Details)</ShortName>
      <MenuCategory>Details</MenuCategory>
      <ParentRole>http://yorkwater.com/role/RevenueTables</ParentRole>
      <Position>57</Position>
    </Report>
    <Report instance="form10k.htm">
      <IsDefault>false</IsDefault>
      <HasEmbeddedReports>false</HasEmbeddedReports>
      <HtmlFileName>R58.htm</HtmlFileName>
      <LongName>091000 - Disclosure - Rate Matters (Details)</LongName>
      <ReportType>Sheet</ReportType>
      <Role>http://yorkwater.com/role/RateMattersDetails</Role>
      <ShortName>Rate Matters (Details)</ShortName>
      <MenuCategory>Details</MenuCategory>
      <ParentRole>http://yorkwater.com/role/RateMatters</ParentRole>
      <Position>58</Position>
    </Report>
    <Report instance="form10k.htm">
      <IsDefault>false</IsDefault>
      <HasEmbeddedReports>false</HasEmbeddedReports>
      <HtmlFileName>R59.htm</HtmlFileName>
      <LongName>091100 - Disclosure - Employee Benefit Plans, Changes in Benefit Obligation and Plan Assets (Details)</LongName>
      <ReportType>Sheet</ReportType>
      <Role>http://yorkwater.com/role/EmployeeBenefitPlansChangesInBenefitObligationAndPlanAssetsDetails</Role>
      <ShortName>Employee Benefit Plans, Changes in Benefit Obligation and Plan Assets (Details)</ShortName>
      <MenuCategory>Details</MenuCategory>
      <Position>59</Position>
    </Report>
    <Report instance="form10k.htm">
      <IsDefault>false</IsDefault>
      <HasEmbeddedReports>false</HasEmbeddedReports>
      <HtmlFileName>R60.htm</HtmlFileName>
      <LongName>091102 - Disclosure - Employee Benefit Plans, Components of Net Periodic Benefit Cost (Details)</LongName>
      <ReportType>Sheet</ReportType>
      <Role>http://yorkwater.com/role/EmployeeBenefitPlansComponentsOfNetPeriodicBenefitCostDetails</Role>
      <ShortName>Employee Benefit Plans, Components of Net Periodic Benefit Cost (Details)</ShortName>
      <MenuCategory>Details</MenuCategory>
      <Position>60</Position>
    </Report>
    <Report instance="form10k.htm">
      <IsDefault>false</IsDefault>
      <HasEmbeddedReports>false</HasEmbeddedReports>
      <HtmlFileName>R61.htm</HtmlFileName>
      <LongName>091104 - Disclosure - Employee Benefit Plans, Benefit Payments Expected to be Paid (Details)</LongName>
      <ReportType>Sheet</ReportType>
      <Role>http://yorkwater.com/role/EmployeeBenefitPlansBenefitPaymentsExpectedToBePaidDetails</Role>
      <ShortName>Employee Benefit Plans, Benefit Payments Expected to be Paid (Details)</ShortName>
      <MenuCategory>Details</MenuCategory>
      <Position>61</Position>
    </Report>
    <Report instance="form10k.htm">
      <IsDefault>false</IsDefault>
      <HasEmbeddedReports>false</HasEmbeddedReports>
      <HtmlFileName>R62.htm</HtmlFileName>
      <LongName>091106 - Disclosure - Employee Benefit Plans, Projected Benefit Obligation, Accumulated Benefit Obligation and Fair Value of Plan Assets (Details)</LongName>
      <ReportType>Sheet</ReportType>
      <Role>http://yorkwater.com/role/EmployeeBenefitPlansProjectedBenefitObligationAccumulatedBenefitObligationAndFairValueOfPlanAssetsDetails</Role>
      <ShortName>Employee Benefit Plans, Projected Benefit Obligation, Accumulated Benefit Obligation and Fair Value of Plan Assets (Details)</ShortName>
      <MenuCategory>Details</MenuCategory>
      <Position>62</Position>
    </Report>
    <Report instance="form10k.htm">
      <IsDefault>false</IsDefault>
      <HasEmbeddedReports>false</HasEmbeddedReports>
      <HtmlFileName>R63.htm</HtmlFileName>
      <LongName>091108 - Disclosure - Employee Benefit Plans, Weighted-Average Assumptions Used (Details)</LongName>
      <ReportType>Sheet</ReportType>
      <Role>http://yorkwater.com/role/EmployeeBenefitPlansWeightedaverageAssumptionsUsedDetails</Role>
      <ShortName>Employee Benefit Plans, Weighted-Average Assumptions Used (Details)</ShortName>
      <MenuCategory>Details</MenuCategory>
      <Position>63</Position>
    </Report>
    <Report instance="form10k.htm">
      <IsDefault>false</IsDefault>
      <HasEmbeddedReports>false</HasEmbeddedReports>
      <HtmlFileName>R64.htm</HtmlFileName>
      <LongName>091110 - Disclosure - Employee Benefit Plans, Fair Values of Pension Plan Assets (Details)</LongName>
      <ReportType>Sheet</ReportType>
      <Role>http://yorkwater.com/role/EmployeeBenefitPlansFairValuesOfPensionPlanAssetsDetails</Role>
      <ShortName>Employee Benefit Plans, Fair Values of Pension Plan Assets (Details)</ShortName>
      <MenuCategory>Details</MenuCategory>
      <Position>64</Position>
    </Report>
    <Report instance="form10k.htm">
      <IsDefault>false</IsDefault>
      <HasEmbeddedReports>false</HasEmbeddedReports>
      <HtmlFileName>R65.htm</HtmlFileName>
      <LongName>091112 - Disclosure - Employee Benefit Plans, Defined Contribution Plan, Deferred Compensation and Other (Details)</LongName>
      <ReportType>Sheet</ReportType>
      <Role>http://yorkwater.com/role/EmployeeBenefitPlansDefinedContributionPlanDeferredCompensationAndOtherDetails</Role>
      <ShortName>Employee Benefit Plans, Defined Contribution Plan, Deferred Compensation and Other (Details)</ShortName>
      <MenuCategory>Details</MenuCategory>
      <Position>65</Position>
    </Report>
    <Report instance="form10k.htm">
      <IsDefault>false</IsDefault>
      <HasEmbeddedReports>false</HasEmbeddedReports>
      <HtmlFileName>R66.htm</HtmlFileName>
      <LongName>091200 - Disclosure - Stock-Based Compensation (Details)</LongName>
      <ReportType>Sheet</ReportType>
      <Role>http://yorkwater.com/role/StockbasedCompensationDetails</Role>
      <ShortName>Stock-Based Compensation (Details)</ShortName>
      <MenuCategory>Details</MenuCategory>
      <ParentRole>http://yorkwater.com/role/StockbasedCompensationTables</ParentRole>
      <Position>66</Position>
    </Report>
    <Report instance="form10k.htm">
      <IsDefault>false</IsDefault>
      <HasEmbeddedReports>false</HasEmbeddedReports>
      <HtmlFileName>R67.htm</HtmlFileName>
      <LongName>091300 - Disclosure - Taxes Other than Income Taxes (Details)</LongName>
      <ReportType>Sheet</ReportType>
      <Role>http://yorkwater.com/role/TaxesOtherThanIncomeTaxesDetails</Role>
      <ShortName>Taxes Other than Income Taxes (Details)</ShortName>
      <MenuCategory>Details</MenuCategory>
      <ParentRole>http://yorkwater.com/role/TaxesOtherThanIncomeTaxesTables</ParentRole>
      <Position>67</Position>
    </Report>
    <Report instance="form10k.htm">
      <IsDefault>false</IsDefault>
      <HasEmbeddedReports>false</HasEmbeddedReports>
      <HtmlFileName>R68.htm</HtmlFileName>
      <LongName>091400 - Disclosure - Income Taxes (Details)</LongName>
      <ReportType>Sheet</ReportType>
      <Role>http://yorkwater.com/role/IncomeTaxesDetails</Role>
      <ShortName>Income Taxes (Details)</ShortName>
      <MenuCategory>Details</MenuCategory>
      <ParentRole>http://yorkwater.com/role/IncomeTaxesTables</ParentRole>
      <Position>68</Position>
    </Report>
    <Report instance="form10k.htm">
      <IsDefault>false</IsDefault>
      <HasEmbeddedReports>false</HasEmbeddedReports>
      <HtmlFileName>R69.htm</HtmlFileName>
      <LongName>091500 - Disclosure - Subsequent Event (Details)</LongName>
      <ReportType>Sheet</ReportType>
      <Role>http://yorkwater.com/role/SubsequentEventDetails</Role>
      <ShortName>Subsequent Event (Details)</ShortName>
      <MenuCategory>Details</MenuCategory>
      <ParentRole>http://yorkwater.com/role/SubsequentEvent</ParentRole>
      <Position>69</Position>
    </Report>
    <Report instance="form10k.htm">
      <IsDefault>false</IsDefault>
      <HasEmbeddedReports>false</HasEmbeddedReports>
      <HtmlFileName>R70.htm</HtmlFileName>
      <LongName>091600 - Schedule - Schedule II - Valuation and Qualifying Accounts (Details)</LongName>
      <ReportType>Sheet</ReportType>
      <Role>http://yorkwater.com/role/ScheduleIiValuationAndQualifyingAccountsDetails</Role>
      <ShortName>Schedule II - Valuation and Qualifying Accounts (Details)</ShortName>
      <MenuCategory>Details</MenuCategory>
      <Position>70</Position>
    </Report>
    <Report>
      <IsDefault>false</IsDefault>
      <HasEmbeddedReports>false</HasEmbeddedReports>
      <LongName>All Reports</LongName>
      <ReportType>Book</ReportType>
      <ShortName>All Reports</ShortName>
    </Report>
  </MyReports>
  <Logs>
    <Log type="Warning">[ix-0514-Hidden-Fact-Eligible-For-Transform] WARN: 7 fact(s) appearing in ix:hidden were eligible for transformation: dei:CurrentFiscalYearEndDate, us-gaap:OperatingLossCarryforwardsExpirationDate, us-gaap:TaxCreditCarryforwardExpirationDate, yorw:InvestmentPerformanceObjectivesBenchmarkPeriod, yorw:MinimumEmploymentPeriodRequiredToPurchaseSharesUnderEmployeeStockPurchasePlan, yorw:NumberOfMunicipalitiesWithAgreementsToExtendWaterService -  form10k.htm 11</Log>
    <Log type="Warning">[ix-0514-Hidden-Fact-Not-Referenced] WARN: 1 fact(s) appearing in ix:hidden were not referenced by any -sec-ix-hidden style property: us-gaap:NoncashInvestingAndFinancingActivitiesRelatedText -  form10k.htm 11</Log>
  </Logs>
  <InputFiles>
    <File doctype="10-K" original="form10k.htm">form10k.htm</File>
    <File>exhibit23-123122.htm</File>
    <File>exhibit31_1-123122.htm</File>
    <File>exhibit31_2-123122.htm</File>
    <File>exhibit32_1-123122.htm</File>
    <File>exhibit32_2-123122.htm</File>
    <File>yorw-20221231.xsd</File>
    <File>yorw-20221231_cal.xml</File>
    <File>yorw-20221231_def.xml</File>
    <File>yorw-20221231_lab.xml</File>
    <File>yorw-20221231_pre.xml</File>
  </InputFiles>
  <SupplementalFiles>
    <File>image01.jpg</File>
  </SupplementalFiles>
  <BaseTaxonomies>
    <BaseTaxonomy items="1">http://fasb.org/srt/2022</BaseTaxonomy>
    <BaseTaxonomy items="790">http://fasb.org/us-gaap/2022</BaseTaxonomy>
    <BaseTaxonomy items="36">http://xbrl.sec.gov/dei/2022</BaseTaxonomy>
  </BaseTaxonomies>
  <HasPresentationLinkbase>true</HasPresentationLinkbase>
  <HasCalculationLinkbase>true</HasCalculationLinkbase>
</FilingSummary>
