If God did not exist, it would be necessary to invent him.
Si Dieu n'existait pas, il faudrait l'inventer.
Original text (French)
Notes from Wikiquote
Épître à l'Auteur du Livre des Trois Imposteurs (10 November 1770) | For the background of the quote see this source: Yeh, Anthony (July 3, 2011). "What did Voltaire mean when he said that "if God did not exist, it would be necessary to invent him"?". Quora. Archived from the original on October 27, 2017. Retrieved October 27, 2017.
Variants
If there was no God, It would be necessary to invent him.