N (dot) p = 0
where (dot) is the dot product.
In components this reads
Nx*px + Ny*py + Nz*pz = 0
If you need to have one at a glance, try p = (0, Nz, -Ny)
(Note: The reason your procedure works in 2D is that:
p = (Nx, -Ny) ==> Nx*(-Ny) + Ny*(Nx) = 0
It's the same principle.)