Endosomal TLRs play an important role in innate immune response as well as in autoimmune processes. In the therapy of systemic lupus erythematosus, antimalarial drugs chloroquine, hydroxychloroquine, and quinacrine have been used for a long time. Their suppression of endosomal TLR activation has been attributed to the inhibition of endosomal acidification, which is a prerequisite for the activation of these receptors. We discovered that chloroquine inhibits only activation of endosomal TLRs by nucleic acids, whereas it augments activation of TLR8 by a small synthetic compound, R848. We detected direct binding of antimalarials to nucleic acids by spectroscopic experiments and determined their cellular colocalization. Further analysis revealed that other nucleic acid-binding compounds, such as propidium iodide, also inhibited activation of endosomal TLRs and colocalized with nucleic acids to endosomes. We found that imidazoquinolines, which are TLR7/8 agonists, inhibit TLR9 and TLR3 even in the absence of TLR7 or TLR8, and their mechanism of inhibition is similar to the antimalarials. In contrast to bafilomycin, none of the tested antimalarials and imidazoquinolines inhibited endosomal proteolysis or increased the endosomal pH, confirming that inhibition of pH acidification is not the underlying cause of inhibition. We conclude that the direct binding of inhibitors to nucleic acids mask their TLR-binding epitope and may explain the efficiency of those compounds in the treatment of autoimmune diseases.