Loans, allowance for loan losses and credit quality (Details) - CHF (SFr)
SFr in Millions
Dec. 31, 2021
Dec. 31, 2020
Dec. 31, 2019
Dec. 31, 2018
Loans        
Gross loans SFr 293,064 SFr 293,539    
of which held at amortized cost 282,821 282,131    
of which held at fair value 10,243 11,408    
Net (unearned income)/deferred expenses (81) (95)    
Allowance for credit losses (1,297) (1,536) SFr (1,049)  
Allowance for loan losses     (946) SFr (902)
Net loans 291,686 291,908    
Non-performing loans 1,666 1,666    
Non-interest-earning loans 298 375    
Non-accrual loans 1,964 2,041 1,510  
Restructured loans 367 313    
Potential problem loans 436 843    
Total other impaired loans 803 1,156    
Gross impaired loans 2,767 3,197    
Consumer mortgages secured by residential real estate for which formal foreclosure proceedings according to local requirements of the applicable jurisdiction were in process 130 180    
Switzerland        
Loans        
Gross loans 167,957 168,589    
Foreign        
Loans        
Gross loans 125,107 124,950    
Corporate and institutional        
Loans        
Gross loans 126,203 129,007    
of which held at amortized cost 116,155 117,685    
Allowance for credit losses (940) (1,218) (808)  
Allowance for loan losses     (760) (715)
Non-accrual loans 925 1,317 883  
Corporate and institutional | Real estate        
Loans        
Gross loans 28,529 29,045    
of which held at amortized cost 27,805 28,211    
Non-accrual loans 167 324 155  
Corporate and institutional | Commercial and industrial loans        
Loans        
Gross loans 69,129 74,097    
of which held at amortized cost 66,147 70,563    
Non-accrual loans 698 925 682  
Corporate and institutional | Financial institutions        
Loans        
Gross loans 25,222 22,487    
of which held at amortized cost 20,916 17,901    
Non-accrual loans 41 68 46  
Corporate and institutional | Governments and public institutions        
Loans        
Gross loans 3,323 3,378    
of which held at amortized cost 1,287 1,010    
Non-accrual loans 19 0 0  
Consumer        
Loans        
Gross loans 166,861 164,532    
of which held at amortized cost 166,666 164,446    
Allowance for credit losses (357) (318) (241)  
Allowance for loan losses     (186) (187)
Non-accrual loans 1,039 724 627  
Consumer | Mortgages        
Loans        
Gross loans 110,533 109,067    
of which held at amortized cost 110,533 109,067    
Non-accrual loans 572 418 337  
Consumer | Loans collateralized by securities        
Loans        
Gross loans 51,253 51,028    
of which held at amortized cost 51,253 51,028    
Non-accrual loans 262 105 122  
Consumer | Consumer finance        
Loans        
Gross loans 5,075 4,437    
of which held at amortized cost 4,880 4,351    
Non-accrual loans 205 201 168  
Bank        
Loans        
Gross loans 301,735 301,971    
of which held at amortized cost 291,492 290,563    
of which held at fair value 10,243 11,408    
Net (unearned income)/deferred expenses (81) (95)    
Allowance for credit losses (1,296) (1,535) (1,048)  
Allowance for loan losses     (945) (901)
Net loans 300,358 300,341    
Non-performing loans 1,666 1,666    
Non-interest-earning loans 286 363    
Non-accrual loans 1,952 2,029 1,498  
Restructured loans 367 313    
Potential problem loans 436 843    
Total other impaired loans 803 1,156    
Gross impaired loans 2,755 3,185    
Consumer mortgages secured by residential real estate for which formal foreclosure proceedings according to local requirements of the applicable jurisdiction were in process 130 180    
Bank | Switzerland        
Loans        
Gross loans 175,903 176,312    
Bank | Foreign        
Loans        
Gross loans 125,832 125,659    
Bank | Corporate and institutional        
Loans        
Gross loans 134,874 137,439    
of which held at amortized cost 116,143 117,673    
Allowance for credit losses (939) (1,217) (807)  
Allowance for loan losses     (759) (714)
Non-accrual loans 913 1,305 871  
Bank | Corporate and institutional | Real estate        
Loans        
Gross loans 28,529 29,045    
of which held at amortized cost 27,805 28,211    
Non-accrual loans 167 324 155  
Bank | Corporate and institutional | Commercial and industrial loans        
Loans        
Gross loans 69,756 74,700    
of which held at amortized cost 66,135 70,551    
Non-accrual loans 686 913 670  
Bank | Corporate and institutional | Financial institutions        
Loans        
Gross loans 33,266 30,316    
of which held at amortized cost 20,916 17,901    
Non-accrual loans 41 68 46  
Bank | Corporate and institutional | Governments and public institutions        
Loans        
Gross loans 3,323 3,378    
of which held at amortized cost 1,287 1,010    
Non-accrual loans 19 0 0  
Bank | Consumer        
Loans        
Gross loans 166,861 164,532    
of which held at amortized cost 166,666 164,446    
Allowance for credit losses (357) (318) (241)  
Allowance for loan losses     (186) SFr (187)
Non-accrual loans 1,039 724 627  
Bank | Consumer | Mortgages        
Loans        
Gross loans 110,533 109,067    
of which held at amortized cost 110,533 109,067    
Non-accrual loans 572 418 337  
Bank | Consumer | Loans collateralized by securities        
Loans        
Gross loans 51,253 51,028    
of which held at amortized cost 51,253 51,028    
Non-accrual loans 262 105 122  
Bank | Consumer | Consumer finance        
Loans        
Gross loans 5,075 4,437    
of which held at amortized cost 4,880 4,351    
Non-accrual loans SFr 205 SFr 201 SFr 168