{"id":3143,"date":"2020-03-25T17:16:01","date_gmt":"2020-03-25T22:16:01","guid":{"rendered":"http:\/\/www.incredigeek.com\/home\/?p=3143"},"modified":"2020-03-25T17:16:02","modified_gmt":"2020-03-25T22:16:02","slug":"decode-base64-in-python","status":"publish","type":"post","link":"https:\/\/www.incredigeek.com\/home\/decode-base64-in-python\/","title":{"rendered":"Decode base64 in python"},"content":{"rendered":"\n<p>Open up a Python console<\/p>\n\n\n\n<pre class=\"wp-block-preformatted\">>>> import base64<strong> <\/strong>\n>>> a = \"SGVsbG8gV29ybGQ=\"  <strong>&lt;- Change to your Base64 encoded string<\/strong>\n>>> base64.b64decode(a)  \nb'Hello World'  <strong>&lt;-Decoded string<\/strong>\n>>><\/pre>\n\n\n\n<p>Works with Python 2 and 3.  For some reason Python3 puts a b before the string in the output.<\/p>\n","protected":false},"excerpt":{"rendered":"<p>Open up a Python console >>> import base64 >>> a = &#8220;SGVsbG8gV29ybGQ=&#8221; &lt;- Change to your Base64 encoded string >>> base64.b64decode(a) b&#8217;Hello World&#8217; &lt;-Decoded string >>> Works with Python 2 and 3. For some reason Python3 puts a b before &hellip; <a href=\"https:\/\/www.incredigeek.com\/home\/decode-base64-in-python\/\">Continue reading <span class=\"meta-nav\">&rarr;<\/span><\/a><\/p>\n","protected":false},"author":1,"featured_media":0,"comment_status":"open","ping_status":"closed","sticky":false,"template":"","format":"standard","meta":{"footnotes":""},"categories":[292],"tags":[953,954,293],"class_list":["post-3143","post","type-post","status-publish","format-standard","hentry","category-python","tag-base64","tag-decode","tag-python"],"_links":{"self":[{"href":"https:\/\/www.incredigeek.com\/home\/wp-json\/wp\/v2\/posts\/3143","targetHints":{"allow":["GET"]}}],"collection":[{"href":"https:\/\/www.incredigeek.com\/home\/wp-json\/wp\/v2\/posts"}],"about":[{"href":"https:\/\/www.incredigeek.com\/home\/wp-json\/wp\/v2\/types\/post"}],"author":[{"embeddable":true,"href":"https:\/\/www.incredigeek.com\/home\/wp-json\/wp\/v2\/users\/1"}],"replies":[{"embeddable":true,"href":"https:\/\/www.incredigeek.com\/home\/wp-json\/wp\/v2\/comments?post=3143"}],"version-history":[{"count":1,"href":"https:\/\/www.incredigeek.com\/home\/wp-json\/wp\/v2\/posts\/3143\/revisions"}],"predecessor-version":[{"id":3144,"href":"https:\/\/www.incredigeek.com\/home\/wp-json\/wp\/v2\/posts\/3143\/revisions\/3144"}],"wp:attachment":[{"href":"https:\/\/www.incredigeek.com\/home\/wp-json\/wp\/v2\/media?parent=3143"}],"wp:term":[{"taxonomy":"category","embeddable":true,"href":"https:\/\/www.incredigeek.com\/home\/wp-json\/wp\/v2\/categories?post=3143"},{"taxonomy":"post_tag","embeddable":true,"href":"https:\/\/www.incredigeek.com\/home\/wp-json\/wp\/v2\/tags?post=3143"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}