In the internet, packets are classified by source and destination addresses, ports, and protocol type. Ternary content addressable memories (TCAMs) are often used to perform this operation. However, high-reliability packet classifiers in aerospace network applications require soft-error tolerant TCAMs to prevent system from errors caused by environmental factors such as high-energy radiations. This paper shows a soft-error tolerant TCAM (STTCAM), which enhances the reliability of TCAMs for soft-errors. The STTCAM randomly selects a search key to be evaluated. Then, parallel TCAMs detect single-bit flip errors. When the search key matches the last word, the STTCAM calculates the similarity of the search key to the TCAM word. If 99% of similarity is detected, then a suspected error is found and the STTCAM refreshes the TCAM words by using a backup ECC-SRAM. Experimental results show that the STTCAM improves TCAMs reliability significantly than the existing scheme. The STTCAM can be easily implemented and is useful for fault-tolerant packet classifiers.