v3.25.2
Cover - shares
9 Months Ended
Jun. 30, 2025
Aug. 01, 2025
Cover [Abstract]    
Document Type 10-Q  
Document Annual Report true  
Document Period End Date Jun. 30, 2025  
Document Transition Report false  
Securities Act File Number 1-33901  
Entity Registrant Name Oaktree Specialty Lending Corporation  
Entity Incorporation, State or Country Code DE  
Entity Tax Identification Number 26-1219283  
Entity Address, Address Line One 333 South Grand Avenue  
Entity Address, Address Line Two 28th Floor  
Entity Address, City or Town Los Angeles  
Entity Address, State or Province CA  
Entity Address, Postal Zip Code 90071  
City Area Code 213  
Local Phone Number 830-6300  
Title of 12(b) Security Common Stock, par value $0.01 per share  
Trading Symbol OCSL  
Security Exchange Name NASDAQ  
Entity Current Reporting Status Yes  
Entity Interactive Data Current Yes  
Entity Filer Category Large Accelerated Filer  
Entity Small Business false  
Entity Emerging Growth Company false  
Entity Shell Company false  
Entity Common Stock, Shares Outstanding   88,085,523
Entity Central Index Key 0001414932  
Document Fiscal Year Focus 2025  
Document Fiscal Period Focus Q3  
Amendment Flag false  
Current Fiscal Year End Date --09-30