Launched the Base64 Repair Tool
It turns out that our world is not perfect and nothing is safe from mistakes. Even a simple algorithm like Base64 is subject to errors. Honestly, the algorithm is fine, the people are neglectful. More precisely, some people make mistakes, while others suffer (well, sometimes they’re the ones who suffer).
For example, during output the Base64 values are damaged and therefore cannot be decoded. Or, sometimes, users carelessly copy wrong data and try to decode it as a Base64 value.
To help you decode the undecodable, I developed a free tool able to repair corrupted Base64 values. Meet the Repair Base64 Tool. This tool has many superpowers, including the abilities to extract valid values, delete bad characters, assemble Base64 piece by piece, recognize some invalid strings, and others.
Also the Repair Tool will give you a lot of tips to help you figure out what is wrong and why the Base64 decoder cannot decode your string. I’m pretty sure that at least some tips will be very helpful to you. You only need to read them carefully. At least read the “red” notices as they contain the most important messages. The “orange”, “blue” and “green” notices play an informational role, but often enough, thanks to them, you will learn more details about your string and the repair process.
At this moment it can repair hundreds formats of poorly formatted Base64 values and I’m not going to stop improving it. But to do this I need your help, so please send me your feedback and share strings that cannot be decoded or that produce unexpected results (it can be done in one click). Of course, I would be happy for any questions, ideas, and suggestions.
Like any product that is in beta, it may contain errors that I did not notice. There is also a high probability that he cannot repair or recognize “exotic” strings. Therefore, I ask you to report any errors that have been discovered. Anyway, I hope that this tool will become your new friend who will help you in difficult times.
By the way, at the moment, the repair scenario looks something like this:
- Normalize whitespaces (for example, remove BOM or replace Unicode spaces).
- Decode HTML or HEX strings.
- Normalize whitespaces once again, since previous step may reveal some new whitespace chars.
- Make sure input doesn’t contain binary characters or things that undoubtedly exclude the presence of Base64.
- Remove well-known strings that may be related to Base64, but are not of part Base64 value.
- Strip XHTML tags and attributes that must not contain Base64 values.
- Remove a wider range of strings surely are not a Base64 value.
- Extract any Base64 values from email attachment, data URI, query string, JSON, XML, or enquoted strings.
- Trim invalid characters (that is, non-Base64 Characters).
- Make sure there are no multiple Base64 values separated by some known delimiters.
- Remove all invalid characters.
It is worth saying that at each step it checks if “input” is a valid Base64 value. If so, it remembers that Base64 value and removes it from the input. As soon as the input no longer contains any characters, the repair process is considered complete.