The application provides an optical anti-counterfeiting element and an anti-counterfeiting product. The optical anti-counterfeiting element comprises a substrate, and a code pattern, wherein a part of a side surface of the substrate is provided with the code pattern, the code pattern reproduces preset information through decoding, the code pattern comprises a first part and a second part, the first part and the second part are arranged in mutual embedding, the first part is transparent, and at least a local characteristic size of the first part is not greater than 5 microns, the second part comprises an optical
microstructure and a plating layer covering the optical
microstructure on a side surface away from the substrate, when a
light beam is incident on the first part and the second part, the second part provides a line optical anti-counterfeiting feature in a reflection light direction and near the reflection light direction visible to a
human eye, the first part generates a transmission
light field, and the transmission
light field reproduces the preset information. The application solves the problem that the optical anti-counterfeiting element in the prior art is difficult to simultaneously consider concealment and security.