Disclosed is a transparent self-assembling polymer clay nanocomposite coating that is useful in food, drink and electronic packaging as a gas barrier and on textiles and clothing as a flame retardant coating. The coating consists of two main components that include a water dispersible polymer and a sheet like nanoparticle. The polymers are polyvinylpyrrolidone or polyacrylic acid and or co-polymers with pyrrolidone or acrylic acid and the nanoparticles include smectite clays and double metal hydroxides. The coatings can be applied to any substrate. The coatings are applied sequentially with polymer being applied first followed by the nanoparticles. This sequence results in the self-assembly of a highly ordered nanocomposite film that exhibits high barrier properties and flame retardancy. The desired level of gas barrier or flame retardancy desired can be adjusted by the number of bilayers applied. The coating can be applied by ink jet printing, rotogravure printing, doctor knife, dip coating, paint sprayer, or any other method that gives control of layer thickness. The gas barrier performance of 5 bilayers of coatings of this invention exceed that of aluminized mylar yet are transparent.