Derivatives and hedging activities - Credit derivatives (Details 5) - CHF (SFr)
SFr in Billions
12 Months Ended
Dec. 31, 2021
Dec. 31, 2020
Credit Derivatives [Line Items]    
Credit protection sold SFr 230.3 SFr 204.8
Credit protection purchased 213.7 189.4
Other protection purchased 50.8 59.2
Other instruments 12.0 14.4
Total credit derivatives 506.8 467.8
Bank    
Credit Derivatives [Line Items]    
Credit protection sold 230.3 204.8
Credit protection purchased 213.7 189.4
Other protection purchased 50.8 59.2
Other instruments 12.0 14.4
Total credit derivatives SFr 506.8 SFr 467.8