<?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-20230125.xsd" xlink:type="simple"/>
    <context id="i0f6d025e51074f4196dc87b2ff575ede_D20230125-20230125">
        <entity>
            <identifier scheme="http://www.sec.gov/CIK">0000719220</identifier>
        </entity>
        <period>
            <startDate>2023-01-25</startDate>
            <endDate>2023-01-25</endDate>
        </period>
    </context>
    <dei:EntityCentralIndexKey
      contextRef="i0f6d025e51074f4196dc87b2ff575ede_D20230125-20230125"
      id="id3VybDovL2RvY3MudjEvZG9jOjg5YzQxZTJhZjM2NjRmZWZhZDRhN2NkYWNkNDFkNjgwL3NlYzo4OWM0MWUyYWYzNjY0ZmVmYWQ0YTdjZGFjZDQxZDY4MF80L2ZyYWc6NTY5YjNjYmIzMDliNGU5NWI0YzAxZWQ2ZWY4MmRhMjUvdGFibGU6OGM4Y2Q4NjVmNjI5NGRhMTgyNTU4MjVkY2EzNzgxZDAvdGFibGVyYW5nZTo4YzhjZDg2NWY2Mjk0ZGExODI1NTgyNWRjYTM3ODFkMF8yLTEtMS0xLTIyMTM0OQ_a5f8038d-d69c-4122-96ec-442dab2bef81">0000719220</dei:EntityCentralIndexKey>
    <dei:AmendmentFlag
      contextRef="i0f6d025e51074f4196dc87b2ff575ede_D20230125-20230125"
      id="id3VybDovL2RvY3MudjEvZG9jOjg5YzQxZTJhZjM2NjRmZWZhZDRhN2NkYWNkNDFkNjgwL3NlYzo4OWM0MWUyYWYzNjY0ZmVmYWQ0YTdjZGFjZDQxZDY4MF80L2ZyYWc6NTY5YjNjYmIzMDliNGU5NWI0YzAxZWQ2ZWY4MmRhMjUvdGFibGU6OGM4Y2Q4NjVmNjI5NGRhMTgyNTU4MjVkY2EzNzgxZDAvdGFibGVyYW5nZTo4YzhjZDg2NWY2Mjk0ZGExODI1NTgyNWRjYTM3ODFkMF81LTEtMS0xLTIyMTM0OQ_1141e20c-0de6-4192-aaaa-427362af9ce7">false</dei:AmendmentFlag>
    <dei:DocumentType
      contextRef="i0f6d025e51074f4196dc87b2ff575ede_D20230125-20230125"
      id="id3VybDovL2RvY3MudjEvZG9jOjg5YzQxZTJhZjM2NjRmZWZhZDRhN2NkYWNkNDFkNjgwL3NlYzo4OWM0MWUyYWYzNjY0ZmVmYWQ0YTdjZGFjZDQxZDY4MF8xL2ZyYWc6YjFlMjUxNDk1NGYxNDU0Nzg1NDUzYTk0ZDA3NDJhZmQvdGV4dHJlZ2lvbjpiMWUyNTE0OTU0ZjE0NTQ3ODU0NTNhOTRkMDc0MmFmZF80MTQ5_35cc2488-2878-4b40-84e5-1d690d7fd175">8-K</dei:DocumentType>
    <dei:DocumentPeriodEndDate
      contextRef="i0f6d025e51074f4196dc87b2ff575ede_D20230125-20230125"
      id="id3VybDovL2RvY3MudjEvZG9jOjg5YzQxZTJhZjM2NjRmZWZhZDRhN2NkYWNkNDFkNjgwL3NlYzo4OWM0MWUyYWYzNjY0ZmVmYWQ0YTdjZGFjZDQxZDY4MF8xL2ZyYWc6YjFlMjUxNDk1NGYxNDU0Nzg1NDUzYTk0ZDA3NDJhZmQvdGV4dHJlZ2lvbjpiMWUyNTE0OTU0ZjE0NTQ3ODU0NTNhOTRkMDc0MmFmZF8xNzY_74a11173-d00b-4c02-81ba-b5b825aaa785">2023-01-25</dei:DocumentPeriodEndDate>
    <dei:EntityRegistrantName
      contextRef="i0f6d025e51074f4196dc87b2ff575ede_D20230125-20230125"
      id="id3VybDovL2RvY3MudjEvZG9jOjg5YzQxZTJhZjM2NjRmZWZhZDRhN2NkYWNkNDFkNjgwL3NlYzo4OWM0MWUyYWYzNjY0ZmVmYWQ0YTdjZGFjZDQxZDY4MF8xL2ZyYWc6YjFlMjUxNDk1NGYxNDU0Nzg1NDUzYTk0ZDA3NDJhZmQvdGV4dHJlZ2lvbjpiMWUyNTE0OTU0ZjE0NTQ3ODU0NTNhOTRkMDc0MmFmZF80MTUw_98f81516-ffb4-49ba-afb8-3a7c37b82ed1">S&amp;T BANCORP, INC</dei:EntityRegistrantName>
    <dei:EntityIncorporationStateCountryCode
      contextRef="i0f6d025e51074f4196dc87b2ff575ede_D20230125-20230125"
      id="id3VybDovL2RvY3MudjEvZG9jOjg5YzQxZTJhZjM2NjRmZWZhZDRhN2NkYWNkNDFkNjgwL3NlYzo4OWM0MWUyYWYzNjY0ZmVmYWQ0YTdjZGFjZDQxZDY4MF8xL2ZyYWc6YjFlMjUxNDk1NGYxNDU0Nzg1NDUzYTk0ZDA3NDJhZmQvdGFibGU6YjAwNjdjNDJjMjEzNGE0ZDhkY2QwZTRkY2M4ODBkNzQvdGFibGVyYW5nZTpiMDA2N2M0MmMyMTM0YTRkOGRjZDBlNGRjYzg4MGQ3NF8wLTAtMS0xLTIyMTM0OQ_375e85b5-560d-4788-9d66-04d3a5472098">PA</dei:EntityIncorporationStateCountryCode>
    <dei:EntityFileNumber
      contextRef="i0f6d025e51074f4196dc87b2ff575ede_D20230125-20230125"
      id="id3VybDovL2RvY3MudjEvZG9jOjg5YzQxZTJhZjM2NjRmZWZhZDRhN2NkYWNkNDFkNjgwL3NlYzo4OWM0MWUyYWYzNjY0ZmVmYWQ0YTdjZGFjZDQxZDY4MF8xL2ZyYWc6YjFlMjUxNDk1NGYxNDU0Nzg1NDUzYTk0ZDA3NDJhZmQvdGFibGU6YjAwNjdjNDJjMjEzNGE0ZDhkY2QwZTRkY2M4ODBkNzQvdGFibGVyYW5nZTpiMDA2N2M0MmMyMTM0YTRkOGRjZDBlNGRjYzg4MGQ3NF8wLTEtMS0xLTIyMTM0OQ_e1c184b1-2ab8-4618-84b2-c7410ea53357">0-12508</dei:EntityFileNumber>
    <dei:EntityTaxIdentificationNumber
      contextRef="i0f6d025e51074f4196dc87b2ff575ede_D20230125-20230125"
      id="id3VybDovL2RvY3MudjEvZG9jOjg5YzQxZTJhZjM2NjRmZWZhZDRhN2NkYWNkNDFkNjgwL3NlYzo4OWM0MWUyYWYzNjY0ZmVmYWQ0YTdjZGFjZDQxZDY4MF8xL2ZyYWc6YjFlMjUxNDk1NGYxNDU0Nzg1NDUzYTk0ZDA3NDJhZmQvdGFibGU6YjAwNjdjNDJjMjEzNGE0ZDhkY2QwZTRkY2M4ODBkNzQvdGFibGVyYW5nZTpiMDA2N2M0MmMyMTM0YTRkOGRjZDBlNGRjYzg4MGQ3NF8wLTMtMS0xLTIyMTM0OQ_9f58f630-6c78-404c-b041-0b6544b766bb">25-1434426</dei:EntityTaxIdentificationNumber>
    <dei:EntityAddressAddressLine1
      contextRef="i0f6d025e51074f4196dc87b2ff575ede_D20230125-20230125"
      id="id3VybDovL2RvY3MudjEvZG9jOjg5YzQxZTJhZjM2NjRmZWZhZDRhN2NkYWNkNDFkNjgwL3NlYzo4OWM0MWUyYWYzNjY0ZmVmYWQ0YTdjZGFjZDQxZDY4MF8xL2ZyYWc6YjFlMjUxNDk1NGYxNDU0Nzg1NDUzYTk0ZDA3NDJhZmQvdGFibGU6YjAwNjdjNDJjMjEzNGE0ZDhkY2QwZTRkY2M4ODBkNzQvdGFibGVyYW5nZTpiMDA2N2M0MmMyMTM0YTRkOGRjZDBlNGRjYzg4MGQ3NF8zLTAtMS0xLTIyMTM0OQ_1dbe1dd7-6358-49c4-a708-f5e9ed25c613">800 Philadelphia Street</dei:EntityAddressAddressLine1>
    <dei:EntityAddressCityOrTown
      contextRef="i0f6d025e51074f4196dc87b2ff575ede_D20230125-20230125"
      id="id3VybDovL2RvY3MudjEvZG9jOjg5YzQxZTJhZjM2NjRmZWZhZDRhN2NkYWNkNDFkNjgwL3NlYzo4OWM0MWUyYWYzNjY0ZmVmYWQ0YTdjZGFjZDQxZDY4MF8xL2ZyYWc6YjFlMjUxNDk1NGYxNDU0Nzg1NDUzYTk0ZDA3NDJhZmQvdGFibGU6YjAwNjdjNDJjMjEzNGE0ZDhkY2QwZTRkY2M4ODBkNzQvdGFibGVyYW5nZTpiMDA2N2M0MmMyMTM0YTRkOGRjZDBlNGRjYzg4MGQ3NF8zLTEtMS0xLTIyMTM0OQ_ccd1ad8b-8741-4771-9a88-a1483e569aed">Indiana</dei:EntityAddressCityOrTown>
    <dei:EntityAddressStateOrProvince
      contextRef="i0f6d025e51074f4196dc87b2ff575ede_D20230125-20230125"
      id="id3VybDovL2RvY3MudjEvZG9jOjg5YzQxZTJhZjM2NjRmZWZhZDRhN2NkYWNkNDFkNjgwL3NlYzo4OWM0MWUyYWYzNjY0ZmVmYWQ0YTdjZGFjZDQxZDY4MF8xL2ZyYWc6YjFlMjUxNDk1NGYxNDU0Nzg1NDUzYTk0ZDA3NDJhZmQvdGFibGU6YjAwNjdjNDJjMjEzNGE0ZDhkY2QwZTRkY2M4ODBkNzQvdGFibGVyYW5nZTpiMDA2N2M0MmMyMTM0YTRkOGRjZDBlNGRjYzg4MGQ3NF8zLTItMS0xLTIyMTM0OQ_df5da3d7-bd2e-4b8a-8a15-c3320c48c765">PA</dei:EntityAddressStateOrProvince>
    <dei:EntityAddressPostalZipCode
      contextRef="i0f6d025e51074f4196dc87b2ff575ede_D20230125-20230125"
      id="id3VybDovL2RvY3MudjEvZG9jOjg5YzQxZTJhZjM2NjRmZWZhZDRhN2NkYWNkNDFkNjgwL3NlYzo4OWM0MWUyYWYzNjY0ZmVmYWQ0YTdjZGFjZDQxZDY4MF8xL2ZyYWc6YjFlMjUxNDk1NGYxNDU0Nzg1NDUzYTk0ZDA3NDJhZmQvdGFibGU6YjAwNjdjNDJjMjEzNGE0ZDhkY2QwZTRkY2M4ODBkNzQvdGFibGVyYW5nZTpiMDA2N2M0MmMyMTM0YTRkOGRjZDBlNGRjYzg4MGQ3NF8zLTMtMS0xLTIyMTM0OQ_be63c277-e560-4180-8456-780b58d4f35c">15701</dei:EntityAddressPostalZipCode>
    <dei:CityAreaCode
      contextRef="i0f6d025e51074f4196dc87b2ff575ede_D20230125-20230125"
      id="id3VybDovL2RvY3MudjEvZG9jOjg5YzQxZTJhZjM2NjRmZWZhZDRhN2NkYWNkNDFkNjgwL3NlYzo4OWM0MWUyYWYzNjY0ZmVmYWQ0YTdjZGFjZDQxZDY4MF8xL2ZyYWc6YjFlMjUxNDk1NGYxNDU0Nzg1NDUzYTk0ZDA3NDJhZmQvdGV4dHJlZ2lvbjpiMWUyNTE0OTU0ZjE0NTQ3ODU0NTNhOTRkMDc0MmFmZF80MTUx_893ac136-3280-4722-97da-c963da22fd82">800</dei:CityAreaCode>
    <dei:LocalPhoneNumber
      contextRef="i0f6d025e51074f4196dc87b2ff575ede_D20230125-20230125"
      id="id3VybDovL2RvY3MudjEvZG9jOjg5YzQxZTJhZjM2NjRmZWZhZDRhN2NkYWNkNDFkNjgwL3NlYzo4OWM0MWUyYWYzNjY0ZmVmYWQ0YTdjZGFjZDQxZDY4MF8xL2ZyYWc6YjFlMjUxNDk1NGYxNDU0Nzg1NDUzYTk0ZDA3NDJhZmQvdGV4dHJlZ2lvbjpiMWUyNTE0OTU0ZjE0NTQ3ODU0NTNhOTRkMDc0MmFmZF80MTQ4_ef3246eb-7551-4206-a5af-a2433da5ee19">325-2265</dei:LocalPhoneNumber>
    <dei:WrittenCommunications
      contextRef="i0f6d025e51074f4196dc87b2ff575ede_D20230125-20230125"
      id="id3VybDovL2RvY3MudjEvZG9jOjg5YzQxZTJhZjM2NjRmZWZhZDRhN2NkYWNkNDFkNjgwL3NlYzo4OWM0MWUyYWYzNjY0ZmVmYWQ0YTdjZGFjZDQxZDY4MF8xL2ZyYWc6YjFlMjUxNDk1NGYxNDU0Nzg1NDUzYTk0ZDA3NDJhZmQvdGV4dHJlZ2lvbjpiMWUyNTE0OTU0ZjE0NTQ3ODU0NTNhOTRkMDc0MmFmZF80MTUy_2b1d744d-4c46-4559-875b-f92cf3f42a95">false</dei:WrittenCommunications>
    <dei:SolicitingMaterial
      contextRef="i0f6d025e51074f4196dc87b2ff575ede_D20230125-20230125"
      id="id3VybDovL2RvY3MudjEvZG9jOjg5YzQxZTJhZjM2NjRmZWZhZDRhN2NkYWNkNDFkNjgwL3NlYzo4OWM0MWUyYWYzNjY0ZmVmYWQ0YTdjZGFjZDQxZDY4MF8xL2ZyYWc6YjFlMjUxNDk1NGYxNDU0Nzg1NDUzYTk0ZDA3NDJhZmQvdGV4dHJlZ2lvbjpiMWUyNTE0OTU0ZjE0NTQ3ODU0NTNhOTRkMDc0MmFmZF80MTUz_0b3eb152-791b-4c2e-b56e-0bc13b029667">false</dei:SolicitingMaterial>
    <dei:PreCommencementTenderOffer
      contextRef="i0f6d025e51074f4196dc87b2ff575ede_D20230125-20230125"
      id="id3VybDovL2RvY3MudjEvZG9jOjg5YzQxZTJhZjM2NjRmZWZhZDRhN2NkYWNkNDFkNjgwL3NlYzo4OWM0MWUyYWYzNjY0ZmVmYWQ0YTdjZGFjZDQxZDY4MF8xL2ZyYWc6YjFlMjUxNDk1NGYxNDU0Nzg1NDUzYTk0ZDA3NDJhZmQvdGV4dHJlZ2lvbjpiMWUyNTE0OTU0ZjE0NTQ3ODU0NTNhOTRkMDc0MmFmZF80MTQ1_f214adcc-05ed-4aba-aa0f-bb8076807cf3">false</dei:PreCommencementTenderOffer>
    <dei:PreCommencementIssuerTenderOffer
      contextRef="i0f6d025e51074f4196dc87b2ff575ede_D20230125-20230125"
      id="id3VybDovL2RvY3MudjEvZG9jOjg5YzQxZTJhZjM2NjRmZWZhZDRhN2NkYWNkNDFkNjgwL3NlYzo4OWM0MWUyYWYzNjY0ZmVmYWQ0YTdjZGFjZDQxZDY4MF8xL2ZyYWc6YjFlMjUxNDk1NGYxNDU0Nzg1NDUzYTk0ZDA3NDJhZmQvdGV4dHJlZ2lvbjpiMWUyNTE0OTU0ZjE0NTQ3ODU0NTNhOTRkMDc0MmFmZF80MTU0_46620efb-d584-4e49-819a-d40ba3a8388f">false</dei:PreCommencementIssuerTenderOffer>
    <dei:Security12bTitle
      contextRef="i0f6d025e51074f4196dc87b2ff575ede_D20230125-20230125"
      id="id3VybDovL2RvY3MudjEvZG9jOjg5YzQxZTJhZjM2NjRmZWZhZDRhN2NkYWNkNDFkNjgwL3NlYzo4OWM0MWUyYWYzNjY0ZmVmYWQ0YTdjZGFjZDQxZDY4MF8xL2ZyYWc6YjFlMjUxNDk1NGYxNDU0Nzg1NDUzYTk0ZDA3NDJhZmQvdGFibGU6YTUyZTRkNGJhMGRkNDcyOTg2MWYxOWIzYWQzYjM3YzcvdGFibGVyYW5nZTphNTJlNGQ0YmEwZGQ0NzI5ODYxZjE5YjNhZDNiMzdjN18xLTAtMS0xLTIyMTM0OQ_e9c291f4-cda7-4a5f-9d1a-e5ef4f088818">Common Stock, $2.50 par value</dei:Security12bTitle>
    <dei:TradingSymbol
      contextRef="i0f6d025e51074f4196dc87b2ff575ede_D20230125-20230125"
      id="id3VybDovL2RvY3MudjEvZG9jOjg5YzQxZTJhZjM2NjRmZWZhZDRhN2NkYWNkNDFkNjgwL3NlYzo4OWM0MWUyYWYzNjY0ZmVmYWQ0YTdjZGFjZDQxZDY4MF8xL2ZyYWc6YjFlMjUxNDk1NGYxNDU0Nzg1NDUzYTk0ZDA3NDJhZmQvdGFibGU6YTUyZTRkNGJhMGRkNDcyOTg2MWYxOWIzYWQzYjM3YzcvdGFibGVyYW5nZTphNTJlNGQ0YmEwZGQ0NzI5ODYxZjE5YjNhZDNiMzdjN18xLTEtMS0xLTIyMTM0OQ_d8533b7d-eaf7-4741-89cf-14122eaeb3ef">STBA</dei:TradingSymbol>
    <dei:SecurityExchangeName
      contextRef="i0f6d025e51074f4196dc87b2ff575ede_D20230125-20230125"
      id="id3VybDovL2RvY3MudjEvZG9jOjg5YzQxZTJhZjM2NjRmZWZhZDRhN2NkYWNkNDFkNjgwL3NlYzo4OWM0MWUyYWYzNjY0ZmVmYWQ0YTdjZGFjZDQxZDY4MF8xL2ZyYWc6YjFlMjUxNDk1NGYxNDU0Nzg1NDUzYTk0ZDA3NDJhZmQvdGFibGU6YTUyZTRkNGJhMGRkNDcyOTg2MWYxOWIzYWQzYjM3YzcvdGFibGVyYW5nZTphNTJlNGQ0YmEwZGQ0NzI5ODYxZjE5YjNhZDNiMzdjN18xLTItMS0xLTIyMTM0OQ_56654689-9a2c-40b7-b63a-1f9f278f9940">NASDAQ</dei:SecurityExchangeName>
    <dei:EntityEmergingGrowthCompany
      contextRef="i0f6d025e51074f4196dc87b2ff575ede_D20230125-20230125"
      id="id3VybDovL2RvY3MudjEvZG9jOjg5YzQxZTJhZjM2NjRmZWZhZDRhN2NkYWNkNDFkNjgwL3NlYzo4OWM0MWUyYWYzNjY0ZmVmYWQ0YTdjZGFjZDQxZDY4MF8xL2ZyYWc6YjFlMjUxNDk1NGYxNDU0Nzg1NDUzYTk0ZDA3NDJhZmQvdGV4dHJlZ2lvbjpiMWUyNTE0OTU0ZjE0NTQ3ODU0NTNhOTRkMDc0MmFmZF80MTQ2_8c395478-48ae-4759-a562-06a696d3e03e">false</dei:EntityEmergingGrowthCompany>
    <dei:EntityEmergingGrowthCompany
      contextRef="i0f6d025e51074f4196dc87b2ff575ede_D20230125-20230125"
      id="id3VybDovL2RvY3MudjEvZG9jOjg5YzQxZTJhZjM2NjRmZWZhZDRhN2NkYWNkNDFkNjgwL3NlYzo4OWM0MWUyYWYzNjY0ZmVmYWQ0YTdjZGFjZDQxZDY4MF8xL2ZyYWc6YjFlMjUxNDk1NGYxNDU0Nzg1NDUzYTk0ZDA3NDJhZmQvdGV4dHJlZ2lvbjpiMWUyNTE0OTU0ZjE0NTQ3ODU0NTNhOTRkMDc0MmFmZF80MTQ3_ad727ef8-be94-408c-89c0-e517e44619e9">false</dei:EntityEmergingGrowthCompany>
</xbrl>
