Quantum mechanics allows events to happen with no definite causal order: this can be verified by measuring a causal witness, in the same way that an entanglement witness verifies entanglement. Here, we realize a photonic quantum switch, where two operations A ^ and B ^ act in a quantum superposition of their two possible orders. The operations are on the transverse spatial mode of the photons; polarization coherently controls their order. Our implementation ensures that the operations cannot be distinguished by spatial or temporal position—further it allows qudit encoding in the target. We confirm our quantum switch has no definite causal order by constructing a causal witness and measuring its value to be 18 standard deviations beyond the definite-order bound.