<?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/2021q4"
  xmlns:link="http://www.xbrl.org/2003/linkbase"
  xmlns:xlink="http://www.w3.org/1999/xlink">
    <link:schemaRef xlink:href="stba-20220516.xsd" xlink:type="simple"/>
    <context id="i59edd3d6bedc4823830400b47134732c_D20220516-20220516">
        <entity>
            <identifier scheme="http://www.sec.gov/CIK">0000719220</identifier>
        </entity>
        <period>
            <startDate>2022-05-16</startDate>
            <endDate>2022-05-16</endDate>
        </period>
    </context>
    <dei:EntityCentralIndexKey
      contextRef="i59edd3d6bedc4823830400b47134732c_D20220516-20220516"
      id="id3VybDovL2RvY3MudjEvZG9jOjc2MzQ1YTY5OWY4MDRhNjhhYTBhNzkzY2IwOWM1NjE2L3NlYzo3NjM0NWE2OTlmODA0YTY4YWEwYTc5M2NiMDljNTYxNl80L2ZyYWc6OGQ0ODBlNTMwYjA3NDg5YmFjYmZlYWViZTIzNDE1YmIvdGFibGU6YTE4ZmFmMzdjMDQ3NDg1N2I2NDFiOTI4OWE5MGQ2MzUvdGFibGVyYW5nZTphMThmYWYzN2MwNDc0ODU3YjY0MWI5Mjg5YTkwZDYzNV8yLTEtMS0xLTEyODY0Ng_884995c9-a2ba-49ae-959a-3a4eb8d754c3">0000719220</dei:EntityCentralIndexKey>
    <dei:CurrentFiscalYearEndDate
      contextRef="i59edd3d6bedc4823830400b47134732c_D20220516-20220516"
      id="id3VybDovL2RvY3MudjEvZG9jOjc2MzQ1YTY5OWY4MDRhNjhhYTBhNzkzY2IwOWM1NjE2L3NlYzo3NjM0NWE2OTlmODA0YTY4YWEwYTc5M2NiMDljNTYxNl80L2ZyYWc6OGQ0ODBlNTMwYjA3NDg5YmFjYmZlYWViZTIzNDE1YmIvdGFibGU6YTE4ZmFmMzdjMDQ3NDg1N2I2NDFiOTI4OWE5MGQ2MzUvdGFibGVyYW5nZTphMThmYWYzN2MwNDc0ODU3YjY0MWI5Mjg5YTkwZDYzNV80LTEtMS0xLTEyOTA4OA_7e07ea4c-9ac0-48b9-985a-11f66b255c2b">--12-31</dei:CurrentFiscalYearEndDate>
    <dei:AmendmentFlag
      contextRef="i59edd3d6bedc4823830400b47134732c_D20220516-20220516"
      id="id3VybDovL2RvY3MudjEvZG9jOjc2MzQ1YTY5OWY4MDRhNjhhYTBhNzkzY2IwOWM1NjE2L3NlYzo3NjM0NWE2OTlmODA0YTY4YWEwYTc5M2NiMDljNTYxNl80L2ZyYWc6OGQ0ODBlNTMwYjA3NDg5YmFjYmZlYWViZTIzNDE1YmIvdGFibGU6YTE4ZmFmMzdjMDQ3NDg1N2I2NDFiOTI4OWE5MGQ2MzUvdGFibGVyYW5nZTphMThmYWYzN2MwNDc0ODU3YjY0MWI5Mjg5YTkwZDYzNV81LTEtMS0xLTEyODY0Ng_2ffb6f69-d7b0-42cf-b539-83f47338e951">false</dei:AmendmentFlag>
    <dei:DocumentType
      contextRef="i59edd3d6bedc4823830400b47134732c_D20220516-20220516"
      id="id3VybDovL2RvY3MudjEvZG9jOjc2MzQ1YTY5OWY4MDRhNjhhYTBhNzkzY2IwOWM1NjE2L3NlYzo3NjM0NWE2OTlmODA0YTY4YWEwYTc5M2NiMDljNTYxNl8xL2ZyYWc6MDcxNjdhMjhkNDI1NGEzMTkxODJkYzIwODY0OWNmNDMvdGV4dHJlZ2lvbjowNzE2N2EyOGQ0MjU0YTMxOTE4MmRjMjA4NjQ5Y2Y0M181OTU5_bef87668-5fb4-42df-b19c-a3ab8d4478a2">8-K</dei:DocumentType>
    <dei:DocumentPeriodEndDate
      contextRef="i59edd3d6bedc4823830400b47134732c_D20220516-20220516"
      id="id3VybDovL2RvY3MudjEvZG9jOjc2MzQ1YTY5OWY4MDRhNjhhYTBhNzkzY2IwOWM1NjE2L3NlYzo3NjM0NWE2OTlmODA0YTY4YWEwYTc5M2NiMDljNTYxNl8xL2ZyYWc6MDcxNjdhMjhkNDI1NGEzMTkxODJkYzIwODY0OWNmNDMvdGV4dHJlZ2lvbjowNzE2N2EyOGQ0MjU0YTMxOTE4MmRjMjA4NjQ5Y2Y0M18xNzY_6d27bfc4-d6c3-49a5-b045-434061ce30e0">2022-05-16</dei:DocumentPeriodEndDate>
    <dei:EntityRegistrantName
      contextRef="i59edd3d6bedc4823830400b47134732c_D20220516-20220516"
      id="id3VybDovL2RvY3MudjEvZG9jOjc2MzQ1YTY5OWY4MDRhNjhhYTBhNzkzY2IwOWM1NjE2L3NlYzo3NjM0NWE2OTlmODA0YTY4YWEwYTc5M2NiMDljNTYxNl8xL2ZyYWc6MDcxNjdhMjhkNDI1NGEzMTkxODJkYzIwODY0OWNmNDMvdGV4dHJlZ2lvbjowNzE2N2EyOGQ0MjU0YTMxOTE4MmRjMjA4NjQ5Y2Y0M181OTYw_0104b9ff-c412-4fd7-866d-b0eb8318acf0">S&amp;T BANCORP, INC</dei:EntityRegistrantName>
    <dei:EntityIncorporationStateCountryCode
      contextRef="i59edd3d6bedc4823830400b47134732c_D20220516-20220516"
      id="id3VybDovL2RvY3MudjEvZG9jOjc2MzQ1YTY5OWY4MDRhNjhhYTBhNzkzY2IwOWM1NjE2L3NlYzo3NjM0NWE2OTlmODA0YTY4YWEwYTc5M2NiMDljNTYxNl8xL2ZyYWc6MDcxNjdhMjhkNDI1NGEzMTkxODJkYzIwODY0OWNmNDMvdGFibGU6MDM5ZWI0NjRmNDlmNGQ2N2FhZmY2ZWRjN2M4OWYwOGYvdGFibGVyYW5nZTowMzllYjQ2NGY0OWY0ZDY3YWFmZjZlZGM3Yzg5ZjA4Zl8wLTAtMS0xLTEyODY0Ng_c986ccfe-31ba-48d9-9263-093331284a83">PA</dei:EntityIncorporationStateCountryCode>
    <dei:EntityFileNumber
      contextRef="i59edd3d6bedc4823830400b47134732c_D20220516-20220516"
      id="id3VybDovL2RvY3MudjEvZG9jOjc2MzQ1YTY5OWY4MDRhNjhhYTBhNzkzY2IwOWM1NjE2L3NlYzo3NjM0NWE2OTlmODA0YTY4YWEwYTc5M2NiMDljNTYxNl8xL2ZyYWc6MDcxNjdhMjhkNDI1NGEzMTkxODJkYzIwODY0OWNmNDMvdGFibGU6MDM5ZWI0NjRmNDlmNGQ2N2FhZmY2ZWRjN2M4OWYwOGYvdGFibGVyYW5nZTowMzllYjQ2NGY0OWY0ZDY3YWFmZjZlZGM3Yzg5ZjA4Zl8wLTEtMS0xLTEyODY0Ng_b8609501-7c14-40bf-82be-ba0cd889a3fa">0-12508</dei:EntityFileNumber>
    <dei:EntityTaxIdentificationNumber
      contextRef="i59edd3d6bedc4823830400b47134732c_D20220516-20220516"
      id="id3VybDovL2RvY3MudjEvZG9jOjc2MzQ1YTY5OWY4MDRhNjhhYTBhNzkzY2IwOWM1NjE2L3NlYzo3NjM0NWE2OTlmODA0YTY4YWEwYTc5M2NiMDljNTYxNl8xL2ZyYWc6MDcxNjdhMjhkNDI1NGEzMTkxODJkYzIwODY0OWNmNDMvdGFibGU6MDM5ZWI0NjRmNDlmNGQ2N2FhZmY2ZWRjN2M4OWYwOGYvdGFibGVyYW5nZTowMzllYjQ2NGY0OWY0ZDY3YWFmZjZlZGM3Yzg5ZjA4Zl8wLTMtMS0xLTEyODY0Ng_649756e0-57b6-4e84-9aff-aeeee90526c5">25-1434426</dei:EntityTaxIdentificationNumber>
    <dei:EntityAddressAddressLine1
      contextRef="i59edd3d6bedc4823830400b47134732c_D20220516-20220516"
      id="id3VybDovL2RvY3MudjEvZG9jOjc2MzQ1YTY5OWY4MDRhNjhhYTBhNzkzY2IwOWM1NjE2L3NlYzo3NjM0NWE2OTlmODA0YTY4YWEwYTc5M2NiMDljNTYxNl8xL2ZyYWc6MDcxNjdhMjhkNDI1NGEzMTkxODJkYzIwODY0OWNmNDMvdGFibGU6MDM5ZWI0NjRmNDlmNGQ2N2FhZmY2ZWRjN2M4OWYwOGYvdGFibGVyYW5nZTowMzllYjQ2NGY0OWY0ZDY3YWFmZjZlZGM3Yzg5ZjA4Zl8zLTAtMS0xLTEyODY0Ng_5684ca20-5e8b-4413-b57c-fe977ae9273c">800 Philadelphia Street</dei:EntityAddressAddressLine1>
    <dei:EntityAddressCityOrTown
      contextRef="i59edd3d6bedc4823830400b47134732c_D20220516-20220516"
      id="id3VybDovL2RvY3MudjEvZG9jOjc2MzQ1YTY5OWY4MDRhNjhhYTBhNzkzY2IwOWM1NjE2L3NlYzo3NjM0NWE2OTlmODA0YTY4YWEwYTc5M2NiMDljNTYxNl8xL2ZyYWc6MDcxNjdhMjhkNDI1NGEzMTkxODJkYzIwODY0OWNmNDMvdGFibGU6MDM5ZWI0NjRmNDlmNGQ2N2FhZmY2ZWRjN2M4OWYwOGYvdGFibGVyYW5nZTowMzllYjQ2NGY0OWY0ZDY3YWFmZjZlZGM3Yzg5ZjA4Zl8zLTEtMS0xLTEyODY0Ng_0d8e92bc-4319-4840-9697-3e631d3b9eaa">Indiana</dei:EntityAddressCityOrTown>
    <dei:EntityAddressStateOrProvince
      contextRef="i59edd3d6bedc4823830400b47134732c_D20220516-20220516"
      id="id3VybDovL2RvY3MudjEvZG9jOjc2MzQ1YTY5OWY4MDRhNjhhYTBhNzkzY2IwOWM1NjE2L3NlYzo3NjM0NWE2OTlmODA0YTY4YWEwYTc5M2NiMDljNTYxNl8xL2ZyYWc6MDcxNjdhMjhkNDI1NGEzMTkxODJkYzIwODY0OWNmNDMvdGFibGU6MDM5ZWI0NjRmNDlmNGQ2N2FhZmY2ZWRjN2M4OWYwOGYvdGFibGVyYW5nZTowMzllYjQ2NGY0OWY0ZDY3YWFmZjZlZGM3Yzg5ZjA4Zl8zLTItMS0xLTEyODY0Ng_4938edc8-183c-4edd-a983-ebff25350dad">PA</dei:EntityAddressStateOrProvince>
    <dei:EntityAddressPostalZipCode
      contextRef="i59edd3d6bedc4823830400b47134732c_D20220516-20220516"
      id="id3VybDovL2RvY3MudjEvZG9jOjc2MzQ1YTY5OWY4MDRhNjhhYTBhNzkzY2IwOWM1NjE2L3NlYzo3NjM0NWE2OTlmODA0YTY4YWEwYTc5M2NiMDljNTYxNl8xL2ZyYWc6MDcxNjdhMjhkNDI1NGEzMTkxODJkYzIwODY0OWNmNDMvdGFibGU6MDM5ZWI0NjRmNDlmNGQ2N2FhZmY2ZWRjN2M4OWYwOGYvdGFibGVyYW5nZTowMzllYjQ2NGY0OWY0ZDY3YWFmZjZlZGM3Yzg5ZjA4Zl8zLTMtMS0xLTEyODY0Ng_224ed56b-f156-43e4-9c15-49b6f244f7f7">15701</dei:EntityAddressPostalZipCode>
    <dei:CityAreaCode
      contextRef="i59edd3d6bedc4823830400b47134732c_D20220516-20220516"
      id="id3VybDovL2RvY3MudjEvZG9jOjc2MzQ1YTY5OWY4MDRhNjhhYTBhNzkzY2IwOWM1NjE2L3NlYzo3NjM0NWE2OTlmODA0YTY4YWEwYTc5M2NiMDljNTYxNl8xL2ZyYWc6MDcxNjdhMjhkNDI1NGEzMTkxODJkYzIwODY0OWNmNDMvdGV4dHJlZ2lvbjowNzE2N2EyOGQ0MjU0YTMxOTE4MmRjMjA4NjQ5Y2Y0M181OTY0_2be83a28-a762-43a6-9997-c1c27c22dd28">800</dei:CityAreaCode>
    <dei:LocalPhoneNumber
      contextRef="i59edd3d6bedc4823830400b47134732c_D20220516-20220516"
      id="id3VybDovL2RvY3MudjEvZG9jOjc2MzQ1YTY5OWY4MDRhNjhhYTBhNzkzY2IwOWM1NjE2L3NlYzo3NjM0NWE2OTlmODA0YTY4YWEwYTc5M2NiMDljNTYxNl8xL2ZyYWc6MDcxNjdhMjhkNDI1NGEzMTkxODJkYzIwODY0OWNmNDMvdGV4dHJlZ2lvbjowNzE2N2EyOGQ0MjU0YTMxOTE4MmRjMjA4NjQ5Y2Y0M181OTY1_f791963b-58e4-4e33-96c1-f1a4d5931745">325-2265</dei:LocalPhoneNumber>
    <dei:WrittenCommunications
      contextRef="i59edd3d6bedc4823830400b47134732c_D20220516-20220516"
      id="id3VybDovL2RvY3MudjEvZG9jOjc2MzQ1YTY5OWY4MDRhNjhhYTBhNzkzY2IwOWM1NjE2L3NlYzo3NjM0NWE2OTlmODA0YTY4YWEwYTc5M2NiMDljNTYxNl8xL2ZyYWc6MDcxNjdhMjhkNDI1NGEzMTkxODJkYzIwODY0OWNmNDMvdGV4dHJlZ2lvbjowNzE2N2EyOGQ0MjU0YTMxOTE4MmRjMjA4NjQ5Y2Y0M181OTYx_6c9719e9-d31c-4e34-a97b-6743aebcc631">false</dei:WrittenCommunications>
    <dei:SolicitingMaterial
      contextRef="i59edd3d6bedc4823830400b47134732c_D20220516-20220516"
      id="id3VybDovL2RvY3MudjEvZG9jOjc2MzQ1YTY5OWY4MDRhNjhhYTBhNzkzY2IwOWM1NjE2L3NlYzo3NjM0NWE2OTlmODA0YTY4YWEwYTc5M2NiMDljNTYxNl8xL2ZyYWc6MDcxNjdhMjhkNDI1NGEzMTkxODJkYzIwODY0OWNmNDMvdGV4dHJlZ2lvbjowNzE2N2EyOGQ0MjU0YTMxOTE4MmRjMjA4NjQ5Y2Y0M181OTYy_da7e0354-8b8b-4069-8834-72a1e64e72d1">false</dei:SolicitingMaterial>
    <dei:PreCommencementTenderOffer
      contextRef="i59edd3d6bedc4823830400b47134732c_D20220516-20220516"
      id="id3VybDovL2RvY3MudjEvZG9jOjc2MzQ1YTY5OWY4MDRhNjhhYTBhNzkzY2IwOWM1NjE2L3NlYzo3NjM0NWE2OTlmODA0YTY4YWEwYTc5M2NiMDljNTYxNl8xL2ZyYWc6MDcxNjdhMjhkNDI1NGEzMTkxODJkYzIwODY0OWNmNDMvdGV4dHJlZ2lvbjowNzE2N2EyOGQ0MjU0YTMxOTE4MmRjMjA4NjQ5Y2Y0M181OTY2_4a657982-9c33-4b4f-9fed-ece0ea514535">false</dei:PreCommencementTenderOffer>
    <dei:PreCommencementIssuerTenderOffer
      contextRef="i59edd3d6bedc4823830400b47134732c_D20220516-20220516"
      id="id3VybDovL2RvY3MudjEvZG9jOjc2MzQ1YTY5OWY4MDRhNjhhYTBhNzkzY2IwOWM1NjE2L3NlYzo3NjM0NWE2OTlmODA0YTY4YWEwYTc5M2NiMDljNTYxNl8xL2ZyYWc6MDcxNjdhMjhkNDI1NGEzMTkxODJkYzIwODY0OWNmNDMvdGV4dHJlZ2lvbjowNzE2N2EyOGQ0MjU0YTMxOTE4MmRjMjA4NjQ5Y2Y0M181OTY3_5e327a1d-cab2-4d1c-be9c-2ec9625f4d09">false</dei:PreCommencementIssuerTenderOffer>
    <dei:Security12bTitle
      contextRef="i59edd3d6bedc4823830400b47134732c_D20220516-20220516"
      id="id3VybDovL2RvY3MudjEvZG9jOjc2MzQ1YTY5OWY4MDRhNjhhYTBhNzkzY2IwOWM1NjE2L3NlYzo3NjM0NWE2OTlmODA0YTY4YWEwYTc5M2NiMDljNTYxNl8xL2ZyYWc6MDcxNjdhMjhkNDI1NGEzMTkxODJkYzIwODY0OWNmNDMvdGFibGU6NTNlZWU0ZWRlY2E1NDRlZThmY2Q3ZjM0MTVkZGJmMDgvdGFibGVyYW5nZTo1M2VlZTRlZGVjYTU0NGVlOGZjZDdmMzQxNWRkYmYwOF8xLTAtMS0xLTEyODY0Ng_d8acd2c0-d792-4bbe-9021-e6d24441db3c">Common Stock, $2.50 par value</dei:Security12bTitle>
    <dei:TradingSymbol
      contextRef="i59edd3d6bedc4823830400b47134732c_D20220516-20220516"
      id="id3VybDovL2RvY3MudjEvZG9jOjc2MzQ1YTY5OWY4MDRhNjhhYTBhNzkzY2IwOWM1NjE2L3NlYzo3NjM0NWE2OTlmODA0YTY4YWEwYTc5M2NiMDljNTYxNl8xL2ZyYWc6MDcxNjdhMjhkNDI1NGEzMTkxODJkYzIwODY0OWNmNDMvdGFibGU6NTNlZWU0ZWRlY2E1NDRlZThmY2Q3ZjM0MTVkZGJmMDgvdGFibGVyYW5nZTo1M2VlZTRlZGVjYTU0NGVlOGZjZDdmMzQxNWRkYmYwOF8xLTEtMS0xLTEyODY0Ng_70d77a01-6643-4804-b826-6716690187e7">STBA</dei:TradingSymbol>
    <dei:SecurityExchangeName
      contextRef="i59edd3d6bedc4823830400b47134732c_D20220516-20220516"
      id="id3VybDovL2RvY3MudjEvZG9jOjc2MzQ1YTY5OWY4MDRhNjhhYTBhNzkzY2IwOWM1NjE2L3NlYzo3NjM0NWE2OTlmODA0YTY4YWEwYTc5M2NiMDljNTYxNl8xL2ZyYWc6MDcxNjdhMjhkNDI1NGEzMTkxODJkYzIwODY0OWNmNDMvdGFibGU6NTNlZWU0ZWRlY2E1NDRlZThmY2Q3ZjM0MTVkZGJmMDgvdGFibGVyYW5nZTo1M2VlZTRlZGVjYTU0NGVlOGZjZDdmMzQxNWRkYmYwOF8xLTItMS0xLTEyODY0Ng_6ce6e39c-ceec-48c5-a344-b1e011015c49">NASDAQ</dei:SecurityExchangeName>
    <dei:EntityEmergingGrowthCompany
      contextRef="i59edd3d6bedc4823830400b47134732c_D20220516-20220516"
      id="id3VybDovL2RvY3MudjEvZG9jOjc2MzQ1YTY5OWY4MDRhNjhhYTBhNzkzY2IwOWM1NjE2L3NlYzo3NjM0NWE2OTlmODA0YTY4YWEwYTc5M2NiMDljNTYxNl8xL2ZyYWc6MDcxNjdhMjhkNDI1NGEzMTkxODJkYzIwODY0OWNmNDMvdGV4dHJlZ2lvbjowNzE2N2EyOGQ0MjU0YTMxOTE4MmRjMjA4NjQ5Y2Y0M181OTY4_8e39e164-1900-4a75-8e81-00242ea075fe">false</dei:EntityEmergingGrowthCompany>
    <dei:EntityEmergingGrowthCompany
      contextRef="i59edd3d6bedc4823830400b47134732c_D20220516-20220516"
      id="id3VybDovL2RvY3MudjEvZG9jOjc2MzQ1YTY5OWY4MDRhNjhhYTBhNzkzY2IwOWM1NjE2L3NlYzo3NjM0NWE2OTlmODA0YTY4YWEwYTc5M2NiMDljNTYxNl8xL2ZyYWc6MDcxNjdhMjhkNDI1NGEzMTkxODJkYzIwODY0OWNmNDMvdGV4dHJlZ2lvbjowNzE2N2EyOGQ0MjU0YTMxOTE4MmRjMjA4NjQ5Y2Y0M181OTYz_44e8d47e-6621-42e6-8251-76dccabb87bc">false</dei:EntityEmergingGrowthCompany>
</xbrl>
