v3.25.1
Document and Entity Information Document - shares
3 Months Ended
Mar. 31, 2025
Apr. 29, 2025
Entity Information    
Document Type 10-Q  
Document Quarterly Report true  
Document Period End Date Mar. 31, 2025  
Document Transition Report false  
Entity File Number 000-51398  
Entity Registrant Name FEDERAL HOME LOAN BANK OF SAN FRANCISCO  
Entity Incorporation, State or Country Code X1  
Entity Central Index Key 0001316944  
Entity Tax Identification Number 94-6000630  
Entity Address, Address Line One 333 Bush Street, Suite 2700  
Entity Address, City or Town San Francisco,  
Entity Address, State or Province CA  
Entity Address, Postal Zip Code 94104  
City Area Code 415  
Local Phone Number 616-1000  
Amendment Flag false  
Document Fiscal Year Focus 2025  
Document Fiscal Period Focus Q1  
Current Fiscal Year End Date --12-31  
Entity Emerging Growth Company false  
Entity Small Business false  
Entity Current Reporting Status Yes  
Entity Filer Category Non-accelerated Filer  
Entity Interactive Data Current Yes  
Entity Shell Company false  
Common Stock, Shares, Outstanding   29,139,999