A virtual teacher who reveals to you the great secrets of Base64

Launched the Base64 Repair Tool

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:

  1. Normalize whitespaces (for example, remove BOM or replace Unicode spaces).
  2. Decode HTML or HEX strings.
  3. Normalize whitespaces once again, since previous step may reveal some new whitespace chars.
  4. Make sure input doesn’t contain binary characters or things that undoubtedly exclude the presence of Base64.
  5. Remove well-known strings that may be related to Base64, but are not of part Base64 value.
  6. Strip XHTML tags and attributes that must not contain Base64 values.
  7. Remove a wider range of strings surely are not a Base64 value.
  8. Extract any Base64 values from email attachment, data URI, query string, JSON, XML, or enquoted strings.
  9. Trim invalid characters (that is, non-Base64 Characters).
  10. Make sure there are no multiple Base64 values separated by some known delimiters.
  11. 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.

Comments (2)

I hope you enjoy this discussion. In any case, I ask you to join it.

  • abc,
    What is your name
    • Administrator,
      Hi! My name is Victor. Can you tell me why you ask and for what reason do you hide your name?
Add new comment

If you have any questions, remarks, need help, or just like this page, please feel free to let me know by leaving a comment using the form bellow.
I will be happy to read every comment and, if necessary, I will do my best to respond as quickly as possible. Of course, spammers are welcome only as readers.