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 (127)

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.
      • 82828,
        Hi sir... I have a ico file which is encrypted and I want to decide it can you help me.
        • Diicorp95,
          Do it yourself at https://base64.guru/converter/encode/image/ico
      • Leoaja,
        ID : 9523-1cdf-d615-83a5-f619-1e04-5b46-7fac
        Hi I don't know if that means base64 or not probably not what I'm confused about here is the symbol. You can infer or change the symbol (protobuf) into text yeah that's ridiculous ... it's only because of one symbol that I am confused for hours because I'm just a beginner
      • vaishali,
        Hello Admin,
        I would like to decode a base64 code but I cannot post the code here due to privacy reasons. I have tried all the methods listed on your website but couldn't come any closer to decoding it. Could you reach out to me via the email address that I have provided? Your help would mean a lot to us.
  • 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).
    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,
      Your string is not a Base64 value. It is just a binary source of your PDF file.
  • JasonMazzole,
    It was in my Google Drive

    • 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

    • Administrator,
      Hi! Most likely it is an Excel formula.
  • Zachary,

    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:


    thank you
    • Administrator,
      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,

    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!

    • 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!

      • 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,

    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.

    • 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,
      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,
      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

    Content-Type: application/octet-stream; name="Invoice RSI125851466.pdf"
    Content-Transfer-Encoding: base64

    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,

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

    it wordpress functions file
    • Administrator,
      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

    • 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.


    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,
  • 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,

    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,

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

    • 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

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

    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,
    Hello there..I found this base 64 code in the phone, my partner gave to me. Any info would be much appreciated.
    Thank you
    • Administrator,
      Hello Bobby! This is just a regular HTML page that have some background images included via Data URI.
  • Much,
    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.

    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,

    I got it from a p7m file.
  • Matthew,

    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,
  • 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==
  • GovindSIngh,
    Please share solution for this response so i can create pdf from this response

    [UPDATED: ]
  • Liz,
    I got this message from a streamer that needs help trying to decrypt this message, apparently it's base64 but I don't know what it could mean.
    V0sXTWb4NFg7GndTo1Sbkkwm E̶N̶C̶R̶Y̶P̶T̶E̶D̶ ANHSJpKyjD2sVyPHxFI=
  • RubyGirl,
    I built a program that encrypts stuff but I can't decrypt it please help!

    • Administrator,
      Be aware that you provided two Base64URL strings.
  • Jim,
    If you can figure out what kind of psycho mix of binary this is then please be my guest. Also might contain Unicode?

  • Anirudh,
    Is there any Javascript function to repair the base64 string?
  • Rafael,
    I got this from a PDF file in the database from my website
  • Jason,
    Its about 2bd2-e94d-41b0-e9e9-cbdf-78e1-9f4d-352a

    An android app dumped the file and I wanna know what's inside
  • Layla,
    This was received by my lawyer on a letter concerning my son who passed.
  • Jose,
    hey so i got this from an image, is a challenge developed by a cibersecurity research group, but i think something is wrong with it
    ID: e391-bdc3-8e18-bd8a-d9c3-af9a-65cf-1639
  • Nguyen,
  • Umair,
    i am really struggling to display it as PDF in javascript, i am using the below code and doing the slicing to delete the start(data:application/pdf;base64,) from code but still getting error

    let generateFile = (content, fileName) => {

    let content1 = content.slice(29);
    const blob = new Blob([content1], { type: "application/pdf" });

        const link = document.createElement("a");
        link.href = window.URL.createObjectURL(blob);
        link.download = fileName;

    i have uploaded the content string at https://pastebin.com/W4zEXyPy

    any suggestions please
    • Umair,
      just to confirm the Code id here is: ID: f85a-22cd-f8c6-58fb-5e1f-e194-2665-d526
  • JJ75,

    Any help would be greatly appreciated. thank you for your time
  • kundudev,
    I got this string from a zoom meeting invite, it is the password string I guess.
    ID f043-6c68-38ef-11fb-7c80-023c-d5f9-ce85
  • JRuhl09,
    Got this from a reddit meme puzzle
    ID b870-7e52-de3d-6629-c31c-388f-b423-4576
  • Edgar,
    The best base64 decoder
  • Queensa,
    Hello Admin,

    ID: 5b5f-8f90-60bf-6507-eed8-97a3-1f27-5df0
    • Administrator,
      Hello! This is an obfuscated JavaScript snippet. Unfortunately, you cannot deobfuscate it using online tools.
  • jimk,
    Hi, I found this part of text in a professor's academic page, which all of his pages are encoded in the same way for some reason (I guess something misconfigured on their end).
    • Administrator,
      Hello! Yes, it seems to be a charset encoding misconfiguration or something related to missing fonts. However, this does not exclude the possibility that the problem is on your side (for example, your browser is not configured to automatically detect charset encoding or your OS has no some base fonts).
  • Timtuner,
    Reference to f9f3-0d82-f51f-76ef-d8c5-9056-a9ec-9f98

    Thx you
  • Sollevix,

    What is encoding type for this ID : c603-6d2f-5d3d-b25c-3de5-4214-9181-645b ?

    I can't decode using this website.



    Thanks for your help
  • niv,
  • Bhushan,
    Nice Development option
  • Dario,
    This is a code I have had from long time ago and I was never able to decode. I don't really know what format it is. It is a picture and it should be about sport, but I don't know. As I said, I've never could decode it. I appreciate your help.
  • luis,

    tube ese codigo de una webservices de un proveedor, aparentemente es un PDF de un documento electronico.

    lo que necesito es interpretarlo para tener una previa en php
    • Administrator,
      Hi! Not sure what exactly you need, but keep in mind this is a corrupted PDF file.
  • Slee11,

    Got this from a possible secret chat.
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.