This can be a great way to open up the conversation. Many people get away with saying offensive things because they assume no one will challenge them. By asking them to repeat themselves, you’re forcing them to actually admit what they said and if they stand behind it.  Use a casual, innocent tone when you ask them to repeat themselves. You can almost pretend that you simply didn’t understand what they said. You can say, “I’m sorry, could you say that again?” or “I’m not sure I heard you. Can you repeat that?” If the person refuses to repeat the offensive statement, they probably feel ashamed of what they said. You can say something like, “Oh, okay. I just thought you might have said something that struck me as odd. But I guess not.” This will let them know that their statement was not in fact acceptable. If the person has used specific language that’s offensive, ask them to explain exactly what they meant by it. Most people will not be willing to defend their use of slurs or offensive language once they’re challenged to do so.  If they’ve referred to a person or group using a racial slur, you can say something like, “I know that person is a member of that group. I’ve only heard people use the word you used to express a prejudice against people of that group. Is that what you’re trying to say?” You can say something like, “The word you used has a specific meaning. Are you aware of that? Can I tell you where it comes from?” The person might not have used language that offended you. It might have been their tone or their timing. Explain what you took from their statement. They may be surprised to hear what you say. Many people are unaware when something they do or say offends someone. If you don’t think they were trying to offend you, say so. This will lessen the chance that they’ll feel defensive. You can start by saying, “I’m sure you meant no harm, but…” or “I know you always try to be sensitive to others’ feelings, so I wanted to let you know…” They might be eager to explain the misunderstanding. You can say, “Is that what you meant to say?” or “Does that sound like what you were trying to say?”  It’s possible that they did mean to offend or shock you. Be prepared for this. They might have been subtly trying to stir up conflict. If they did intend to cause harm, stay calm. Don’t stoop to trying to offend them yourself. If their intent was to offend, let them know how you feel about that. You can say that you feel hurt, surprised, or saddened. If they didn’t mean to  offend you, you can say that you feel relieved to know that they wouldn’t ever intend to cause harm.  This can be very useful with someone who values your opinion. If the person wants to please you, knowing how you feel can influence their behavior. You can express feelings without expressing judgement. For example, you can say, “I feel really surprised” rather than, “I can’t believe you would say something like that.”

Summary:
Ask the person to repeat themselves. Clarify their use of language. Express your understanding of their statement. Ask them if your understanding is accurate. Express your feelings about their intent.