Provided are sulfonamide derivative compounds of the general formulae (I), (Ia), (Ib), (Ic), (Id), (II), (IV) and (V), wherein the variables are as defined in the specification. Examples of the compounds include 2-[Benzenesulfonyl-(2-chloro-5-trifluoromethyl-phenyl)-amino]-N-pyridin-4-ylmethyl-acetamide and 1-(phenylsulfonyl)-N-(pyridin-4-ylmethyl)-1H-indole-2-carboxamide.The compounds are inhibitors of hepatitis B virus covalently closed circular DNA formation.