The invention provides an implementation mode of an extensible format-preserving encryption method, which comprises the following steps: firstly, judging the type of a field to be encrypted in a usersensitive information database, determining whether the field belongs to a common message space or not, and if so, according to a character set identifier of data, acquiring a specific character set in a common message space defined in the program in advance; and if not, expanding a new message space, and obtaining a newly-added character set; mapping plaintext character strings needing to be encrypted through the character sets obtained respectively, and encoding the plaintext character strings into plaintext numeric strings; encrypting to obtain a ciphertext numeric string; and finally, selecting a character set of the message space according to the character set identifier, and performing inverse mapping on the encrypted ciphertext numeric string to obtain ciphertext character strings with the same format, thereby finishing encryption. By defining and configuring the message space, the configurable and extensible FPE message space is realized, the new message space does not need tobe adapted by modifying a bottom layer code, and the practicability of the FPE encryption method is improved.