The upper house voted to approve the law, which was passed by the lower house earlier this month.
The law provides for prison terms of up to one year and fines of up to USD 9,800 for having pornographic photographs or videos of children. It allows a grace period of one year for people owning such materials to dispose of them.
The law was first proposed in May 2013 as an amendment to an earlier law that banned production and distribution of child pornography but not ownership of such materials.
The exclusion was made after publishers and lawyers' associations contended that a ban on such images would violate the constitutional right of free speech.
More From This Section
According to humantrafficking.Org, Japan is a hub for the production and distribution of child pornography, part of a massive sex industry that includes prostitutes dressed in school uniforms and other outfits meant to cater to pedophiles.
Police say widespread use of smart phones has aided the distribution of pornographic images of children. They reported 1,644 cases of child pornography in 2013.