At my last job, there was a guy I was working with who'd constantly make sexist jokes. Being a woman, and a rather sensitive one, this deeply upset me - for example, he'd make jokes about women drivers when I was failing to use a pallet truck correctly (It's a thing for moving pallets of heavy things. I'd never used one before.) I made it clear to him that I didn't like the jokes, and could he please stop doing them.
Up until this point I cannot honestly call his actions offensive. He did not realise they upset me, and once I informed him of this, if he'd stopped, all would have been well.
Key word there is "if" he'd stopped. He didn't. It still wasn't malicious or intended to upset me - but
he knew it was upsetting me and he didn't stop. I went ahead after another day of this (and breaking down crying on the phone to my poor mother

). The company dealt with it as swiftly and effectively as any company should - the man received a friendly, but stern warning. (The reason the repercussions weren't a LOT worse were because I'd asked for him not to be punished, I wanted them to make that clear to him though.)
What does that have to do with the thread? If it's not intentional, no it's not offensive. If it's not intentional and the person saying it has cause to believe it might be offensive, YES it is even if it's just a joke.