Data security is the science of protecting data in information technology, including authentication, data encryption, data decryption, data recovery, and user protection. To protect data from unauthorized disclosure and modification, a secure algorithm should be used. Many techniques have been proposed to encrypt text to an image. Most past studies used RGB layers to encrypt text to an image. In this paper, a Text-to-Image Encryption-Decryption (TTIED) algorithm based on Cyan, Magenta, Yellow, Key/Black (CMYK) mode is proposed to improve security, capacity, and processing time. The results show that the capacity increased from one to four times compared to RGB mode. Security was also improved due to a decrease in the probability of an adversary discovering keys. The processing time ranged between 0.001 ms (668 characters) and 31 s (25 million characters), depending on the length of the text. The compression rate for the encrypted file was decreased compared to WinRAR. In this study, Arabic and English texts were encrypted and decrypted.