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

Repair Base64

Quite often, users cannot decode Base64, because they got a malformed or invalid string. For example, this can happen if the source outputs an unexpected Base64 standard, the user copied unnecessary data, or something damaged the Base64 value. As a rule, such strings cannot be decoded without additional processing or human intervention, and because of this some inexperienced users mistakenly think that these strings are not decodable. Therefore, to help you decoding the undecodable, I developed a “repair tool” powered by some kind of magic, which is able to fix malformed Base64 and even inform you about detected errors. Of course, don’t wait for miracle, but don’t be surprised if it happens.


Please note that the repair tool may return many false positives and you should manually tidy up the results. If you get some weird results, please don’t judge me harshly. This tool can repair hundreds formats of poorly formatted Base64 values and in some cases it’s necessary to sacrifice accuracy in order to achieve good results. If you got wrong results, please send me your string and I’ll try to improve this tool.

Comments (94)

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

  • Jim,
    I did not notice a backslash and it drove me crazy while trying to insert a data URL. Your tool really saved my day :)
  • Youbze,
    Hi !

    That's about 0a2a-67c5-7a30-a153-b88f-81ac-8898-b766

    Got this one from a hidden value in a website, doesn't look like text, and it's IMO too short to be audio or video

    Maybe just used for binary validation of some sort...

    If you have an idea... :)

    BTW excellent work here :D
    • Administrator,
      Hi! Your string is a valid Base64 value (except the backslash), so it's almost impossible to tell what the data is. Well, at least, it is not a known popular binary format. I guess it may be a result of RSA encryption using a 512 bit key, but in fact it could be anything.
  • Mlne,
    Hi I have a bunch of saved files in my Android & am unable to figure out a few of them.

    Thanks for your help
    • Administrator,
      Hello. It seems the submitted file is a Windows executable (exe).
  • EDUARD,
    hello Eduard here again,..... Im sorry I forgot the Error ID: 379c-c7ff-f4fd-36d8-b158-ecb0-b301-3238

    how do enter the base64 code into a html page do i use a <html> tag then base64 uri like this <src="data:text/html;base64,PCFkb2N0eXBlIGh0bWw+D.........end it with" /> </html> or how ??? please advise ... thank you in advance for the prompt reply!!! Ed
    • Administrator,
      Hello Eduard,
      You need a valid opening tag that supports HTML embedding (src is just an attribute). So, to embed a Base64 encoded HTML into a web page you can use iframe, embed, or object.

      For example, in your case, the code should look something like this:
      <iframe src="data:text/html;base64,PCFkb2N0e..."></iframe>
  • Eduard,
    Please one more question ,... Ive been having to base64 all my media jpgs when sending phpmail from my server or the pictures dont get sent.

    What I wanted to accomplish is to base64 the whole completed html phpmail page and send it all as base64 .. is that possible with some other type of tag the <iframe> tag doesent seem to work... mail servers dont seem to see the <iframe> tag just like the CSS must be sent inline within the html for it to work.. please be so kind to advise... thank you in advance for you expert reply!!
    • Administrator,
      I do not think that mail services will support such messages (they will strip invalid content and/or mark messages as spam). Therefore, I recommend you to send HTML messages in the usual way (for example, using "Content-Transfer-Encoding: base64").
  • raceanud,
    Hello! ID: 360d-5afa-a8af-096c-44dc-2edb-2e0e-8018

    The text i recieved it is from an application in c#.When i get this text which i think it is base64 and i try to create a pdf file. the file it is created but it is shows a white page.
    • Administrator,
      Hello,
      Your string is not a Base64 value. It is just a binary source of your PDF file.
  • JasonMazzole,
    It was in my Google Drive

    36d6-c71f-0d93-8206-a73c-768a-dc2d-25db
    • Administrator,
      It is an SVG image that draws a white checkmark. If you want to preview it, use the Base64 to image decoder. Please note that you must copy-paste the valid Base64 string extracted by the repair tool. Also, you have to click the "Toggle Background Color" while previewing the image.
  • Sarraf,
    Hi this is about 227f-db23-6b41-37f2-90ca-e7d9-e3b4-2b48

    I got this one from a hidden part of a website.
    • Administrator,
      Hi! Your string is a data URI that contains a valid Base64 value. It’s hard to say what it is used for (especially that it should be used as a PNG, but it definitely isn’t an image).
  • base64,
    Thank you for this page
  • Saucy,
    I’m trying to figure out wat this is can you please help me it is important

    1287-3a17-3c38-112e-6c7a-ddaf-863d-9c00
    • Administrator,
      Hi! Most likely it is an Excel formula.
  • Zachary,
    f480-59bc-e9c2-78e3-fa89-3fc1-cb4c-b8ba

    This is my undecodable ID^, even with the repair tool it did not work. It was received from a weird header nikto found on a webpage.
    • Administrator,
      Hi! There are four different Base64 values and the repair tool detects them all. The problem is that all values store some unknown binary data. I do not know what they are used for, but I believe that this is something related to hashing or encryption functions. Maybe the name of the header indicates something?
  • Mike,
    Hey, you're a saint for this site.

    I have the error ID: 6da3-f4cd-b1a3-8653-101c-2582-7a63-c344

    I'm totally clueless, so would help getting an audio file from this! All best.
    • Administrator,
      Hello Mike,
      You have to extract the full data URI from your HTML file (it is included between two quotation marks src="..."). Then you can obtain the audio file using the Base64 to Audio decoder.
  • ChristinaTaylor,
    I'm very grateful for the help! I know nothing about this and I am still getting things done!
    : 0a78-5b9c-6c7d-8dc2-9dd2-835d-0a11-2a3a My last phone and new one did content transfer
    Thanks so much
    • Administrator,
      Hello Christina!
      I'm sorry for delay. Unfortunately, your string is neither a Base64 string nor any data format known to me. I recommend asking users on specialized smartphone forums and tell them some basic info about the file (name, size, location).
  • hadi,
    my id:

    b712-dd3a-fe6b-a277-f793-722f-d19a-a7f3

    thank you
    • Administrator,
      Hello,
      Your string is part of an HTML page that contains several audio files and images embedded via data URI. The Repair Tool is able to extract all valid Base64 strings and this is why I'm confused because of your comment. Could you explain please what the problem is?
      • Had,
        The issue is this is a big code that includes other than these files, it includes a java code that runs a program, this is what I am not able to decode
  • Jess,
    From a Instagram account someone made under my name

    [UPDATED: ]
    Sorry I forgot "376a-5491-5e8e-3166-a8e0-03f8-26f2-0537"
    • Administrator,
      As the Repair Tool says, your string is a SVG image. Well, it misses the open tag, but by adding it you can find found out that the image represents the Instagram logo.
      • Jess,
        Wow i wasn't expecting a response at allll ! I soo appreciate you! I should have sent you a different part of the page. Im trying to figure out a email in the source code of the url to see if I could find out who hacked my instagram, considering customer service wont do shit lol thank you for responding though,
        • Administrator,
          I'm happy I made your day a little bit more better :)
  • Vicky,
    Please help me to decode this file and I want to download the video. This is a porn video. And I want to download it.

    Id: 5097-2caa-af2b-54a5-7932-3753-9149-c761
  • combatmonk,
    a9a6-a35f-9b28-0777-b7a4-e758-0df9-2dff

    I have a series of JSON files that I am getting from an API. They use this format and I want to know why it has the \, the carriage return and padding issues. Or most importantly how I can include a script to repair them for my project. I will have anywhere from 0-n items which I will iterate through, transform and display as a modal with text or something. Thanks for your help and generosity!

    CM
    • combatmonk,
      Sorry for the silly question, but it appears that this is just a "\n" newline character that I can write a function to remove. Do you happen to know if this is a convention when base64 encoding a jpg?

      Thanks Again!

      CM
      • Administrator,
        Hi! Typically, a Base64 string depends on the Base64 standard, not the input (i.e., the JPG file will return the same characters set as the TXT file). In your case, it complies with RFC 2045 (that is, the output is splitted into fixed 76 line-length). So, newlines are mandatory and you should be able to decode the Base64 string without any problems. However, something is wrong here, because your string doesn't contains "real newlines" (it contains a backslash followed by the letter "n"). Since you are extracting Base64 from JSON, I suppose the problem is that you forgot to decode JSON before extracting Base64 (the secret is that when decoding JSON the "\n" will be converted to a proper newline).
  • Savan,
    Hello,

    its about 3941-c524-8765-3459-0127-599c-40bc-b617

    i have found this in a website and couldn't get rid of it,

    really appreciate your efforts for people,

    i will be very thankful to you if you could help me to decode it.

    Thanks
    • Administrator,
      Hello Savan,
      Sorry for delay. Also, I' sorry for bad news, but your string is not Base64 encoded.
  • christy,
    id: 31cb-afbc-ed23-93e1-54fa-3033-6ee4-e367

    thank you for your assistance!
  • Zaxx,
    Hello sir ..ID 42d7-9d22-c143-ff32-d306-7762-5d87-817b can u please help me to decode this base64 script..TQ
    • Administrator,
      Hello,
      Your string is a .woff font file (Web Open Font Format). You can decode your Base64 string the Base64 to File decoder.
  • Abhishek_Gangwar,
    c091-dd08-a999-6a98-1c1a-2ec7-f247-40e2 please solve
    • Administrator,
      Hello,
      Your Base64 string is a corrupted PNG image. I'm sorry, but I don't think you can repair it.
  • Mike,
    I don't know where this came from or what it is. Named as an RSI receipt but don't know RSI & it has 29 pages of this script. I like your dedication to helping those in need. I appreciate any help you can provide to me.Thnx

    boundary_1238_451212eb-68fa-4102-8bed-4bad29aa1982
    Content-Type: application/octet-stream; name="Invoice RSI125851466.pdf"
    Content-Transfer-Encoding: base64
    JVBERi0xLjMKJSBJbnZvaWNlIFJTSTEyNTg1MTQ2NiAtIFJlcG9ydAolIEdlbmVyYXRlZCBi
    ...
    LixkK0lGOmkrUmdObytcM2MhK2VeKCkrbzxIMiwjb2g9LC1OM0gsNzVZVCxBJjBiLEprXHAs


    Sorry I'm a tech neanderthal. This is page 1 of 29. I tried to send the file but it won't let me or I be an idiot.
    • Administrator,
      Hello Mike,
      It seems to be an email attachment that contains a PDF file. It cannot be decoded properly, because you provided only first bytes of your Base64 string. However, if you do not know where it comes from, I highly recommend not trying to open it, because it may be a phishing message or even worse, it may contain security exploits.
  • mohamed,
    hi

    please help me with the code 5b48-752d-fd82-de4d-a1d3-287c-e394-0ddb

    it wordpress functions file
    • Administrator,
      Hello,
      Your submission is a valid Base64 string. Unfortunately, it contains data unknown to me. Perhaps, it may contain the result of a cryptographic function. Therefore, to decrypt it, you need to know the passphrase and algorithm.

      In any case, if this file is from an unknown source, I strongly do not recommend running or including it in PHP, because it may be a backdoor.
      • mohamed,
        thanks for replying

        i appreciate it.
  • kunde91,
    Hello ..ID 72b9-aabc-0d8a-bd5a-b97c-ad8e-e130-9c20

    mfg
    • Administrator,
      Hello. Sorry for being late. Unfortunately, your string cannot be decoded because it is saved in wrong charset encoding.
  • srikanth,
    Hello sir,

    I have a base64 encoded binary format zip file which I would like to unzip and download please could you help.iam pasting bit of the file due to limitations.

    file

    PK        Q 'P;h•B«ò  ã%  $   CNMD008636024_79763540_1_1_MF118.xml“Â]ð’¹î%…~þ„  ÀàÒó··Ð È  êZÜ ´­uÄò¤O ¾>¬ `K I‚5À~2IVm‘œ·bd2¶"O‘ .Ñ[ø ”«ZóóóXΝ耒?€…èO‚‚ð?}ˆ¼ˆˆ Ç×_|„?ØÁ€èÀ„ºÀ‚ƒÀ †_ƒÈ_‚À€°/ˆÐ ‚ƒŒÈ €Ž‚š¨…ˆ‡ì‡/~€¬Š˜…Ä_ƒ†˜à€Š…–Ø€Ž €q†ŒÈ –’„OàÁ‚†¤Ø‡sƒ°~„œ}…¦ ‚”  €ÀŠ‚OÀ灲€ƒ–ÄÄŒ?‹šø €šST >‚€À…²?ƒŽ°€…’ĐÁ€ixkƒÈ~…‘…‚ À‚‰Ð…¨o€‡~ƒŒ ƒ¸o
  • Jamie,
    I found this and cant seem to see what it is, only my 21 son uses my account sometimes I just need to see or know what it is please. And thank you.
  • molly,
    5540-c429-54e5-d52b-19c4-ffe5-70b0-45e6
  • DavidAArteaga,
    It works like a charm ?: d0d9-d9e5-53c6-6191-16b0-139d-e9e1-ac3e, found the mal. ali. On an A.P.I. site. Probably got there through embedding. Everyone who encounter these probably have it attached to their profile and leave a piece of it behind while crawling the web. But I've only been doing independent studying, Without any.. body around that know a whole lot about it. If Im wrong I'd like to know.
  • Rob,
    Going through hidden files trying to diagnose if there is hidden redirection
  • twyla,
    Thanks so very much

    [UPDATED: ]
    Great web site
  • pasupathi,
    88a0-7361-5cee-fad5-8204-8552-d6cb-1fd6 thank you after checked repaired id i will get back you
    • Administrator,
      The Repair Tool is able to normalize your string. So, copy the repaired string and decode it using the Base64 to Image decoder.
  • itay,
    Just wanted to say that you saved me after i was about to bash my head against the wall, thanks mate
  • ashah,
    ID: f683-c7bb-d1a8-301c-2e61-f58e-04ef-ce94

    Decode fails with
    Caused by: com.rsa.jsafe.JSAFE_PaddingException: Could not perform unpadding: invalid pad byte.
    at com.rsa.cryptoj.p.hl.a(Unknown Source) ~[jsafe-4.0.jar:4.0]
    • Administrator,
      Your Base64 string contains some invalid characters. So, just remove {CBC} to fix it.
  • pancake888,
    I actually got the string from a flash game and trying to figure out what it is saying fully, if that does make sense
    • pancake888,
      i forgot to add 548f-f903-543c-a4ce-341c-1219-dd96-0769
  • Veizx,
    f088-755d-9482-eaf4-d06b-07d8-3117-7e91

    Thanks your for your work :)
    • Veizx,
      Forgot to say that i want to encode a PDF file to send it via post with php, when converting the b64 to pdf it gets corrupted.
  • Chris,
    Greate!!! your tool is working fine for me, i tested a bad generate code base64 for a database image that save, but i really need to implement on my software solution made it on php and can't do it trought the code !!!!!!
    • Chris,
      I forget to say that the error that I get is • Fixed incorrect padding. so I try to implement your solution apliying strtr($data, '-_', '+/') and strtr($b64, '+/', '-_') but when I comparing on text editor the bad value whit the good one, I just find that at the end exist one more "i" on the bad value, please can you help me to find a good solution. thanksss!!
      • Chris,
        No worries!!! Finally I fixed, the error was the value has incorrect extra data and dont have "=" character, the extra "i" character has been assumed as padding, so, just I taked the base64 value and I divided for 8 and test if was multiple of 8 and finally rest the residue for fix the value size, thanks for you information your page was so usefull for find my solution, bye!!!
  • Jessica,
    I cant decode this it's saying it's a text 5aa8-ed40-0a7f-64ec-9493-15d7-647c-d439 help me please thanks
    • Administrator,
      Hey Jessica! Your string is a JSON that contains info about some currencies and precious metals.
  • Syed,
    9134-df7d-3d40-fe45-875b-b3c0-def7-5853

    cannot figure out what format it is if this is not the right one

    thanks
    • Administrator,
      Hey Syed! That's some binary data and I don't know what kind of data it is.
  • Felix,
    ID: b413-bfa3-f53f-ed77-be7c-b314-664a-83fe

    Thx!
    • Administrator,
      Hello Felix! This is a SVG image. To view it, just copy-paste it into your browser address bar and press Enter ;)
  • Thaddeus,
    Hello,

    ID: ``754d-334b-2af8-bc58-0621-a76b-663d-ee17``

    I created an LSTM trained on base64 from preselected images to write new base64 strings, curious if you can give me any insight on what errors are present and what sort of feedback you can give me to adjust the learning model to accurately recreate base64.
    • Administrator,
      Hey Thaddeus! You cannot concatenate Base64 values like this (just by joining multiple Base64 values). You must concatenate binary data first and only after that you should encode the result to Base64.
  • Bobby,
    a4c7-9384-6cc5-3bc6-14a9-966c-2cb2-64a3
    Hello there..I found this base 64 code in the phone, my partner gave to me. Any info would be much appreciated.
    Thank you
    Bobby
    • Administrator,
      Hello Bobby! This is just a regular HTML page that have some background images included via Data URI.
  • Much,
    a833-60b0-d0f0-0a01-cb0b-bdfe-8a5b-c4bf
    please help me decode this, am on a hacker challenge with my friends. i would also love it if you describe how you decoded it.
    • Administrator,
      Your string is not a Base64 value. Perhaps you should play with its encoding and ASCII table.
  • Qwertyuiop,
    i am a user of tcrf, and i need help doing this. I s u c k at BaseX, and i tried to convert these two zip files from base64, but WinRAR says "! C:\Users\korbi\Downloads\application.zip: Checksum error in C:\Users\korbi\Downloads\application\NO$GMB.EXE. The file is corrupt
    ! C:\Users\korbi\Downloads\application.zip: The archive is corrupt
    "
     the intirety of the code is fragmented, but its in https://tcrf.net/MTV_Sports:_T.J._Lavin%27s_Ultimate_BMX_(Game_Boy_Color) 
  • Lybdetderrt,
    I am clueless when it comes to opening files. I have been trying everything to open these hidden files my husband left on my phone.
  • AlJones,
    Reference code: ‘807d-6efd-ce9a-d723-5f82-02ea-f520-35e2’
    Found in my sent folder and can’t decipher it. Please help.

    Thanks,
    Al Jones
    • Administrator,
      Perhaps it is supposed to be a JPEG image, but many characters were discarded since it was sent as plain text.
  • Kunj,
    3c56-b817-a13c-5faa-9774-b6f2-6e28-46ef

    I got it from a p7m file.
  • Matthew,
    6cfe-bb0d-7e53-055d-7441-fa3f-825c-9d2e

    Found from an ARG based on an old TV show. It seems that the top is valid Base64 and the footer is also valid. I was able to figure out what the footer said by decoding from B64 to ISO-2022-JP, but for the top it seems to just spit out garbage. Would definitely appreciate some help!
    • Administrator,
      Hello Matthew,
      Indeed, the bottom string is a Base64 value, but I can’t say the same about the first one. At least (if it is ISO-2022-JP) this is strange to me that a such long string does not have any special characters (like “/” or “+”). Also, the “formatting” is somehow special (I mean, the number of lines, slashes, and characters per line).

      The only thing I know for sure is that to complete such challenges you need to be in the loop, since quite often the details are part of the key.
  • Sandy,
    ID: 9f77-73ee-bfef-a7a0-1a7b-e4f4-1935-4599
    Hola buenos dias tengo es codificación porque no puedo iniciar sesión en mi cuenta de google muchas gracias esperó su ayuda
  • Jack,
    ID: ad63-1aae-2ca8-da08-d093-7b11-2604-ca68
    My friend sent me this, none of us can solve it.
  • Joseph,
    It's a code I bought then, I will to make some modifications.

    ID: 52c1-345f-1bca-39c9-0d69-ef46-5698-7825
  • fabio,
    76f9-b061-b828-01db-860d-21d3-d02c-ab3f
  • Evan,
    I have a code that is like 1,000,000 characters long. The page doesn't respond so I just refresh. I can't try to fix it myself because it just glitches my computer out.
  • Martina,
    I have just got this file from my spouse files and bc he's been acting unsual latly and this file is in knownen I want to see what it is.
  • CR_Banzarey,
    Id- a7aa-3f2d-6da3-84f2-e06b-4f9d-7c63-ff54
    Please decode the following-
    UBREG vfWhtcmSwMVBpATqNI/0ieSjn1zN7RQiP/sECHw6UDQU3UCtwBGpxsW+Kyxagh3kgaJt8zJIkOO8GEKjfODfQ==
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.