<?xml version="1.0" encoding="utf-8"?>
<xbrl
  xmlns="http://www.xbrl.org/2003/instance"
  xmlns:dei="http://xbrl.sec.gov/dei/2025"
  xmlns:link="http://www.xbrl.org/2003/linkbase"
  xmlns:xlink="http://www.w3.org/1999/xlink">
    <link:schemaRef xlink:href="rli-20260715.xsd" xlink:type="simple"/>
    <context id="Duration_7_15_2026_To_7_15_2026_4Fn1JSG-GEaZzVlLNApIeg">
        <entity>
            <identifier scheme="http://www.sec.gov/CIK">0000084246</identifier>
        </entity>
        <period>
            <startDate>2026-07-15</startDate>
            <endDate>2026-07-15</endDate>
        </period>
    </context>
    <dei:EntityCentralIndexKey
      contextRef="Duration_7_15_2026_To_7_15_2026_4Fn1JSG-GEaZzVlLNApIeg"
      id="Tc_3f8ENNCnD0a18BGt5O6GDQ_2_1">0000084246</dei:EntityCentralIndexKey>
    <dei:AmendmentFlag
      contextRef="Duration_7_15_2026_To_7_15_2026_4Fn1JSG-GEaZzVlLNApIeg"
      id="Tc_ocQkfIUb9U-MULbxgUFwNQ_3_1">false</dei:AmendmentFlag>
    <dei:DocumentType
      contextRef="Duration_7_15_2026_To_7_15_2026_4Fn1JSG-GEaZzVlLNApIeg"
      id="Narr_-GLAb5EXr0K7odCnAe5ojw">8-K</dei:DocumentType>
    <dei:DocumentPeriodEndDate
      contextRef="Duration_7_15_2026_To_7_15_2026_4Fn1JSG-GEaZzVlLNApIeg"
      id="Narr_w7uK94249Ue3mTiy5AfqtA">2026-07-15</dei:DocumentPeriodEndDate>
    <dei:EntityRegistrantName
      contextRef="Duration_7_15_2026_To_7_15_2026_4Fn1JSG-GEaZzVlLNApIeg"
      id="Narr_Hpc2bzZhoUml43_ttHzgog">RLI Corp.</dei:EntityRegistrantName>
    <dei:EntityIncorporationStateCountryCode
      contextRef="Duration_7_15_2026_To_7_15_2026_4Fn1JSG-GEaZzVlLNApIeg"
      id="Tc_6ymUp0bDdUS30YzNZZB1_w_1_0">DE</dei:EntityIncorporationStateCountryCode>
    <dei:EntityFileNumber
      contextRef="Duration_7_15_2026_To_7_15_2026_4Fn1JSG-GEaZzVlLNApIeg"
      id="Tc_D6TTbffpV0K7K11iLiYaCA_1_2">001-09463</dei:EntityFileNumber>
    <dei:EntityTaxIdentificationNumber
      contextRef="Duration_7_15_2026_To_7_15_2026_4Fn1JSG-GEaZzVlLNApIeg"
      id="Tc_zyRuCl16_EWHAXonijrXBA_1_4">37-0889946</dei:EntityTaxIdentificationNumber>
    <dei:EntityAddressAddressLine1
      contextRef="Duration_7_15_2026_To_7_15_2026_4Fn1JSG-GEaZzVlLNApIeg"
      id="Narr_li_2VKZ5JEm-m6Rz6Id4Tw">9025 North Lindbergh Drive</dei:EntityAddressAddressLine1>
    <dei:EntityAddressCityOrTown
      contextRef="Duration_7_15_2026_To_7_15_2026_4Fn1JSG-GEaZzVlLNApIeg"
      id="Narr_MEcMav_wyUCSPGB1qfkDDQ">Peoria</dei:EntityAddressCityOrTown>
    <dei:EntityAddressStateOrProvince
      contextRef="Duration_7_15_2026_To_7_15_2026_4Fn1JSG-GEaZzVlLNApIeg"
      id="Narr_s2LI6KD4a0Wr6-0XbIHO8w">IL</dei:EntityAddressStateOrProvince>
    <dei:EntityAddressPostalZipCode
      contextRef="Duration_7_15_2026_To_7_15_2026_4Fn1JSG-GEaZzVlLNApIeg"
      id="Tc_JMVM_V48y0O-OJHEMBWpvw_1_2">61615</dei:EntityAddressPostalZipCode>
    <dei:CityAreaCode
      contextRef="Duration_7_15_2026_To_7_15_2026_4Fn1JSG-GEaZzVlLNApIeg"
      id="Narr_uwM1_THQjkONnUFQ4yfc5w">309</dei:CityAreaCode>
    <dei:LocalPhoneNumber
      contextRef="Duration_7_15_2026_To_7_15_2026_4Fn1JSG-GEaZzVlLNApIeg"
      id="Narr_t1faawMwa02u6amLLuqVww">692-1000</dei:LocalPhoneNumber>
    <dei:WrittenCommunications
      contextRef="Duration_7_15_2026_To_7_15_2026_4Fn1JSG-GEaZzVlLNApIeg"
      id="Narr_pyr2fLgiCEmZiUd127ITYg">false</dei:WrittenCommunications>
    <dei:SolicitingMaterial
      contextRef="Duration_7_15_2026_To_7_15_2026_4Fn1JSG-GEaZzVlLNApIeg"
      id="Narr_zyxMofv8UUq3iDDds1hD9w">false</dei:SolicitingMaterial>
    <dei:PreCommencementTenderOffer
      contextRef="Duration_7_15_2026_To_7_15_2026_4Fn1JSG-GEaZzVlLNApIeg"
      id="Narr_qjf_ybps2Uqh1fLBhb3YeA">false</dei:PreCommencementTenderOffer>
    <dei:PreCommencementIssuerTenderOffer
      contextRef="Duration_7_15_2026_To_7_15_2026_4Fn1JSG-GEaZzVlLNApIeg"
      id="Narr_mfg1-ubkbkCyCo2P57jr6w">false</dei:PreCommencementIssuerTenderOffer>
    <dei:Security12bTitle
      contextRef="Duration_7_15_2026_To_7_15_2026_4Fn1JSG-GEaZzVlLNApIeg"
      id="Tc_vkJLF9Vjf0K9nVnH_t4klA_2_0">Common Stock $0.01 par value</dei:Security12bTitle>
    <dei:TradingSymbol
      contextRef="Duration_7_15_2026_To_7_15_2026_4Fn1JSG-GEaZzVlLNApIeg"
      id="Tc_vMwvoneu3ECXQa71WlOmrw_2_2">RLI</dei:TradingSymbol>
    <dei:SecurityExchangeName
      contextRef="Duration_7_15_2026_To_7_15_2026_4Fn1JSG-GEaZzVlLNApIeg"
      id="Tc_zersAey2rE-7j2AESZHn9Q_2_4">NYSE</dei:SecurityExchangeName>
    <dei:EntityEmergingGrowthCompany
      contextRef="Duration_7_15_2026_To_7_15_2026_4Fn1JSG-GEaZzVlLNApIeg"
      id="Narr_nqEMhABn4EePCYz73SnT8A">false</dei:EntityEmergingGrowthCompany>
</xbrl>
