An optical security device (1, 1') comprising a carrier, and a plurality of surface elements (8, 8a, 8b, 8c, 18a, 18b, 18c) which are arranged distributed on a surface of the carrier and having a first diffractive element, wherein the first diffractive element has a structure which repeats periodically in a first direction, wherein the surface elements (8, 8a, 8b, 8c, 18a, 18b, 18c) having the first diffractive element form a plurality of groups respectively having at least two surface elements (8, 8a, 8b, 8c, 18a, 18b, 18c), wherein the surface elements (8, 8a, 8b, 8c, 18a, 18b, 18c) having the first diffractive element of each group are of such a configuration and arrangement that the first diffractive elements produce for a viewer or a viewing device a pixel of a first image (13, 14), wherein the first image (13, 14) is composed of the pixels produced by the plurality of groups, wherein the surface elements (8, 8a, 8b, 8c, 18a, 18b, 18c) are of such an arrangement and configuration that in an operation of the security device (1, 1') the number of surface elements (8, 8a, 8b, 8c, 18a, 18b, 18c) of a group which produce a pixel of the first image (13, 14) or the surface elements (8, 8a, 8b, 8c, 18a, 18b, 18c) of the group, that are involved in the production of the pixel, depend on an angle of incidence (α) at which light from a light source is incident on the security device (1, 1'), or on a viewing angle (β), at which the viewer or the viewing device views the security device (1, 1'), and wherein the surface elements (8, 8a, 8b, 8c, 18a, 18b, 18c) are of such an arrangement and configuration that in operation of the security device (1, 1') a position of the first image (13, 14) in a viewing space for the viewer or the viewing device depends on the angle of incidence (α) or the viewing angle (β), characterised in that at least one surface element (8, 8a, 8b, 8c, 18a, 18b, 18c) in addition to the first diffractive element has a second diffractive element with a structure which is periodically repeated in a second direction, wherein the first direction and the second direction are different from each other, wherein the first and second diffractive elements are in at least partially spatially mutually superposed relationship on the surface element (8, 8a, 8b, 8c, 18a, 18b, 18c), wherein the surface element (8, 8a, 8b, 8c, 18a, 18b, 18c) having the second diffractive element forms a part of a group having at least two surface elements (8, 8a, 8b, 8c, 18a, 18b, 18c), wherein the surface element (8, 8a, 8b, 8c, 18a, 18b, 18c) having the second diffractive element is of such an arrangement and configuration that the diffractive elements of the surface elements (8, 8a, 8b, 8c, 18a, 18b, 18c) of the group produce for a viewer or a viewing device a pixel of the first image or a second image (16, 17, 16', 17') in the viewing space, and wherein the surface elements (8, 8a, 8b, 8c, 18a, 18b, 18c) of a first group of surface elements which produce a pixel of the first image in the viewing space and the surface elements (8, 8a, 8b, 8c, 18a, 18b, 18c) of a second group of surface elements which produce a pixel of the second image in the viewing space are of such an arrangement and configuration that at a predetermined viewing distance a viewer or a viewing device can no longer perceive the pixel of the first image and the pixel of the second image as separate pixels, but perceives a single pixel of an intensity which is increased compared to a pixel produced by only one group.