<?xml version="1.0" encoding="utf-8"?>
<xbrl
  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="tslx-20230710.xsd" xlink:type="simple"/>
    <context id="duration_2023-07-10_to_2023-07-10">
        <entity>
            <identifier scheme="http://www.sec.gov/CIK">0001508655</identifier>
        </entity>
        <period>
            <startDate>2023-07-10</startDate>
            <endDate>2023-07-10</endDate>
        </period>
    </context>
    <dei:CurrentFiscalYearEndDate
      contextRef="duration_2023-07-10_to_2023-07-10"
      id="Hidden_dei_CurrentFiscalYearEndDate_duration_2023-07-10_to_2023-07-10">--12-31</dei:CurrentFiscalYearEndDate>
    <dei:EntityCentralIndexKey
      contextRef="duration_2023-07-10_to_2023-07-10"
      id="Hidden_dei_EntityCentralIndexKey_duration_2023-07-10_to_2023-07-10">0001508655</dei:EntityCentralIndexKey>
    <dei:DocumentType contextRef="duration_2023-07-10_to_2023-07-10">8-K/A</dei:DocumentType>
    <dei:AmendmentFlag contextRef="duration_2023-07-10_to_2023-07-10">true</dei:AmendmentFlag>
    <dei:DocumentPeriodEndDate contextRef="duration_2023-07-10_to_2023-07-10">2023-07-10</dei:DocumentPeriodEndDate>
    <dei:EntityRegistrantName contextRef="duration_2023-07-10_to_2023-07-10">Sixth Street Specialty Lending, Inc.</dei:EntityRegistrantName>
    <dei:EntityIncorporationStateCountryCode contextRef="duration_2023-07-10_to_2023-07-10">DE</dei:EntityIncorporationStateCountryCode>
    <dei:EntityFileNumber contextRef="duration_2023-07-10_to_2023-07-10">001-36364</dei:EntityFileNumber>
    <dei:EntityTaxIdentificationNumber contextRef="duration_2023-07-10_to_2023-07-10">27-3380000</dei:EntityTaxIdentificationNumber>
    <dei:EntityAddressAddressLine1 contextRef="duration_2023-07-10_to_2023-07-10">2100 McKinney Avenue</dei:EntityAddressAddressLine1>
    <dei:EntityAddressAddressLine2 contextRef="duration_2023-07-10_to_2023-07-10">Suite 1500</dei:EntityAddressAddressLine2>
    <dei:EntityAddressCityOrTown contextRef="duration_2023-07-10_to_2023-07-10">Dallas</dei:EntityAddressCityOrTown>
    <dei:EntityAddressStateOrProvince contextRef="duration_2023-07-10_to_2023-07-10">TX</dei:EntityAddressStateOrProvince>
    <dei:EntityAddressPostalZipCode contextRef="duration_2023-07-10_to_2023-07-10">75201</dei:EntityAddressPostalZipCode>
    <dei:CityAreaCode contextRef="duration_2023-07-10_to_2023-07-10">469</dei:CityAreaCode>
    <dei:LocalPhoneNumber contextRef="duration_2023-07-10_to_2023-07-10">621-3001</dei:LocalPhoneNumber>
    <dei:WrittenCommunications contextRef="duration_2023-07-10_to_2023-07-10">false</dei:WrittenCommunications>
    <dei:SolicitingMaterial contextRef="duration_2023-07-10_to_2023-07-10">false</dei:SolicitingMaterial>
    <dei:PreCommencementTenderOffer contextRef="duration_2023-07-10_to_2023-07-10">false</dei:PreCommencementTenderOffer>
    <dei:PreCommencementIssuerTenderOffer contextRef="duration_2023-07-10_to_2023-07-10">false</dei:PreCommencementIssuerTenderOffer>
    <dei:Security12bTitle contextRef="duration_2023-07-10_to_2023-07-10">Common Stock, par value $0.01 per share</dei:Security12bTitle>
    <dei:TradingSymbol contextRef="duration_2023-07-10_to_2023-07-10">TSLX</dei:TradingSymbol>
    <dei:SecurityExchangeName contextRef="duration_2023-07-10_to_2023-07-10">NYSE</dei:SecurityExchangeName>
    <dei:EntityEmergingGrowthCompany contextRef="duration_2023-07-10_to_2023-07-10">false</dei:EntityEmergingGrowthCompany>
    <dei:AmendmentDescription contextRef="duration_2023-07-10_to_2023-07-10">This Amendment No.&#160;1 to the Current Report on Form 8-K amends Items 5.02, 5.03 and 9.01 of the Current Report on Form 8-K filed on July&#160;14, 2023 (the &#x201c;Original Form 8-K&#x201d;) solely to correct a clerical error in listing the date of P. Emery Covington&#x2019;s appointment and the as-of date of the bylaws as June&#160;10, 2023, when the correct date was July&#160;10, 2023. No other changes have been made to the Original Form 8-K.</dei:AmendmentDescription>
</xbrl>
