The Advanced Encryption Standard or better known as the AES Algorithm is a standard algorithm and has been widely used as an application of cryptography. Currently, a lot of research is developing about attacks on the AES algorithm. Therefore, there have been many studies related to modifications to the AES algorithm with the aim of increasing the security of the algorithm and to produce alternatives to encryption algorithms that can be used to secure data. In this study, modifications were made to the AES algorithm by replacing the S-box using the perfect SAC S-box in the SubBytes process. The Perfect SAC S-box has an exact SAC average value of 0.5. The S-box that will be used must have good security strength, therefore the perfect SAC S-box is tested, namely the AC, SAC, BIC, XOR Table Distribution, and LAT Distribution tests. Based on the results of the study, it was found that the perfect SAC S-box had almost the same S-box test results as the AES S-box. Furthermore, after the perfect SAC S-box is applied to the AES algorithm, it is analyzed how the effect of these modifications on the AES algorithm uses randomness testing for the block cipher algorithm, namely the strict avalanche criterion (SAC) test. The results of the AES test with perfect SAC S-box can meet the SAC test since the second round with better results than the original AES algorithm with SAC values of 0.5003 and 0.5019.