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

Base64 to PDF

Convert Base64 to PDF online using a free decoding tool which allows you to decode Base64 as PDF and display it directly in the browser. In addition, you will receive some basic information about this PDF (MIME type, extension, size). And, of course, you will have a special link to download the PDF to your device. If you are looking for the reverse process, check PDF to Base64.


How to convert Base64 to PDF

  1. Paste your string in the “Base64” field.
  2. Press the “Decode Base64 to PDF” button.
  3. Click on the filename link to download the PDF.

Important notes about the decoder

The “Base64 to PDF” converter will force the decoding result to be displayed as a PDF file, even if it is a different file type. Therefore, if you are not sure that your Base64 string is a PDF, use the Base64 to file converter since it is capable of displaying various file types. In any case, feel free to give it a try, since this converter will inform you if something is wrong.

About PDF

  • Name: Portable Document Format
  • Developer: Adobe Inc.
  • MIME types: application/pdf, application/x-pdf, application/x-bzpdf, application/x-gzpdf
  • File Extensions: .pdf
  • Uniform Type Identifier: com.adobe.pdf
Comments (119)

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

  • Harald,
    Not working in IE 11
    • Administrator,
      Hello Harald,
      Thank you for your message. I fixed the downloading feature for MSIE. By the way, to preview PDF files on MSIE you should install and enable a PDF Reader add-on.
      • Samandar,
        I want to print a pdf file in a browser. This code is not working on mobile, how can you help?
        • Hello_world,
          BSDK gandu
          • CoolDude69,
            hahahahahahahahahha
        • dfdf,
          fggeeeef efefefef fefefefef
        • fwvdhkf,
          hgjhfdjhgjhd
      • asdaasdas,
        sadassadaqw weqweqwsadas
        • ola_mundo,
          hdaiudhaisudhi kepoqwkepoqwkepoqwkeqwe
    • asowei,
      Bro, no one cares about IE xD get a real browser
      • VictorValenzuela,
        Exactly LOL
      • Gear,
        I agree LOL IE, please upgrade your Windows and your browser to Edge latest version. Awesome OS and browser.
      • Bonanzy,
        Yeah, who cares about IE LOL
      • anonek,
        I guess you guys have never worked in a corporation, did you?
        • polyglotprog,
          This is irrelevant, I work in a corporate environment, we block IE from even being used. TLDR. DO NOT MAKE SPECIAL CONSIDERATIONS FOR IE... FULL STOP
    • venkat,
      need help in this
    • hello,
      你好呀你好呀你好呀你好呀你好呀你好呀
      • fghgjhg,
        dfgfdgfdghkghkghfkhgkdkhgkghk
      • aaaaaa,
        aaaaaaaa
  • mirali,
    do you know ?how to save file from encode code convert to decode pdf file and save file using php?
    • Administrator,
      Use the base64_decode() function for decoding Base64 to PDF, then use the function file_put_contents() to write binary into file. If you need an example, just let me know.
      • jAVÃ,
        Você poderia postar um exemplo ?
      • Matteo,
        I must use asp classic, but te decoding interrupted after few line..
        Do you know why?
      • Filippo,
        I've generated the application.pdf file but it doesn't download :( (Chrome browser)
  • Simon,
    Hello guys,

    Do you know do to convert a base64 string into a pdf, in python ?

    Thanks a lot for your help and great concept!

    Simon
  • Jason,
    While I got error 500 several times trying to convert a 64 encoded PDF back to PDF. I did finally get it to go through and validate. Thank you, great tool.
  • Ahmed,
    When I use the datauri of a pdf file in php the text became corrupted
    • Administrator,
      Make sure to remove the data:application/pdf;base64, prefix from your string before passing it to the base64_decode function.
      • kaushal,
        But how do I remove data:application/pdf;base64, prefix from base64 encoded string before passing it to the base64_decode function?
        • Administrator,
          Use str_replace('data:application/pdf;base64,', '', $base64_data_uri)
      • farzam,
        You save me a lot of time! Thank you :)
  • charan,
    Is it possible to convert base64 pdf type string to text file???????Please help me in this.

    Thank You

    Charan
  • Sergio_Mattos,
    Works fine !! Thanks bro!
  • MaxDeveloper,
    Thank you, works perfectly for my debug process!
  • Jignesh,
    Works great. There is no limit of data I can paste here, thanks for that! Helped me great for my testing purpose.
  • logan,
    Do you have an example of this in ruby?

    I'm able to decode it, but I get a malformed document.
    • Administrator,
      Hello Logan,
      Can you provide please the snippet you are using? Also, are you sure your Base64 string is a valid string? If not, please validate it using Base64 Validator.
  • Oscar,
    I'm facing a problem in Safari, the pdf shows with less data, if I do the same with the same base64 in chrome shows fine.
    Can you help?
  • Jack,
    Is there a size limitation? I have a PDF encoded that is 14397665 characters long. This webpage utility does not complete successfully when i try. The PDF is represents is a 26 page document with many Photos. I came here because the application my company uses is returning Bad Gateway Error and i was hopeful the utilities here could give me a clue as to what is wrong. I tried the validator, that worked fine, it is valid. I have true base64 to PDF, and it doesnt return anything, i also tried base64 to file and that throws a 500 error. If you have logs this was all between 7-7:40am Eastern on 04/20/2020. If you are able to see my problem and assist i greatly appreciate it.

    [UPDATED: ]
    I just tried again and this time it worked. I assume now it is related to the file size, the result is 10.3MB. Thank you for a great utility!
    • Administrator,
      Hello Jack! Thank you for your comment and details. In fact, all tools should accept files up to 50MB, but, given your story, I suppose something is broken here. So I will try to check it and fix the issue in the coming days.
      • Jack,
        Thank you, I do get a 502 Bad Gateway error when i try sending this using SoapUi or Postman at my application. I dont appear to reach my application at all(no logging), so it appears like an error from soapUI or Postman. I also tried this on another website and i get the 502 Bad Gateway error. While i didnt get that error here, i assume it did also happen but the exception was consumed. The thing to note is that on my 3rd or 4th attempt it did successfully complete here and i could view the resulting PDF.
  • Fl4mer,
    Hey guys,
    I have the problem, that i decode my base64 string and write it in a file. During the decode no error occured and it works fine. To decode my base64 string on this website works fine too. I can also download my pdf file and open it in browsers like chrome, morzilla and on my mac. But if i want to open the file with Adobe Acrobat Reader an error occured. Adobe throws the error that the file is damaged and it cant be repaired.

    Do you know a solution?

    Thanks
    Fl4mer
  • Rault,
    chorus pro exige qu'un fichier pdf soit compressé zip+base64. Avez vous une procédure pour faire çà. Merci.
    chorus pro expect a pdf file be compress zip then convert in base64. Have you a proceed to do that. Thanks.
  • Doug,
    I cant seem to download the converted pdf file in any browser. I click download and it does nothing. Chrome with adobe pdf viewer is one example.

    Thanks.
    • Administrator,
      Hi Doug,
      I cannot reproduce this issue on Chrome 81.0.4044.113 and Firefox 76.0.1. Can you please tell me what is your browser and OS version? Also I would like to know if there appears any errors on Browser Console while are you trying to click the "Download" link.
      • Doug,
        Windows 10 64 bit
        Chrome Version 81.0.4044.138

        I am seeing it flash in red - your browser cannot display the file application.pdf . Does that prevent the download?

        Console has a warning:

        adsbygoogle.js:195 The PerformanceObserver does not support buffered flag with the entryTypes argument.
        Nk @ adsbygoogle.js:195
        l.fa @ adsbygoogle.js:52
        tf @ adsbygoogle.js:60
        Mk @ adsbygoogle.js:192
        (anonymous) @ adsbygoogle.js:201
        (anonymous) @ adsbygoogle.js:201
        • Administrator,
          At the moment I don't know what's wrong, but I suppose it may be because of a corrupted PDF file. Can you please try to download the PDF from this page and let me know about the results?
          • Doug,
            Yup, I can preview and download that doc but when I try to open the downloaded pdf it appears to be corrupt. Tried on two separate computers.
            • Administrator,
              Thank you Doug! There was a bug on that page due to which the browser was getting invalid data. I fixed the bug and now it should work properly.

              However, this bug should not overlap with your issue, because the "download" function works the same way on all pages. This is why I think your issue is somehow related to your Base64 value. To find out for sure, try to decode the Base64 value from that page using the decoder on this page and check if you can preview/download it.

              By the way, if your PDF does not contain any sensitive information, you can send the Base64 value to me so I will test it myself.
              • Doug,
                Harald. Thanks for the quick response. I cant share this particular pdf but I think you are correct about the base64 value being corrupt. I tried on another tool and had problems as well.
                • Administrator,
                  There are some tools that may help you: Repair Base64 and Base64 Validator. I would give them a try, perhaps you are lucky enough to get at least some useful tips.
                  • Vishal,
                    hii sir , I want to make this functionality to my application . when I pass base64 and decode and preview in embedded it will not show and in other packages the annotation will not see please help me to sort out this
  • Rony_Mathews,
    Hi,

    Hope you are doing well in these tough times. This is very detailed work, what you have done here.Thanks for making it available to us.

    I wanted to know a bit more about what really is pdf. Suppose we are opening a pdf file in a text editor something similar. It provides the result as


    %PDF-1.5
    %µµµµ
    1 0 obj
    <</Type/Catalog/Pages 2 0 R/Lang(en-US) /StructTreeRoot 42 0 R/MarkInfo<</Marked true>>>>
    endobj
    2 0 obj
    <</Type/Pages/Count 1/Kids[ 4 0 R] >>
    endobj
    3 0 obj
    <</Title(LME CSP of 02/07/2002) /Author(Administrator) /CreationDate(D:20200102102632+05'30') /ModDate(D:20200102102632+05'30') /Producer(þÿ M i c r o s o f t ®   E x c e l ®   2 0 1 6) /Creator(þÿ M i c r o s o f t ®   E x c e l ®   2 0 1 6) >>
    endobj
    4 0 obj
    <</Type/Page/Parent 2 0 R/Resources<</ExtGState<</GS6 6 0 R/GS9 9 0 R>>/Font<</F1 7 0 R/F2 10 0 R/F3 34 0 R/F4 36 0 R>>/Pattern<</P19 19 0 R/P25 25 0 R/P28 28 0 R/P32 32 0 R/P38 38 0 R/P40 40 0 R>>/XObject<</Image26 26 0 R/Image29 29 0 R/Image30 30 0 R/Image33 33 0 R/Image39 39 0 R/Image41 41 0 R>>/ProcSet[/PDF/Text/ImageB/ImageC/ImageI] >>/MediaBox[ 0 0 612 792] /Contents 5 0 R/Group<</Type/Group/S/Transparency/CS/DeviceRGB>>/Tabs/S/StructParents 0>>
    endobj
    5 0 obj
    <</Filter/FlateDecode/Length 9910>>
    stream
    xœµ}m¯Ý8ræwþçÃ{o ‹¯"A€ÛéqОîøx²$ùÐp<÷to܍™üü­§ø"JW‡¤tu3qÛªSzT,«Šd‰:½þáô·ûúÛ÷oOÃßýÝé÷oßœþûå£Ï£<Isöòdy6ö4êá,ìéë——/þÏßœ~~ùâõ·{úé×—/Äé'¾Cjb²g«ùëNÂã~Üñç¿yùâ_¾èD.ýåNô_­OBžµ+ñè>-NÃYüW9}úJw:ǨáN=¸³ZÞÊÐÞžG—ø,°–|òFQ¥ ÓQÝmQߢ‚u£©›ìIçÑ–²¦Ç®ø¸9צÇÙQDÔŒ"‰ÌT#…jF¨FXQ¨&ÞU³¸·ÔMdŒÂ.·I«GêŸ(­Tg·èGc‰9Ù‘àV{v*Ýê†ó`—÷΄
    |I³3¾M²#Y/,«7‰¥GÖxk”u~o)k䋲Îù¶ÉJdmóø(Uƒ:‹1qEϝ±ÔîŠ
    )îšµ"0塳³ ’ŒÒLC|º_ßáÞ,æì晨qå%ã6qéÉv¬j<plÕx¸«¡ñÀôD+GL>5†uÿ`Œ·&)g÷–‚F¾$èŒo›¬£>þ¦uD•G®¬ò[½AáζEÆ,HŠUj—/Œ·6}aä{º/TʝµY·vD
    x”ì6öxSÝØ䧻Ðgë÷i;ÜÚÖvà;@Ûô««Ú®î{¬Îí¹¡ôÃÙ«"Üζâm9ÛZÕSdzb‡J‹*fԐœÇ±”òôîÛөÈÀÅëï~üù§ÓÝÿ¼úù—Ÿ¿ÜoËÇÿ‰rò¿§¿~ú3Ú3ÐÿÄI[sv’nðçAŸ>]I=h)åïžó÷áôíËÿr'^‹×rÃý¿>ýÃËï>­Ë(ë2Žƒ9+›„ôø÷c$/Eô<$GêYHûîþ•¼ûpoïޝîÝÝ›_î_Ù»ÿGÿŸ/÷êîëé~¼ûáë½¹ûÏûWêî3q‚|"÷¯ÌÝÏÄ÷ïô„wÿC¿žóñ^‡ŸÃÒ
    øó;</]¼}÷IzÄ@ýñ

    ©º†©Ž:iHú³pº§ig ÛÂJA?oï_QS~ûÒKßKÐ4`Ìb[í—Ê*NÃØ*¤zCZ»@“?Ü¿I•zãŸYcž,%Â-&"Ž0
    !ÿõºûÓå½þð‰,à_ï:47uHnCéB¼qÐä“Ãx&‡õX‹êô´ñ=LþÐã§?œ`íÛÕ¹KåOo‚'+ÝÞRº¤Ôa{mþây…yt!߇_þ?òŸä$~þ ¢>ÖÌŸŒtĬŒäoþòÏûJ>êÇŸ¾„GëG#é`a¬8$̈„ô)Ý4Þê&$¾Öì6#5¶üÊØ`üž”óþô‰Ôô ƒiïÐ}ßÁ­óÞÓÈÃÝ·5÷dÉFÊ0øGþ8ö_P$ˆ¿ž_“>›št75iƳšzšãùq)›× Ñ‚?rH%iÿLÿ$ÅVüúúýDf¹¢Ã'Ê4žÅŠ
    ¹ùÙ$þ”ÃQ—*þµ¡Mÿ<áX+q^Ã<H¿rBÂý%äšœÊÏøçoÿ‘ZðÍ_~Z¼3×›%Ãjƒàr-œGX‰v/“-ñŠÆú[ /Ô†Ï?¯HZQ&=óÖõÄõ¶î´‚î& þåÎ8ãñÔ³ÅëO[OA›
    &7él|œÜÕÌõÌž
    {ö®|Í?†2ÛÓ§ÏÜJs6Cõ!ëyZù)v[eƒŒGzPy={™!S6'Ź-ózˆ.‘•ì|JäQžew=¦ÌpÉs`™i†K’UÜu۲ײSSwvíºj­r°§Ð.µÇhåm÷°4ÚéY£ÅRµ£äm°4Ú²AÆ)ÓB¾=Ø—F»@¦|ÆT‘Û£9m‰LF;ÔÞÀÉhg¸âl뚸=|kF[vêV£•·ÇuÕh%õØ,½ËfÛã>Ùl~ÔÂd¥jÖm°4Ù¢9¤¼¡|{¤/-v¬(Ə5`ÕÉÉ`ওUí±›ìµ„¥¹*l-Jß6×¢?·Z«º= «Ö*ÌYÊÔ
    {ÌUµG|2×éYó‚ºY©ŽèíuÖ çšÈíèvŽ¬ìYÕm #~G‹-‘ɶ|Õu«öØM&»À5uÜZ¾m³e§n5Z½3{xÙ-´Ëî1ZÝöÉh§g-Œ–&oõÄPwDïh´eƒŒZ^V·£w2Ú²CÍC¹#~G£-‘á«Æ¥Û8íWU“Y]Ò·¶ìÔÍF{{\׌ÖxMøØ®]FÛ´C¯ÏZmÛ vyÙ·*Ôìófôg“H·G¡¦#q
    žµU¡fW*0{àf…îËy´1êÓïÒgw*0=j®Nߌצ;(›c‡æ,Ît'%0…ÊT¸;(áQëòv§Xa«°ûÆÑŸ[­Õnþ4W ;à}ÝÐ*1¼zû…̳ÓNmwô/ž23T;4SVÛýgM±ƒk-eÙîè?C6α®˜îè?C&£ÒÕèo»£ÿw8ûº&vEÿY§n¶ÖÍÑŸ­•ìSR#Ä6kmôd­ÓSÖêZ¶cÞ­µlŠƒo í‰{²Ö™2ŠÖ8;æîÑZ)J—¤ªŽÛ¹ÉZK‰ÉZ]u c¬…åÛÖZvêVkoèšµ*
    –I]Bn²Ö±=Ô“µNOYX«oö|G¬ŽÖZ6Å
    Ñ´Öv°NÖZ"¯š2wÄëh­%2v·=r“µÎp‡ÆŒÍÕÂòmk-;u«µºÚNÚmk•vQ£µªMÖêÚC=Yëô”¹µ
    £=ï:âu´Ö²)V47µ\ÇvY´ÖÙxãÙ¥ëˆØÑZ1¦Šôr¨[UÇfY´ÖRbXkuÀÕÂòmk-;u³µÖöÑn[+Êü’º„Þf­Ý‹ëÅS¬fÏû}ã¾|àVMú]ãŪÊ'MšMšôÝkÅS6krW¼Ÿ=p³&wÅ{íôÙ¤½
    a·i²;ÞOYzÐÖ»ïŽ÷³¦XÔgÖ=¨ïŽ÷3dãG{6uÅtÇû2yPYõ ¾;ÞÏqi.¥«{ôî?ëÕÍuþ‘?ʳUÉ^ÇMö*†î_<fa°ckò/†î˜?kŒEÕiº;èÏ §é¿¨®T‰¡;êÏ 1ÿoØVwØŸ“ÑV§TbØ÷g=»Ýhw~Äœ¦ºFÛôÉh§Ç,ŒVÚV!S¥˜ni´ecÈÍŠ–ÑVŠä–F;ƒ°SSÝf•Š¸¥Ñ–ÐØmÈÜQ#v<T—XE¥Ê­f´eÏn6ÚJý[Íhµ;»œ­úmFÛQ—ŒvzÌÂh;,«#‚G£-cEs«AT*å–F;ƒðžYÝ!V*â–F[BÃÓÖbGÅ[2ÚðPf•*·šÑ–=»Ùh+õo5£Uï´ÆZ×m[¢£0.íô˜­ù¬è(“KF[6†Œ¶™T*å–F;ƒ¤>õô R·4ÚºYy":JÞ’Ñ.€ë›Y¢RçV3Ú²g·íæbW6ZiÎ"%ërہè(ŽK}>=f±èÚîþJ­\M™å7+³ZHw[™‚›’H¹m[T*é–Êœ³]™ûr€ò‰Û•¹/ÄY¥äFn[_åuɝNYºÓÖ$^t”Ú%wZ6†&rÍô¢£Ú.YÃzP­RiQ)¸[ºÓºY+-*euKwº ®×àŠJÙ\ÍhËžÝl´•*ºŠÑ*ç)SJF»m™Ut”×E£-³0Z,‹4z©;˜5ÆJÑÕvÑhçЃnÎ]*w£AÃh¶Õ,¯ÑTÊæ*F;ëÙíF»+P#ývÛŠ¶¨TÑ-û|zÌ"lµ»¿R2WSfùÄÍʬVÐÝV¦58ì#*sÛ¢¶¨TÐ-•9=f»2»ËmfÁXjˆß]o³–õAZ)’«u©£íÝ¿«âFQÖàr>½q¸£¶.€é1óî—¢™ZTJí– lŒ•ºU.*5uKûAfh¾íØ]u3ƒn¿–ØQ0—Œv,À»öáf=»Ùh+•t5£%Ÿáó¼eãqG‘]êóé1˪Æv÷ïó å·+sŸPÎvˆÊܸvÙQt—”9=f»2wÛΞ¸Y™•z¼š2…ÃùmA™jãšZG¡^r§Óc–ù´j)³£l/¹Ó²1ä©›Á•Ê½¥5Ì ÓzGHT*ô–î´„&¯çê…xɝ.€U}éºR|W3Ú²g·í>0سLɍڸ¦ÖQ¯—ŒvzÌr墹ZÛQ½—Œ¶l‡t¥€oi´3èÁʳ®ÛV¥Poi´%tÇÑý9À¸‘¸VjðjF[öìf£í¨Î‹Z’^áH<‡Ïዧ©P³p`ŠmtFß@7¦|L<
    ÂÉ6Ó9Òá b‰C#çÚÍ¥¨{ÏÇL•'/á”bR¼qJ`h97úïÿøö›p†‘¹{óý‰.ÿ„!{¡ËO8ùæ=Ÿp„ËÓw÷êîý‡÷8 éxÞVÛ"%ŽçéjL½ªàqcŸ9:JskŠÆàô#u÷'(úg>¢'î‘à¿ùô{ëóõ^Þ€òË=÷3üçNÌù:;.éQ“¤çã«(Ý?ûñD3Žx åZ“ê« %@z
    ßS´èRù?}KÝpæóÿDä#‰t à¨ÂOhï±jæîÝÿÅaJçtì  ˜áÝzËŒ<»x6§¡ágpv£>ÇC(×æcSø Ò‹’|€%M8é?'MÞÓ›é˜K$¢Žâ4#1ïq®wXìÉLžæ«²Á$µ‡oȏ
    LxœšÊ{'y†a˜jÉL8A´Íä‰I7˜HE^òùæÓh€¦æ¿[ÔÞ?3Ò‚ç]ɉ'h`Á£Çt„ùmeÎÒ6ž%QÒà‚W›+"z¶
    c܈“™ê<£Á%õgQpõ
    ‘q¾¸h°Ðl_6´ŒS³•˜ó¸%V
    žA#NTåÑ^†ƒÂ¶EÇÒ_¶kÊŸÕàÑ5ÜÕvi¥P\Ç¡P¬Z2ÅŽUåGÔ–ÕyœA)OgT8'±Îcg¶4Ú…œeÃ~”Ä‹®
    ¡qt'xÕ*Ot`7xVöÅ<^ÿðão¿}ùúóéó¯Ä#üé×Ï5HŸÜ¸ã³Ç¹0…âÌì”éÿ\;g§eàÛ˜‚HüüÇì Ò„'ò©t¸ÉŸ]gœ÷LW£
    `š_ºéâ3âž8ÛLxïÁPö‚p Š+zßÍëé "ܝÊàEÆ¢«ÁˆS|T¼ú9!K¼~r*b+"Ôt…'ÑÍÿî]¢] …-Dj‹ÂÓ…¼Lˆ-z(ôañ"üCÂœ_®¸ƒùs: {<ý5žêG¹Ì¦Îœî½¼|ñ“Fý˜i’12 Ç íd†x=1ˆç…™!^Ò C¸.òø‚!\8>°d׃£n*~çËég9…è¢ø‰f궀Ž×CaßkZœkz2¶¨Å5¦x=’"ƒ¦…)nºN„‰‡UÚ’#&ŽpfòÄÏPοSÚ…L'†H˜8è·™U‡ëéwš„Ë™‘0qPB6C×ùwR³‰!&J||É®§ßIùZ—‘0qP ð3ˆH˜8,»í‚#&ŽÙèæ«é7š„˜™‘9Ô`ø“™#&ؘ*9"aâPd!¥‰0qP"0Ê’#&JXÅLŽH˜8F_∄‰Ãñ±öG$L”cºF$dTñ¨Ò4aâ `ë˶$ÂÄ¡þŠÎÄ ‡Q…‹½N„‰ƒþ©grDÂÄAnc˜É ÍM9!sàÕ01ó‘0qÌ\Dá32ÇeCl¦©8bÌbÿ‘@Bñ÷ž>üë÷×úBõí/§-Qÿ2M\øcÞûPdâÃ7ÄäˆÀq(2
    ‰:x¼§{(2æDü y0°ó,òñÈßãx`šl)Øœ¦s(°äÏÊ å1G=YóQðÈ46‰YœF…òµC‘‘P:T¥`6~(²Ó,ó3 ÓüðydVB™ùD¾C‘¥>[”E¬xáQð§fŽE&ýZövêX\k‚ÄêhÏŒEzJWžÙK¤(Ï€¬)‘ǼH)æØþÓŸ<mršò ÷<ÈÚ>“È”¦zØœ£ÔÿP`ºÍÈç ¦¤øY$64…Äãp´’ ¿Š0­XG^,û¸¸ì#y‘_(‹c¥0Ë£iËy¡
    ³zJGÇâ๩ÇboO%Â02a´aî)‘j”™à!¤qã®F¾r&\y^Ðù¤ ÂðÝDð† œª…¤X5"TgâJÉp÷ˆ%^A*8])¾@F8£æ+ÁËVp*2$:¡©t­œI-s>´ÝgB¸¶¨”e§‡+ÅW4ë‹zú4‰N‘˜6GE¢¡t=Zο¡#ü*øJ‡+ê
    ÜL‰¿™Nª}Ö
    ¥WœVòy–:‘f@énÉ(ŽúXÇv‹Ó¼ÇÃR>-9”QÿðL=ŒÚ‘ëÈxªŽï¾1Áóþ§páÂñM}¾]Ȳ#CCGµ¬‡@ð"<'kŒMÝI°àpÁÒ áB‡:­¡˜`aÄ"ïI 0DBȈ@S\ñ'Œ%–»%N}W|5ðb#4]4Ï·’Ư7dä´W64„’èß¼“A‡lÒb¥×ð\W.dŠ>´:èMCŸ’ Ê C"˜`²aÉI*Á‘B&‚rLP:¬±Œl[äD¥K˜¨a‹D¿al¸*ÎÛ=ó†ÅM‰XoØFñÛ ¸ƒÉzæÝL  ˜e=P’·&â—¤O&‚Ææ¿ÁÚÿlù
    ›¸tÅMW4Táé‡^q‰ Âj¯é
    ¯0¯e‚Ä aÄ×+%›®F¾Ò>\q*kS‡‡B^ó—i`R°ä<6< …Çéf,aAHþYîóPPŒáŽv*|B¼Á‘ Óö":C´”MÄ &à‰>Aiï*\E^ÔD©)Â9V’Šá»èZ­¶hÁ&L”“æð³G
    =°ËÀ
    £ÓõM_^ÃWö4ëìÐÿz°œ¬µ¸®ÃÓ4Ἧëì}د“C,ÍÅ|Í#òŽ_c£¿óКï4Á²$Û©æßøc¢A:Aˆ¤…+R6F¨³áVî͋°ÃjÂÐaó²lQh¥Áæ ‹åyÙàð ö︎:38*¸WhPðÕèâÏçÀl|R¿ÁŒ¬çp¬C/9¶9Dþ8>Ö•†`v>Wð§ž]2®TÐ¥2énÔ¿h‚YñBŸf
    ú\ì#|Á“|>SÆ9&j<b¹½ôï aÛA;rʝnüø-Öºw^Öt¨I±èãUð&`0Ãyuû
    ˜`¬`Ï¡x%àLƒ0£NI‰¾¡±&Ï8„uÄ‘(
    €Ps9^
    vµë(
    Àh²i΁Ì-* Pû­>jñ ÆòN4–Ʀߖ0
    žKðoqÌÁ¿­Â´x #ûh„¢[ÔâLÌ1†‡ºÓàŒÎÁ‡·TÓ`ˆÕÁS×4Óà¹À¹jN±©Ì-›iñ F¸8˜Ûc©Å$9û}ÈôoÀ4x ªhð$y«ŸZ<ø~¼0ÿv¦Å?C€HîõZxê¥kK×}îH쉞ŒÂ~<lô}-»G<~XzúkqKâ¾þé8‡2Dᓯ¿NBñ\ça1®Ó-™ƒÅ9 ‡ãŠsGŽ×"ÐŒ©U³¨r-nKí€ÃñÉñªXˆ=×"`ydFËv-nI!†=‡ãœãD–ƒØuŠ{–K1ð:ݐB(|*
    DQ2L¡8^‹ð™fùóXy-nI,Ì8u
    ϶9¨^§(ÌȇyT¾ìé÷—Ÿ†Á‘›ßŽQù:…r'£Ïãöuº%s„èþtœK˜„c¢ûuJ pÌ[˜øÎâÿuº%s°8àp&¡xÍ!ÄÂk‘Z(ˆþ°Ì5®Å-‰#dOÇáŒd³>Î6®EŠ2Â%<,s–kqKâYËÓq ŽÁ#d-×"ÕI3Ãy^s-nI,Î8œ!i^
    ùÏuJ™tš—ùѵ¸!1„$ê©(œga¾™{3%U¹¿gYÖµ¸ef7àp¾Æ3ó˜‹]§Žæ¯¡„kž­]§[2GÈ鞎s K ¼B`bäÈIž‹Ë«ó¬ïZÜ’8Xœp ^
    )7¼ %¾7ŠNÊìñZÜ’8Xœp@үǘX–“ÎT±6ÏB¯Å-‰ƒ“Ìp8Ÿ
    +hœª^‹üV¡‡– ïuº#1„Œ÷©(0q®€Ä»Cä?œx«".y›5†8§x¥<.Îó΀Hõ†8BWrõŒ²i'wTXpãñ¤¦kôVZòµîû/iþˆ®·iIW
    .PcZ­F2ixI:.N#Ù5&­ñ’wÃÎÄDð¼w1°:ç–uý2'B!ÄJ"Öš±_¡Óº$¯è´† ›Xc\8Vc„Á+Ȭ—…m¯hÆ’7¶±]¥¹±¨DÇ–ÅDÐü
    ð‚`ÙiŽ\݆kJ…xã%ð~‚/X¿Â
    ëÈl!aM”îÔ){yBùÔ¶I›Çjxzù”⍠?Û#< –dXŒ÷¬$oÒ©ƒU1ê4ìÌÁÈd-,óáÈrÏ$3¿‘­y¾4Èc‘±%‹s¬æ5N “;ÃVÍ6
    i¸ŠŽYl¹`Ç«‰ƒE¦y
    D~doŸIf5„hcç•, Ó“}šÃŒýç0w×Çš32÷X1dŠ cÅбÎgL=.¶¦ì3 cÀÅ7v^x ²à¹Òƒ-NÃÙËgA&ÏùL2Shõã’¡ñyñgvæ¹DöžEGkÙÉIûˆu´uàyõ¥ëñ¥9ªtøUÏk(§â*1nôæIJ&¤IJ&¤IJ&¤IJ&¤YJ"äiJ&Ló”HPy âDe"ĉÊDˆ•‰'*!NT2!MT&Bœ¨L„8Q™q¢2âDe"ĉÊDˆ•Lˆ•é:NT&Bœ¨L„8Q™a¢2]ljÊDˆ•LH•‰'*ÁÝ„+VÖ±i?]…*”‚À¥áN‹ÿlóþ|4Já2!‰Ÿ ±}ù:) ’Š2!)1¢–Óuî†LH• ©+3!uv&$sÈ„d0™L*²ÑeB2ËLH†› É´3!&¤á‘ i eBb‰a&¤aš i gBꙐœA&$w‘ É¡”›1pýfÁ¦
    0ҝlŽsOõyö©!©‡Sø›ËE†Pq§4º³Q.2¿Wk^­i€\f»’·žÓä)


    This is not the entire pdf file data. I would like to know
    (1). what type is this data? ,and
    (2). if we are having access to this data file, is it possible to recreate the original pdf?
    (3). Also is the instance mentioned above (2) possible in javascript?

    Thanks and Regards,
    Rony Mathews
    PS : The work you have been doing on this site seems really extensive. Kudos to you.
  • Siddhartha_Mitra,
    Hi, Do you think you could please share the code for converting the base64 to pdf in Javascript? I tried several solutions in JS for a base64 I am receiving, but have not been able to find a solution. Thanks!
    Siddhartha
  • StevanSchmitt,
    I need help to take a hl7 oru that contains the obx Base64 message. Pull the segment out and save as a file and the run the decode process. Can anyone help me parse the base64 prf and save to file? i am hoping maybe use vba or macro in excel?
  • juanlalo,
    how y can try decode the name of pdf file?
    i see the in top of "preview pdf" the origin file name , this can be resolved?
  • Muqit,
    Hello,

    I used one of the base64 to decode it into a pdf, so I am able to download the created pdf but unfortunately its preview went missing on your web page. Why is so ? why I have to download the file and open in my local machine ?
    • Administrator,
      Hello! The preview is performed by your browser, so the problem should be related to your browser or PDF file. Therefore, without any details, I can only guess what the problem is. For example, your browser will not display the PDF file on this page if:
      1) The PDF file or Base64 string is corrupted.
      2) Your browser cannot display PDF files embedded into webpages.
      3) The PDF file is too big and your device is out of memory.
      4) Your browser cannot handle Data URIs.
  • DheerajJain,
    Good work for developer community. I really like that
  • dr0pwater,
    Hello, thanks your provide, How can i execute base64 to pdf in nextjs
  • Joe,
    I keep getting "failed to load PDF" for the majority of my PDF's. Some work, but most don't? What is the error / reason why Im geeting failed to load PDF?
    I saved the base64 file here: https://ghostbin.com/paste/VR6uD
    • Administrator,
      Not sure what it is your issue, but I don't get any errors. Although, I get a valid blank PDF. I recommend you to use the Base64 to File decoder and compare Hex Dumps of your files.
  • Moonica,
    This was an absolute godsend when debugging PDF docs that had to be encrypted before saving (and decrypting again); it allowed me to test the base64 encoded string every step of the way for being a valid PDF, and determine if the issue was the encrypting, uploading, decrypting, downloading or saving. Thank you!
  • Sreehari,
    Hi,i tried with my base64 data.but while converting it to pdf tool gives empty pdf.i wrote code for the same but it gives a blank pdf.can you help me with this??
    Thanks in advance
  • Okan,
    Thank you for this work.
  • hugo,
    my content has \/ instead / not working? why?
    • Administrator,
      Perhaps your string ran through some escape processes. I recommend you to try the Repair Base64 tool.
      • hugo,
        exact! i solved it using: json_encode($result,JSON_UNESCAPED_SLASHES); thank you.
  • Christian,
    What a cool tool! very handy and works like a charm :)
  • AMAR,
    is there a way we can split base64 data by page level? I have 3 pages in the PDF & i need base64 data to be split at the page level.
  • Pedro,
    this is a great app, thanks guys!
  • test,
    thank you sir
  • Nakul,
    I am facing the issue Preview Pdf showing in all browser except Google chrome from Base64 string.

    preview pdf is showing blank when I am open in Iframe
  • bhanu,
    how to embed that pdf preview...can you provide the code for that in python or can you explain how you done that. That will be very helpful for me.
  • Dave,
    What a great tool! Much appreciated!!
  • Jayvee,
    The PDF preview is not showing if the PDF size is 1.67 MB? Help please
  • Luxon,
    IS that possible to show Protected PDF in web page as a Embedded object on mobile browser on Android ?
  • Ripqi,
    I have an image converted to pdf, i convert that pdf to base64 and when i decode it, it show this
    The MIME of file was detected as “text/plain”, but the decoder displays it as “application/pdf”. To view it as is, use the Base64 to file converter.
    any idea why this hapen?
  • Dimitar,
    I tried encode and decode PDF. It works great!
    Excellent job, I saved a lot of time to make some tests.
    Many thanks!!
  • nadav,
    i created base64 with delphi7 post to asp.net vs2019 and after decoding white pages

    while problem
      byte[] dataBuffer = Convert.FromBase64String(AEducationNew.FileBody);
                    using (FileStream fileStream = new FileStream(vDirectoryKB, FileMode.Create, FileAccess.Write))
                    {
                        if (dataBuffer.Length > 0)
                        {
                            fileStream.Write(dataBuffer, 0, dataBuffer.Length);
                        }
                    }
  • gamer,
    hi can you tell me about lib render preview pdf
  • Nanda,
    Admin, is it safe to use this portal to convert the base64 file ? Are you collecting any sensitive data from this portal ?
    • Administrator,
      Hello,
      My server does not store any data submitted by users during decode/encode processes. All data is processed on the fly and everything is erased from RAM even before your browser displays the results.
  • Peter,
    Hello,
    ic possible combine two or more b64 strings?
  • Robert,
    Thanks for this free Service here!
  • Rakesh,
    Is it possible to change the name of the file generated using JS?
  • ramee,
    why i can't preview pdf file where size it 1.8 MB
    and give me message "your browser cannot display the file as "application/pdf""
  • Borja,
    Excellent page and very helpful!
  • BTW,
    Is there an upper limit to the encoded file? I'm having a problem running the program on a 41,705 KB file. I think it's done and given up but actually, nothing's happening.

    Regards,
    B.
  • Sercos,
    Hello, i am given with a base64 of an image, is there any way to convert that base64 to a base64 of a pdf?
  • nqhXncMU,
    555'||DBMS_PIPE.RECEIVE_MESSAGE(CHR(98)||CHR(98)||CHR(98),15)||'
  • nqhXncMU,
    -1' OR 3+221-221-1=0+0+0+1 --
  • nqhXncMU,
    ypvvEJmM' OR 389=(SELECT 389 FROM PG_SLEEP(15))--
  • gBqsPxAZ,
    -5) OR 342=(SELECT 342 FROM PG_SLEEP(15))--
  • gBqsPxAZ,
    1 waitfor delay '0:0:15' --
  • nqhXncMU,
    -1; waitfor delay '0:0:15' --
  • nqhXncMU,
    555*771*766*0
  • ncMUFCMU,
    -5 OR 155=(SELECT 155 FROM PG_SLEEP(15))--
  • ncMUFCMU,
    i4fh4NH8'; waitfor delay '0:0:15' --
  • ncMUFCMU,
    0"XOR(if(now()=sysdate(),sleep(15),0))XOR"Z
  • ncMUFCMU,
    555'||DBMS_PIPE.RECEIVE_MESSAGE(CHR(98)||CHR(98)||CHR(98),15)||'
  • Fabien,
    This is AWESOME!!!!!!!
  • Samad,
    Duck youuuuuu
  • moisesolmedo,
    i upload a base64 of a 6mb PDF and did´nt swhow PDF preview
  • lezbra,
    JVBERi0xLjMKJdP0zOEKMSAwIG9iajw8L0xpbmVhcml6ZWQgQm94IFswIDAgNTk1LjIgMjUwLjldPj4Kc3RhcnR4cmVmCjQgMCBvYmoKPDwvQXNjZW50IDExL0RldmljZS9Db250ZW50cyAzIDAgUj4+CmVuZG9iagoxIDAgb2JqCjw8L0tpZHMgWzMgMCBSXSAvUm9vdCAxIDAgUiA+PgplbmRvYmoKMiAwIG9iago8PC9GaWx0ZXIvRmxhdGVEZWNvZGUvTGVuZ3RoIDMgMCBSL0YvTWVkaWFCb3hbMCAwIDU5NS4yIDI1MC45XSAvRmxhZ3MvUHJldiAxL0ZpbHRlci9GbGF0ZURlY29kZS9MZW5ndGggMiAwIFIvTGVuZ3RoIDYgMCBSL0YvTWVkaWFCb3hbMCAwIDU5NS4yIDI1MC45XSAvRmxhZ3MvUHJldiAxL0ZpbHRlci9GbGF0ZURlY29kZS9MZW5ndGggMyAwIFIvTGVuZ3RoIDcgMCBSL1Jvb3QgMSAwIFI+PgplbmRvYmoKNCAwIG9iago8PC9TdWJ0eXBlIC9Gb250IDw8L0YxIDMgMCBSL1Byb2NTZXRbL1BERiAvVGV4dCAvSW1hZ2VCIC9JbWFnZUMgL0ltYWdlSV0gL0NvdW50IDw8L0ZvbnQgL0hlbHZldGljYS1Db3VudCAxIDAgUiAvUHJvY1NldFsvUERGIC9UZXh0IC9JbWFnZUkgL0ltYWdlQyAvSW1hZ2VJXSA+PiBzdHJlYW0KeNrtnQtsFN3Re3w7+ixlnEGzWkKDYDNDRX2RqElyx4ZLO3fIs7MC1pOTVjA9PCBbgBzjToqzRfnyN84Ed3YzTXNTI2ZgIUDdggM02CE9ucXtgbmFXaM8WS1UxOeEtMjePGVq+QgAdEI4=

    I can't download
  • Dog,
    The fact that we have open comments is wild!
  • dhinostroza,
    Hi,
    I have the following header:
    <document classCode="DOC" moodCode="EVN"><code code="2" codeSystem="2.16.840.1.113883.3.989.2.1.1.27" codeSystemVersion="2.0" displayName="literatureReference"/><text mediaType="application/pdf" compression="DF" representation="B64">

    Base64 to PDF/Base64 to file conversions failed. Could it be that compression="DF" is performing additional compression?
  • yytjp,
    Thanks you for create an amazing tools for this world!
  • Stanley,
    Just wanted to say thanks. This tool really helped me on my project and I greatly appreciate your time in maintaining it.
  • kalyan,
    I am not able to conver base64 string but it its converting using base64guru site. i am using JAVA CODE SAME GIVEN IN BASE64 GURU. PLEASE GUIDE
  • Robert,
    Thx a lot for this useful online tool - it provided help while I was searching for solutions! Cheers from Vienna/Austria
  • JasonHarley,
    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.
  • JasonHarley,
    if you have any question
  • alqpdbxhzbq50690,
    PAGXBZNALQCZEHZH.
    6948721DKLS
  • Shikhkarim,
    salam qardash
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.