"Two men came into Cafe 56" around 8.15 pm local time (1915 GMT) "and fired several rounds of shots," police said in a statement, without providing information on a possible motive.
"Two customers were killed. Another is in a critical condition."
The assailants were on the run following the shooting, according to police, who said they had headed in the direction of the railway station after the attack.
"The reason behind the attack is not yet known and will be investigated," the Basel prosecutor's office said in a statement.
The road next to the cafe was closed and traffic redirected.
This right has been controversial as sometimes weapons are used at home in domestic incidents.
The number of weapons held at home is believed to be two million for a population of eight million, according to Swiss press.
(This story has not been edited by NDTV staff and is auto-generated from a syndicated feed.)