Mechanistic study on the fluorination of K[B(CN)4] with ClF enabling the high yield and large scale synthesis of K[B(CF3)4] and K[(CF3)3BCN].