Hashem by definition is completely truthful. This is proven in the Orchos Tzadikim at the beginning of The Gate of Truth: “Truth: The soul is created from the place of the Holy Spirit, as it is written (Breishis 2:7): ‘And He breathed into his nostrils the soul of life.’ It is hewn from a place of purity and created from the Celestial Radiance, from the Throne of Glory. And there is no falsehood above, in the place of the Holy of Holies, but all is truth, as it is written (Yirmiyahu 10:10): ‘And Hashem G-D is truth.’ I have found it written (Shemos 3:14): ‘I will be what I will be’ [אהיה אשר אהיה], and (Yirmiyahu 10:10) ‘Hashem G-D is truth; He is the Living G-D and the Eternal King.’ Derive from this that G-D, the Holy One Blessed Be He is truth; for the word [אהיה], whose gematria [numerical value] is 21, is found 21 times [21×21=441 which is the gematria of emes, truth.] And the gematria of the word אהיה itself is 21 [ so that אהיה אשר אהיה, being understood as a compounding of אהיה, would, in itself, give the same result.] G-D made man to be just [see Koheles 7:29], and Shabbos 55a: ‘The seal of the Holy One Blessed Be He is truth.'” (Click here for Hebrew text.) However, in this week’s Torah portion of Vayera we find a very puzzling episode. Sarah just overheard one of the 3 angels who were visiting, saying that she would have a child one year hence, and the pesukim say (Breishis18:11-13): “Now Avraham and Sarah were old, well on in years; the manner of women had ceased to be with Sarah. And Sarah laughed at herself saying, ‘After I have withered, I shall again have delicate skin. And my husband is old!’ Then Hashem said to Avraham, ‘Why is it that Sarah laughed, saying: Shall I in truth bear a child, though I have aged?'” The Medrish Rabba (Vayera 48:18) points out, “Bar Kafra said, peace is so great that even the verses speak in falsehood in order to ensure peace between Avraham and Sarah. And Sarah laughed at herself saying, ‘After I have withered, I shall have delicate skin. And my husband is old!’ To Avraham this was not said, rather ‘why did Sarah laugh saying how will I give birth for I am old.’ The verse did not speak the same as what Sarah said, ‘for my master is old’ but rather ‘for I am old’. “ (Click here for Hebrew text.)
The Yefeh Toar observes that the medrish did not interpret Sarah’s statement as a question, which means she called herself old and withered and Avraham just old. Hashem said in place of her statement that she said ‘I am old’ because that is what her whole statement about herself really meant, and Hashem didn’t bother mentioning that she said ‘my master is old’ because He was just summarizing what she said, which in that case means that Hashem really did not lie at all. However, the Yefeh Toar points out that the medrish goes out of its way to clearly explain that Hashem actually changed Sarah’s words for the sake of peace. If that is the case, then how do we explain that Hashem lied or spoke falsehood? The Yefeh Toar specifically writes that Hashem changed His words, and in fact the medrish says the Torah writes it as if He spoke falsehood, in order to teach us a lesson in the importance of peace. How is this possible?
Nevertheless, I heard from a talmid chacham, Rabbi Yitzchok Kolsky shlit”a, that if by changing words it will result in doing Hashem’s will, then those words are the truth, it is not a lie. Hashem’s will is to ensure peace amongst people especially between husband and wife; therefore changing what she said which appears to be falsehood is warranted and is therefore considered truthful. However, that does not mean a person can always lie for the sake of peace, because people pick up on it and it backfires a lot, which can make things worse and is obviously not the will of Hashem.
There is a story I heard of a couple who came home after a trip Thursday night and her mother, who was recovering at home from a procedure, offered to make Shabbos meals for them. The daughter said no, she had everything she needed, even though she actually had nothing prepared for Shabbos, as she didn’t want to trouble her mother who had a procedure. Yet she also felt wrong for just lying to her mother. Her husband decided to ask his rabbi if she did the right thing. The rabbi thought it was a good question and asked Rabbi Fuerst shlit”a what he thought. Rabbi Fuerst shlit”a said that one is allowed to lie if it will improve his or her middos [character traits]. He quoted a gemara in Bava Metzia 23b which states there are 3 circumstances (besides for the sake of peace) that one is allowed to lie. One reason is out of proper character, for example, in terms of a tractate of gemara, if one is asked if he is fluent in a certain subject matter, he can lie and deny it out of humility. For this reason, Rabbi Fuerst said that because this wife was respecting her mother, and was concerned for her health, she was allowed to lie.
However, the Orchos Tzadikim in the conclusion of The Gate of Falsehood, after quoting this gemara concludes, “And in all these cases where the sages permitted deviation from the truth, if one can manage without lying it is better that he do so. For example, if he is asked, ‘Do you know this tractate?’ He can answer, ‘Do you really think I know it?’ If he can push off the questioner in this way without lying, it is better that he does so rather than lie outright. He should follow this practice in all his affairs. If he does so, happy is he and happy his begetter.” It seems clear from all this that one has to be extremely careful when deviating from the truth, and the litmus test is whether one is confident that he is doing the Will of Hashem. If he is doing the will of Hashem, then that is considered the truth; but that is very hard to figure out. Therefore one must be extremely careful in this matter, and not use it as an excuse to lie, except in very rare and well-calculated circumstances.