In law, an affirmation is a solemn declaration allowed to those who conscientiously object to taking an oath. An affirmation has exactly the same legal effect as an oath but is usually taken to avoid the religious implications of an oath; it is thus legally binding but not considered a religious oath. Some religious minorities hold beliefs that allow them to make legally binding promises but forbid them to swear an oath before a deity. Additionally, many decline to make a religious oath because they feel that to do so would be valueless or inappropriate, especially in secular courts. In some jurisdictions, an affirmation may be given only if such a reason is provided.
A right to give an affirmation has existed in English law since the Quakers Act 1695 (An Act that the Solemne Affirmation & Declaration of the People called Quakers shall be accepted instead of an Oath in the usual Forme; 7 & 8 Will. 3 c. 34) was passed. The text of the affirmation was the following: "I A.B. do declare in the Presence of Almighty God the Witnesse of the Truth of what I say". The right to give an affirmation is now embodied in the Oaths Act 1978, c.19, which prescribes the following form: "I, do solemnly, sincerely and truly declare and affirm" and then proceed with the words of the oath prescribed by law, omitting any words of imprecation or calling to witness.
It has its origins in the refusal of Quakers to swear any oath, which would otherwise have barred them from many public positions. Quakers believe in speaking the truth at all times and so they consider the act of swearing to truth only in court rather than in everyday life implies double standards. As in James 5:12  , they tried to "let your yea be yea and your nay be nay".
The cause for such a right is exemplified R v William Brayn (1678). William Brayn was charged with the theft of a horse from Quaker Ambros Galloway. Brayn pleaded 'not guilty'. One witness testified that the horse was owned by Ambros Galloway, and another witness said that he [probably Galloway] bought it from Brayn. As Galloway was a Quaker, he would not, "for conscience-sake", swear and so could give no testimony. The court directed the jury to find Brayn 'not guilty' for want of evidence and committed the Quaker "as a concealer of Felony" for "refusing an Oath to Witness for the King".
Some Christians, who may not be Quakers, refuse to swear oaths, based on Matthew 5:34–5:37  .
All elected members of parliament must make an oath or affirmation to the Crown before they can take their seats. MPs are asked which form they prefer to take with the statement "Swear or Affirm", meaning swear an oath or make an affirmation. The oath or affirmation may be made in Welsh, Gaelic, Cornish or English.
The original 1787 text of the Constitution of the United States makes three references to an "oath or affirmation": In Article I, Senators must take a special oath or affirmation for the purpose of sitting as the tribunal for impeachment; in Article II, the president is required to take a specified oath or affirmation before entering office (see oath of office); and in Article VI, all state and federal officials must take an oath or affirmation to support the US Constitution. A fourth appears in Amendment IV, all warrants must be supported by evidence given under oath or affirmation.