The explosion with "bomb blast-like" sound occurred in the toilet located behind the court building, eyewitnesses said.
Windowpanes were shattered due to the intensity of the explosion, police said, adding the two persons received minor injuries.
Senior police officials who rushed to the court cordoned off the area and pressed dog and bomb detection squads into service.
They said the cause of the blast is being investigated.
State Home Minister G Parameshwara, who was here today to pay last respects to Chief Minister Siddaramaiah's son Rakesh who died in Belgium on Sunday, visited the spot with DGP Omprakash.
Asked if there were any similarities to earlier explosions or any kind of suspicion, he said, "Nothing can be said now itself; let the investigation happen and let them find out about the materials used and the purpose."
The Minister said though it was a low intensity blast, its impact wasbig because walls, doors and windowpanes have been damaged.
He said police would be taking all required preventive and security measures.
