<?xml version="1.0" encoding="utf-8"?>
<xbrl
  xml:lang="en-US"
  xmlns="http://www.xbrl.org/2003/instance"
  xmlns:dei="http://xbrl.sec.gov/dei/2022"
  xmlns:link="http://www.xbrl.org/2003/linkbase"
  xmlns:xlink="http://www.w3.org/1999/xlink">
    <link:schemaRef xlink:href="stba-20230213.xsd" xlink:type="simple"/>
    <context id="i43379f3d9102404db3f3dbec18bc53b6_D20230213-20230213">
        <entity>
            <identifier scheme="http://www.sec.gov/CIK">0000719220</identifier>
        </entity>
        <period>
            <startDate>2023-02-13</startDate>
            <endDate>2023-02-13</endDate>
        </period>
    </context>
    <context id="i95244a3ef6e547d69335ac82f2933b5b_D20220902-20220902">
        <entity>
            <identifier scheme="http://www.sec.gov/CIK">0000719220</identifier>
        </entity>
        <period>
            <startDate>2022-09-02</startDate>
            <endDate>2022-09-02</endDate>
        </period>
    </context>
    <dei:AmendmentFlag
      contextRef="i43379f3d9102404db3f3dbec18bc53b6_D20230213-20230213"
      id="id3VybDovL2RvY3MudjEvZG9jOjJjZDg4MjJkNjhhYzRkNDliMjljZDI1OTU0OTA1N2RmL3NlYzoyY2Q4ODIyZDY4YWM0ZDQ5YjI5Y2QyNTk1NDkwNTdkZl80L2ZyYWc6MzNlM2U3NzQ2MWQ2NDBhNGE3YTgzYTFmYjVmMTQyNTUvdGFibGU6NzVmYzg4ZDRkYzAxNDU4ODg2Y2VkN2NlZDYwYWMzOTUvdGFibGVyYW5nZTo3NWZjODhkNGRjMDE0NTg4ODZjZWQ3Y2VkNjBhYzM5NV8wLTEtMS0xLTIzNzkzMg_e3030efa-5b39-482b-bc67-ae74de568692">false</dei:AmendmentFlag>
    <dei:EntityCentralIndexKey
      contextRef="i43379f3d9102404db3f3dbec18bc53b6_D20230213-20230213"
      id="id3VybDovL2RvY3MudjEvZG9jOjJjZDg4MjJkNjhhYzRkNDliMjljZDI1OTU0OTA1N2RmL3NlYzoyY2Q4ODIyZDY4YWM0ZDQ5YjI5Y2QyNTk1NDkwNTdkZl80L2ZyYWc6MzNlM2U3NzQ2MWQ2NDBhNGE3YTgzYTFmYjVmMTQyNTUvdGFibGU6NzVmYzg4ZDRkYzAxNDU4ODg2Y2VkN2NlZDYwYWMzOTUvdGFibGVyYW5nZTo3NWZjODhkNGRjMDE0NTg4ODZjZWQ3Y2VkNjBhYzM5NV8xLTEtMS0xLTIzNzkzMg_97131ecc-c95e-4352-a8b4-e07019e07647">0000719220</dei:EntityCentralIndexKey>
    <dei:EntityCentralIndexKey
      contextRef="i95244a3ef6e547d69335ac82f2933b5b_D20220902-20220902"
      id="id3VybDovL2RvY3MudjEvZG9jOjJjZDg4MjJkNjhhYzRkNDliMjljZDI1OTU0OTA1N2RmL3NlYzoyY2Q4ODIyZDY4YWM0ZDQ5YjI5Y2QyNTk1NDkwNTdkZl83L2ZyYWc6MTY1YWNmMWNhMjk0NDA2ZTlhODhiNDk4MGVjYTFkOGMvdGFibGU6MGE4YWE3Mzk1MmZiNGRiMjhkNjQzNDEwOWJhYzc0NzcvdGFibGVyYW5nZTowYThhYTczOTUyZmI0ZGIyOGQ2NDM0MTA5YmFjNzQ3N18yLTEtMS0xLTIzNzkzMg_81ca51b7-725d-402d-88a2-5300a6843471">0000719220</dei:EntityCentralIndexKey>
    <dei:AmendmentFlag
      contextRef="i95244a3ef6e547d69335ac82f2933b5b_D20220902-20220902"
      id="id3VybDovL2RvY3MudjEvZG9jOjJjZDg4MjJkNjhhYzRkNDliMjljZDI1OTU0OTA1N2RmL3NlYzoyY2Q4ODIyZDY4YWM0ZDQ5YjI5Y2QyNTk1NDkwNTdkZl83L2ZyYWc6MTY1YWNmMWNhMjk0NDA2ZTlhODhiNDk4MGVjYTFkOGMvdGFibGU6MGE4YWE3Mzk1MmZiNGRiMjhkNjQzNDEwOWJhYzc0NzcvdGFibGVyYW5nZTowYThhYTczOTUyZmI0ZGIyOGQ2NDM0MTA5YmFjNzQ3N181LTEtMS0xLTIzNzkzMg_0a341299-faad-4007-823d-01543d130065">false</dei:AmendmentFlag>
    <dei:DocumentType
      contextRef="i43379f3d9102404db3f3dbec18bc53b6_D20230213-20230213"
      id="id3VybDovL2RvY3MudjEvZG9jOjJjZDg4MjJkNjhhYzRkNDliMjljZDI1OTU0OTA1N2RmL3NlYzoyY2Q4ODIyZDY4YWM0ZDQ5YjI5Y2QyNTk1NDkwNTdkZl8xL2ZyYWc6YzNkNzQ2NTE3M2FjNGE1MzgwN2UyMjlhYjk4ZDZmMjgvdGV4dHJlZ2lvbjpjM2Q3NDY1MTczYWM0YTUzODA3ZTIyOWFiOThkNmYyOF8yODkz_c51572d1-3f02-4497-8f54-beb052836d6a">8-K</dei:DocumentType>
    <dei:DocumentPeriodEndDate
      contextRef="i43379f3d9102404db3f3dbec18bc53b6_D20230213-20230213"
      id="id3VybDovL2RvY3MudjEvZG9jOjJjZDg4MjJkNjhhYzRkNDliMjljZDI1OTU0OTA1N2RmL3NlYzoyY2Q4ODIyZDY4YWM0ZDQ5YjI5Y2QyNTk1NDkwNTdkZl8xL2ZyYWc6YzNkNzQ2NTE3M2FjNGE1MzgwN2UyMjlhYjk4ZDZmMjgvdGV4dHJlZ2lvbjpjM2Q3NDY1MTczYWM0YTUzODA3ZTIyOWFiOThkNmYyOF8xNzY_86d8c986-1939-4839-afc5-2764b1bd01c1">2023-02-13</dei:DocumentPeriodEndDate>
    <dei:EntityRegistrantName
      contextRef="i43379f3d9102404db3f3dbec18bc53b6_D20230213-20230213"
      id="id3VybDovL2RvY3MudjEvZG9jOjJjZDg4MjJkNjhhYzRkNDliMjljZDI1OTU0OTA1N2RmL3NlYzoyY2Q4ODIyZDY4YWM0ZDQ5YjI5Y2QyNTk1NDkwNTdkZl8xL2ZyYWc6YzNkNzQ2NTE3M2FjNGE1MzgwN2UyMjlhYjk4ZDZmMjgvdGV4dHJlZ2lvbjpjM2Q3NDY1MTczYWM0YTUzODA3ZTIyOWFiOThkNmYyOF8yODk0_e8fdb7cc-17e0-4162-9f5f-17010da4c66d">S&amp;T BANCORP, INC</dei:EntityRegistrantName>
    <dei:EntityIncorporationStateCountryCode
      contextRef="i43379f3d9102404db3f3dbec18bc53b6_D20230213-20230213"
      id="id3VybDovL2RvY3MudjEvZG9jOjJjZDg4MjJkNjhhYzRkNDliMjljZDI1OTU0OTA1N2RmL3NlYzoyY2Q4ODIyZDY4YWM0ZDQ5YjI5Y2QyNTk1NDkwNTdkZl8xL2ZyYWc6YzNkNzQ2NTE3M2FjNGE1MzgwN2UyMjlhYjk4ZDZmMjgvdGFibGU6ZDczNmI5YTQ4YzhhNDk4NTg4MDg2YWZlMWMxOGRhZTEvdGFibGVyYW5nZTpkNzM2YjlhNDhjOGE0OTg1ODgwODZhZmUxYzE4ZGFlMV8wLTAtMS0xLTIzNzkzMg_59fb3947-a7c7-47b4-aaa0-52b353205b76">PA</dei:EntityIncorporationStateCountryCode>
    <dei:EntityFileNumber
      contextRef="i43379f3d9102404db3f3dbec18bc53b6_D20230213-20230213"
      id="id3VybDovL2RvY3MudjEvZG9jOjJjZDg4MjJkNjhhYzRkNDliMjljZDI1OTU0OTA1N2RmL3NlYzoyY2Q4ODIyZDY4YWM0ZDQ5YjI5Y2QyNTk1NDkwNTdkZl8xL2ZyYWc6YzNkNzQ2NTE3M2FjNGE1MzgwN2UyMjlhYjk4ZDZmMjgvdGFibGU6ZDczNmI5YTQ4YzhhNDk4NTg4MDg2YWZlMWMxOGRhZTEvdGFibGVyYW5nZTpkNzM2YjlhNDhjOGE0OTg1ODgwODZhZmUxYzE4ZGFlMV8wLTEtMS0xLTIzNzkzMg_1f8908ea-aada-4466-9a95-20785bc4e4b0">0-12508</dei:EntityFileNumber>
    <dei:EntityTaxIdentificationNumber
      contextRef="i43379f3d9102404db3f3dbec18bc53b6_D20230213-20230213"
      id="id3VybDovL2RvY3MudjEvZG9jOjJjZDg4MjJkNjhhYzRkNDliMjljZDI1OTU0OTA1N2RmL3NlYzoyY2Q4ODIyZDY4YWM0ZDQ5YjI5Y2QyNTk1NDkwNTdkZl8xL2ZyYWc6YzNkNzQ2NTE3M2FjNGE1MzgwN2UyMjlhYjk4ZDZmMjgvdGFibGU6ZDczNmI5YTQ4YzhhNDk4NTg4MDg2YWZlMWMxOGRhZTEvdGFibGVyYW5nZTpkNzM2YjlhNDhjOGE0OTg1ODgwODZhZmUxYzE4ZGFlMV8wLTMtMS0xLTIzNzkzMg_ae99a2ce-3ffb-4de5-b5d9-4700e66c3fc5">25-1434426</dei:EntityTaxIdentificationNumber>
    <dei:EntityAddressAddressLine1
      contextRef="i43379f3d9102404db3f3dbec18bc53b6_D20230213-20230213"
      id="id3VybDovL2RvY3MudjEvZG9jOjJjZDg4MjJkNjhhYzRkNDliMjljZDI1OTU0OTA1N2RmL3NlYzoyY2Q4ODIyZDY4YWM0ZDQ5YjI5Y2QyNTk1NDkwNTdkZl8xL2ZyYWc6YzNkNzQ2NTE3M2FjNGE1MzgwN2UyMjlhYjk4ZDZmMjgvdGFibGU6ZDczNmI5YTQ4YzhhNDk4NTg4MDg2YWZlMWMxOGRhZTEvdGFibGVyYW5nZTpkNzM2YjlhNDhjOGE0OTg1ODgwODZhZmUxYzE4ZGFlMV8zLTAtMS0xLTIzNzkzMg_5560dfea-d718-4c4e-ad74-7c4cbe7d7ab3">800 Philadelphia Street</dei:EntityAddressAddressLine1>
    <dei:EntityAddressCityOrTown
      contextRef="i43379f3d9102404db3f3dbec18bc53b6_D20230213-20230213"
      id="id3VybDovL2RvY3MudjEvZG9jOjJjZDg4MjJkNjhhYzRkNDliMjljZDI1OTU0OTA1N2RmL3NlYzoyY2Q4ODIyZDY4YWM0ZDQ5YjI5Y2QyNTk1NDkwNTdkZl8xL2ZyYWc6YzNkNzQ2NTE3M2FjNGE1MzgwN2UyMjlhYjk4ZDZmMjgvdGFibGU6ZDczNmI5YTQ4YzhhNDk4NTg4MDg2YWZlMWMxOGRhZTEvdGFibGVyYW5nZTpkNzM2YjlhNDhjOGE0OTg1ODgwODZhZmUxYzE4ZGFlMV8zLTEtMS0xLTIzNzkzMg_38b7164a-8bfb-42b6-80d3-d33615038a6d">Indiana</dei:EntityAddressCityOrTown>
    <dei:EntityAddressStateOrProvince
      contextRef="i43379f3d9102404db3f3dbec18bc53b6_D20230213-20230213"
      id="id3VybDovL2RvY3MudjEvZG9jOjJjZDg4MjJkNjhhYzRkNDliMjljZDI1OTU0OTA1N2RmL3NlYzoyY2Q4ODIyZDY4YWM0ZDQ5YjI5Y2QyNTk1NDkwNTdkZl8xL2ZyYWc6YzNkNzQ2NTE3M2FjNGE1MzgwN2UyMjlhYjk4ZDZmMjgvdGFibGU6ZDczNmI5YTQ4YzhhNDk4NTg4MDg2YWZlMWMxOGRhZTEvdGFibGVyYW5nZTpkNzM2YjlhNDhjOGE0OTg1ODgwODZhZmUxYzE4ZGFlMV8zLTItMS0xLTIzNzkzMg_e5f6c396-283d-4325-b1af-8c330e92e105">PA</dei:EntityAddressStateOrProvince>
    <dei:EntityAddressPostalZipCode
      contextRef="i43379f3d9102404db3f3dbec18bc53b6_D20230213-20230213"
      id="id3VybDovL2RvY3MudjEvZG9jOjJjZDg4MjJkNjhhYzRkNDliMjljZDI1OTU0OTA1N2RmL3NlYzoyY2Q4ODIyZDY4YWM0ZDQ5YjI5Y2QyNTk1NDkwNTdkZl8xL2ZyYWc6YzNkNzQ2NTE3M2FjNGE1MzgwN2UyMjlhYjk4ZDZmMjgvdGFibGU6ZDczNmI5YTQ4YzhhNDk4NTg4MDg2YWZlMWMxOGRhZTEvdGFibGVyYW5nZTpkNzM2YjlhNDhjOGE0OTg1ODgwODZhZmUxYzE4ZGFlMV8zLTMtMS0xLTIzNzkzMg_4f041343-fcfe-4908-a560-c7d3ce5f45f9">15701</dei:EntityAddressPostalZipCode>
    <dei:CityAreaCode
      contextRef="i43379f3d9102404db3f3dbec18bc53b6_D20230213-20230213"
      id="id3VybDovL2RvY3MudjEvZG9jOjJjZDg4MjJkNjhhYzRkNDliMjljZDI1OTU0OTA1N2RmL3NlYzoyY2Q4ODIyZDY4YWM0ZDQ5YjI5Y2QyNTk1NDkwNTdkZl8xL2ZyYWc6YzNkNzQ2NTE3M2FjNGE1MzgwN2UyMjlhYjk4ZDZmMjgvdGV4dHJlZ2lvbjpjM2Q3NDY1MTczYWM0YTUzODA3ZTIyOWFiOThkNmYyOF8yODg5_4faca01c-b938-486e-9c22-b6118ed4ce15">800</dei:CityAreaCode>
    <dei:LocalPhoneNumber
      contextRef="i43379f3d9102404db3f3dbec18bc53b6_D20230213-20230213"
      id="id3VybDovL2RvY3MudjEvZG9jOjJjZDg4MjJkNjhhYzRkNDliMjljZDI1OTU0OTA1N2RmL3NlYzoyY2Q4ODIyZDY4YWM0ZDQ5YjI5Y2QyNTk1NDkwNTdkZl8xL2ZyYWc6YzNkNzQ2NTE3M2FjNGE1MzgwN2UyMjlhYjk4ZDZmMjgvdGV4dHJlZ2lvbjpjM2Q3NDY1MTczYWM0YTUzODA3ZTIyOWFiOThkNmYyOF8yODkw_36624089-9f3b-4f27-99f3-6261cb575107">325-2265</dei:LocalPhoneNumber>
    <dei:WrittenCommunications
      contextRef="i43379f3d9102404db3f3dbec18bc53b6_D20230213-20230213"
      id="id3VybDovL2RvY3MudjEvZG9jOjJjZDg4MjJkNjhhYzRkNDliMjljZDI1OTU0OTA1N2RmL3NlYzoyY2Q4ODIyZDY4YWM0ZDQ5YjI5Y2QyNTk1NDkwNTdkZl8xL2ZyYWc6YzNkNzQ2NTE3M2FjNGE1MzgwN2UyMjlhYjk4ZDZmMjgvdGV4dHJlZ2lvbjpjM2Q3NDY1MTczYWM0YTUzODA3ZTIyOWFiOThkNmYyOF8yODkx_29ac93ae-039f-4797-8b39-d01f2f646767">false</dei:WrittenCommunications>
    <dei:SolicitingMaterial
      contextRef="i43379f3d9102404db3f3dbec18bc53b6_D20230213-20230213"
      id="id3VybDovL2RvY3MudjEvZG9jOjJjZDg4MjJkNjhhYzRkNDliMjljZDI1OTU0OTA1N2RmL3NlYzoyY2Q4ODIyZDY4YWM0ZDQ5YjI5Y2QyNTk1NDkwNTdkZl8xL2ZyYWc6YzNkNzQ2NTE3M2FjNGE1MzgwN2UyMjlhYjk4ZDZmMjgvdGV4dHJlZ2lvbjpjM2Q3NDY1MTczYWM0YTUzODA3ZTIyOWFiOThkNmYyOF8yODk1_41b933bc-acfd-405a-8fc6-1967d2a2b9f2">false</dei:SolicitingMaterial>
    <dei:PreCommencementTenderOffer
      contextRef="i43379f3d9102404db3f3dbec18bc53b6_D20230213-20230213"
      id="id3VybDovL2RvY3MudjEvZG9jOjJjZDg4MjJkNjhhYzRkNDliMjljZDI1OTU0OTA1N2RmL3NlYzoyY2Q4ODIyZDY4YWM0ZDQ5YjI5Y2QyNTk1NDkwNTdkZl8xL2ZyYWc6YzNkNzQ2NTE3M2FjNGE1MzgwN2UyMjlhYjk4ZDZmMjgvdGV4dHJlZ2lvbjpjM2Q3NDY1MTczYWM0YTUzODA3ZTIyOWFiOThkNmYyOF8yODk2_447a7b26-5953-48ac-a218-12e75da93fd2">false</dei:PreCommencementTenderOffer>
    <dei:PreCommencementIssuerTenderOffer
      contextRef="i43379f3d9102404db3f3dbec18bc53b6_D20230213-20230213"
      id="id3VybDovL2RvY3MudjEvZG9jOjJjZDg4MjJkNjhhYzRkNDliMjljZDI1OTU0OTA1N2RmL3NlYzoyY2Q4ODIyZDY4YWM0ZDQ5YjI5Y2QyNTk1NDkwNTdkZl8xL2ZyYWc6YzNkNzQ2NTE3M2FjNGE1MzgwN2UyMjlhYjk4ZDZmMjgvdGV4dHJlZ2lvbjpjM2Q3NDY1MTczYWM0YTUzODA3ZTIyOWFiOThkNmYyOF8yODky_13dbb057-84c9-4967-86cf-4a74d2c1e78d">false</dei:PreCommencementIssuerTenderOffer>
    <dei:Security12bTitle
      contextRef="i43379f3d9102404db3f3dbec18bc53b6_D20230213-20230213"
      id="id3VybDovL2RvY3MudjEvZG9jOjJjZDg4MjJkNjhhYzRkNDliMjljZDI1OTU0OTA1N2RmL3NlYzoyY2Q4ODIyZDY4YWM0ZDQ5YjI5Y2QyNTk1NDkwNTdkZl8xL2ZyYWc6YzNkNzQ2NTE3M2FjNGE1MzgwN2UyMjlhYjk4ZDZmMjgvdGFibGU6YTA4ZWRhMGI3ZmEyNDFhNGE1Y2JkMjY3YTk1NmMzNjUvdGFibGVyYW5nZTphMDhlZGEwYjdmYTI0MWE0YTVjYmQyNjdhOTU2YzM2NV8xLTAtMS0xLTIzNzkzMg_db542196-52ac-4f6d-a301-86e477baec70">Common Stock, $2.50 par value</dei:Security12bTitle>
    <dei:TradingSymbol
      contextRef="i43379f3d9102404db3f3dbec18bc53b6_D20230213-20230213"
      id="id3VybDovL2RvY3MudjEvZG9jOjJjZDg4MjJkNjhhYzRkNDliMjljZDI1OTU0OTA1N2RmL3NlYzoyY2Q4ODIyZDY4YWM0ZDQ5YjI5Y2QyNTk1NDkwNTdkZl8xL2ZyYWc6YzNkNzQ2NTE3M2FjNGE1MzgwN2UyMjlhYjk4ZDZmMjgvdGFibGU6YTA4ZWRhMGI3ZmEyNDFhNGE1Y2JkMjY3YTk1NmMzNjUvdGFibGVyYW5nZTphMDhlZGEwYjdmYTI0MWE0YTVjYmQyNjdhOTU2YzM2NV8xLTEtMS0xLTIzNzkzMg_3b367502-0829-44e9-80de-b543a691859d">STBA</dei:TradingSymbol>
    <dei:SecurityExchangeName
      contextRef="i43379f3d9102404db3f3dbec18bc53b6_D20230213-20230213"
      id="id3VybDovL2RvY3MudjEvZG9jOjJjZDg4MjJkNjhhYzRkNDliMjljZDI1OTU0OTA1N2RmL3NlYzoyY2Q4ODIyZDY4YWM0ZDQ5YjI5Y2QyNTk1NDkwNTdkZl8xL2ZyYWc6YzNkNzQ2NTE3M2FjNGE1MzgwN2UyMjlhYjk4ZDZmMjgvdGFibGU6YTA4ZWRhMGI3ZmEyNDFhNGE1Y2JkMjY3YTk1NmMzNjUvdGFibGVyYW5nZTphMDhlZGEwYjdmYTI0MWE0YTVjYmQyNjdhOTU2YzM2NV8xLTItMS0xLTIzNzkzMg_0004dd11-73eb-4f0d-931c-bfaadb5dc881">NASDAQ</dei:SecurityExchangeName>
    <dei:EntityEmergingGrowthCompany
      contextRef="i43379f3d9102404db3f3dbec18bc53b6_D20230213-20230213"
      id="id3VybDovL2RvY3MudjEvZG9jOjJjZDg4MjJkNjhhYzRkNDliMjljZDI1OTU0OTA1N2RmL3NlYzoyY2Q4ODIyZDY4YWM0ZDQ5YjI5Y2QyNTk1NDkwNTdkZl8xL2ZyYWc6YzNkNzQ2NTE3M2FjNGE1MzgwN2UyMjlhYjk4ZDZmMjgvdGV4dHJlZ2lvbjpjM2Q3NDY1MTczYWM0YTUzODA3ZTIyOWFiOThkNmYyOF8yODk3_922dc82d-8c95-47d5-99ae-3985e73d178a">false</dei:EntityEmergingGrowthCompany>
</xbrl>
