The modular inversion is an essential and the most time consuming arithmetic operation in Elliptic Curve Cryptography (ECC). This paper presents an improved scalable dual-field Montgomery modular inversion algorithm which is based on Kaliski algorithm. It can support the prime number modular inversion algorithm and binary modular inversion algorithm. According to the algorithm, the hardware architecture is designed. The result of experimentation shows that the hardware design is superior to other hardware designs in operation time, circuit area and flexibility.