The difference is very slight. For example, if I told you that the buses in Rome are on strike tomorrow, but it was not true, I would say, 'I was kidding', not "I was joking". Joking or kidding can both be used for funny things. For example, 'if you eat carciofi every day you will lose alot of weight', I can say I am kidding or I am joking.