Base64 Encoding: Illegal base64 character 3c
I got this same error and problem was that the string was starting with data:image/png;base64, ...
The solution was:
byte[] imgBytes = Base64.getMimeDecoder().decode(imgBase64.split(",")[1]);
Just use this method
getMimeDecoder()
String data = "......";
byte[] dataBytes = Base64.getMimeDecoder().decode(data);