Quality issues caused by casting defects are commonly complicated to solve, because the part-specific process parameters are not traced to the individual cast part. This problem can be mitigated by the traceability of each cast part with an identifier code. Therefore, a study of the influence of marked surface topography and post-treatments on code symbol quality is desirable for a well-designed traceability system. In this work, the code symbol quality of laser, dot peen, and electrolytic marking methods on three as-cast surfaces of Al–Si alloy, after sandblasting and heat treatment, is evaluated comparatively with a customized image processing software. The result shows that the laser marking method produces the highest performance for different as-cast surfaces; electrolytic marking provides acceptable results only on the smooth surfaces of high-pressure die casting; dot peen marking produces the codes of high symbol contrasts, which are similar to those of laser marking, especially for rough as-cast surfaces of sand casting. However, for all marking methods, the code qualities of all surface topographies decrease substantially after post-treatments. Considering that dot peen marking has satisfying performances as well as low equipment and maintenance costs, this method is more suitable for small- and medium-size foundries to start to trace each cast part in an economical manner.