The biggest problem facing the world is information security in the digital era. Information protection and integrity are hot topics at all times, so many techniques have been introduced to transmit and store data securely. The increase in computing power is increasing the number of security breaches and attacks at a higher rate than before on average. Thus, a number of existing security systems are at risk of hacking. This paper proposes an encryption technique called Partial Deep-Learning Encryption Technique (PD-LET) to achieve data security. PD-LET includes several stages for encoding and decoding digital data. Data preprocessing, convolution layer of standard deep learning algorithm, zigzag transformation, image partitioning, and encryption key are the main stages of PD-LET. Initially, the proposed technique converts digital data into the corresponding matrix and then applies encryption stages to it. The implementation of encrypting stages is frequently changed. This collaboration between deep learning and zigzag transformation techniques provides the best output result and transfers the original data into a completely undefined image which makes the proposed technique efficient and secure via data encryption. Moreover, its implementation phases are continuously changed during the encryption phase, which makes the data encryption technique more immune to some future attacks because breaking this technique needs to know all the information about the encryption technique. The security analysis of the obtained results shows that it is computationally impractical to break the proposed technique due to the large size and diversity of keys and PD-LET has achieved a reliable security system.