A computer-implemented method for encrypting binary data may include encoding raw binary data in Base64 format to generate Base64 binary data. The Base64 binary data may be encrypted, by a computer processor, using format-preserving encryption to generate Base64 ciphertext. The Base64 ciphertext may be validatable by a Base64 validator.