In the end of Sefer Shemos the Torah tells us that the Yidden who were “nediv lev” donated to the mishkon.
The Rambam says that when it comes to hekdesh one may not regret his pledge and try to recant what he promised to give. This is true even if he recants “toch kdei dibbur” (within the amount of time it takes to greet someone.) Tosfos in Menachos a
There is a nafka mina whether one would be able to change his mind after pledging tzedaka in today’s day and age. The Shulchan Aruch in Choshen Mishpat, siman resh yud bais, seif ches says that machshova is enough to make something an obligation when it comes to tzedaka, The Rema and Gra agree since they say that tzedaka is comparable to hekdesh. This would exclude any other neder that is not tzedaka related. The Aruch Hashulchanin ois yud explains this connection since it falls under the category of “nediv lev” which is the same as a korban where the term “nediv lev” is used. If this were so, it would stand to reason that tzedaka is like hekdesh and a person may not regret even betoch kdei dibbur.
The Ktzois in siman resh nun heh, seif koton bais says that since our tzedaka is not hekedesh; neither kedushas haguf or kedushas bedek habayis, it is therefore not comparable to hekdesh. Saying that one would give would not be enough of an obligation. We would not say that a verbal commitment is as if the donation was already given. One would therefore be able to recant so long as it is toch kdei dibbur.
This premise is based upon the fact that we say that hekdesh is special in that your “amira” is considered as if the donation is given. In such a case, our tzedaka today would not fit this bill. There is another way of learning this sugya; if you hold that something is nikna with a machshova as is our tzedaka, then it would stand to reason that one may not recant if one already gave it bemachshava. The Chasam Sofer and the Ksav Sofer rule this way. According to them and others, tzedaka would not need to be comparable to hekdesh in order to say that one may not recant his thoughts or saying a promise that one will give tzedaka.
May we all be able to keep what comes out of our mouth; that way we will merit to the geulah, a promise from Hashem.