{"id":1284,"date":"2015-11-01T22:26:14","date_gmt":"2015-11-01T20:26:14","guid":{"rendered":"http:\/\/www.robinglauser.ch\/blog\/?p=1284"},"modified":"2016-04-06T09:51:51","modified_gmt":"2016-04-06T07:51:51","slug":"a-simple-base64-decoderencoder","status":"publish","type":"post","link":"https:\/\/www.robinglauser.ch\/blog\/2015\/11\/01\/a-simple-base64-decoderencoder\/","title":{"rendered":"A simple base64 decoder\/encoder"},"content":{"rendered":"<h3>Why did I create this project<\/h3>\n<p>Everytime I needed to decode or encode something with base64 I looked up the first website on Google and was mad about all the ads and the non-intuitive interface of the website. This is why I choose to create a really simple base64 de\/encoder without any ads and with a clean interface.<\/p>\n<h3>How did I implement the solution<\/h3>\n<p><img loading=\"lazy\" decoding=\"async\" class=\"aligncenter wp-image-1285 size-full\" src=\"https:\/\/www.robinglauser.ch\/blog\/wp-content\/uploads\/2015\/09\/2015-09-01-22_17_13-Base64.png\" alt=\"2015-09-01 22_17_13-Base64\" width=\"1197\" height=\"640\" srcset=\"https:\/\/www.robinglauser.ch\/blog\/wp-content\/uploads\/2015\/09\/2015-09-01-22_17_13-Base64.png 1197w, https:\/\/www.robinglauser.ch\/blog\/wp-content\/uploads\/2015\/09\/2015-09-01-22_17_13-Base64-400x214.png 400w, https:\/\/www.robinglauser.ch\/blog\/wp-content\/uploads\/2015\/09\/2015-09-01-22_17_13-Base64-1024x548.png 1024w\" sizes=\"auto, (max-width: 1197px) 100vw, 1197px\" \/><\/p>\n<p>For the base64 encoding I&#8217;ve used the jQuery\u00a0plugin\u00a0<a href=\"https:\/\/github.com\/carlo\/jquery-base64\" target=\"_blank\">jquery-base64<\/a>. This may seem like a overkill and it probably is, but at the time I was looking for a short and sweet solution without having to implement the base64 encoding myself. The rest is just simply listening for click on the button and then using the plugin to en\/decode the values in the textareas and displaying them.<\/p>\n<h3>What difficulties did I encounter<\/h3>\n<p>At the time I was still learning how to correctly use jQuery and had some problems registering the onclick callbacks for the buttons.<\/p>\n<p><a href=\"http:\/\/base64.robinio.ch\/\" target=\"_blank\">http:\/\/base64.robinio.ch\/<\/a><\/p>\n","protected":false},"excerpt":{"rendered":"<p class=\"excerpt\">Why did I create this project Everytime I needed to decode or encode something with base64 I looked up the first website on Google and was mad about all the ads and the non-intuitive interface of the website. This is why I choose to create a really simple base64 de\/encoder without any ads and with a clean interface. How did &#8230; <a class=\"read-more\" href=\"https:\/\/www.robinglauser.ch\/blog\/2015\/11\/01\/a-simple-base64-decoderencoder\/\">Read More<\/a><\/p>\n","protected":false},"author":2,"featured_media":1285,"comment_status":"open","ping_status":"open","sticky":false,"template":"","format":"standard","meta":{"inline_featured_image":false,"footnotes":""},"categories":[123,45],"tags":[147,145,146,62],"class_list":["post-1284","post","type-post","status-publish","format-standard","has-post-thumbnail","hentry","category-case-studies","category-development","tag-base64","tag-decoding","tag-encoding","tag-jquery"],"yoast_head":"<!-- This site is optimized with the Yoast SEO plugin v27.2 - https:\/\/yoast.com\/product\/yoast-seo-wordpress\/ -->\n<title>A simple base64 decoder\/encoder - Robin Glauser<\/title>\n<meta name=\"robots\" content=\"index, follow, max-snippet:-1, max-image-preview:large, max-video-preview:-1\" \/>\n<link rel=\"canonical\" href=\"https:\/\/www.robinglauser.ch\/blog\/2015\/11\/01\/a-simple-base64-decoderencoder\/\" \/>\n<meta property=\"og:locale\" content=\"en_US\" \/>\n<meta property=\"og:type\" content=\"article\" \/>\n<meta property=\"og:title\" content=\"A simple base64 decoder\/encoder - Robin Glauser\" \/>\n<meta property=\"og:description\" content=\"Why did I create this project Everytime I needed to decode or encode something with base64 I looked up the first website on Google and was mad about all the ads and the non-intuitive interface of the website. This is why I choose to create a really simple base64 de\/encoder without any ads and with a clean interface. How did ... Read More\" \/>\n<meta property=\"og:url\" content=\"https:\/\/www.robinglauser.ch\/blog\/2015\/11\/01\/a-simple-base64-decoderencoder\/\" \/>\n<meta property=\"og:site_name\" content=\"Robin Glauser\" \/>\n<meta property=\"article:published_time\" content=\"2015-11-01T20:26:14+00:00\" \/>\n<meta property=\"article:modified_time\" content=\"2016-04-06T07:51:51+00:00\" \/>\n<meta property=\"og:image\" content=\"https:\/\/www.robinglauser.ch\/blog\/wp-content\/uploads\/2015\/09\/2015-09-01-22_17_13-Base64.png\" \/>\n\t<meta property=\"og:image:width\" content=\"1197\" \/>\n\t<meta property=\"og:image:height\" content=\"640\" \/>\n\t<meta property=\"og:image:type\" content=\"image\/png\" \/>\n<meta name=\"author\" content=\"Robin Glauser\" \/>\n<meta name=\"twitter:card\" content=\"summary_large_image\" \/>\n<meta name=\"twitter:creator\" content=\"@robinglauser\" \/>\n<meta name=\"twitter:site\" content=\"@robinglauser\" \/>\n<meta name=\"twitter:label1\" content=\"Written by\" \/>\n\t<meta name=\"twitter:data1\" content=\"Robin Glauser\" \/>\n\t<meta name=\"twitter:label2\" content=\"Est. reading time\" \/>\n\t<meta name=\"twitter:data2\" content=\"1 minute\" \/>\n<script type=\"application\/ld+json\" class=\"yoast-schema-graph\">{\"@context\":\"https:\/\/schema.org\",\"@graph\":[{\"@type\":\"Article\",\"@id\":\"https:\/\/www.robinglauser.ch\/blog\/2015\/11\/01\/a-simple-base64-decoderencoder\/#article\",\"isPartOf\":{\"@id\":\"https:\/\/www.robinglauser.ch\/blog\/2015\/11\/01\/a-simple-base64-decoderencoder\/\"},\"author\":{\"name\":\"Robin Glauser\",\"@id\":\"https:\/\/www.robinglauser.ch\/blog\/#\/schema\/person\/e1a94504a6ff5171fa13670932514b19\"},\"headline\":\"A simple base64 decoder\/encoder\",\"datePublished\":\"2015-11-01T20:26:14+00:00\",\"dateModified\":\"2016-04-06T07:51:51+00:00\",\"mainEntityOfPage\":{\"@id\":\"https:\/\/www.robinglauser.ch\/blog\/2015\/11\/01\/a-simple-base64-decoderencoder\/\"},\"wordCount\":171,\"commentCount\":0,\"publisher\":{\"@id\":\"https:\/\/www.robinglauser.ch\/blog\/#\/schema\/person\/e1a94504a6ff5171fa13670932514b19\"},\"image\":{\"@id\":\"https:\/\/www.robinglauser.ch\/blog\/2015\/11\/01\/a-simple-base64-decoderencoder\/#primaryimage\"},\"thumbnailUrl\":\"https:\/\/www.robinglauser.ch\/blog\/wp-content\/uploads\/2015\/09\/2015-09-01-22_17_13-Base64.png\",\"keywords\":[\"base64\",\"decoding\",\"encoding\",\"jquery\"],\"articleSection\":[\"Case Studies\",\"Development\"],\"inLanguage\":\"en-US\",\"potentialAction\":[{\"@type\":\"CommentAction\",\"name\":\"Comment\",\"target\":[\"https:\/\/www.robinglauser.ch\/blog\/2015\/11\/01\/a-simple-base64-decoderencoder\/#respond\"]}]},{\"@type\":\"WebPage\",\"@id\":\"https:\/\/www.robinglauser.ch\/blog\/2015\/11\/01\/a-simple-base64-decoderencoder\/\",\"url\":\"https:\/\/www.robinglauser.ch\/blog\/2015\/11\/01\/a-simple-base64-decoderencoder\/\",\"name\":\"A simple base64 decoder\/encoder - Robin Glauser\",\"isPartOf\":{\"@id\":\"https:\/\/www.robinglauser.ch\/blog\/#website\"},\"primaryImageOfPage\":{\"@id\":\"https:\/\/www.robinglauser.ch\/blog\/2015\/11\/01\/a-simple-base64-decoderencoder\/#primaryimage\"},\"image\":{\"@id\":\"https:\/\/www.robinglauser.ch\/blog\/2015\/11\/01\/a-simple-base64-decoderencoder\/#primaryimage\"},\"thumbnailUrl\":\"https:\/\/www.robinglauser.ch\/blog\/wp-content\/uploads\/2015\/09\/2015-09-01-22_17_13-Base64.png\",\"datePublished\":\"2015-11-01T20:26:14+00:00\",\"dateModified\":\"2016-04-06T07:51:51+00:00\",\"breadcrumb\":{\"@id\":\"https:\/\/www.robinglauser.ch\/blog\/2015\/11\/01\/a-simple-base64-decoderencoder\/#breadcrumb\"},\"inLanguage\":\"en-US\",\"potentialAction\":[{\"@type\":\"ReadAction\",\"target\":[\"https:\/\/www.robinglauser.ch\/blog\/2015\/11\/01\/a-simple-base64-decoderencoder\/\"]}]},{\"@type\":\"ImageObject\",\"inLanguage\":\"en-US\",\"@id\":\"https:\/\/www.robinglauser.ch\/blog\/2015\/11\/01\/a-simple-base64-decoderencoder\/#primaryimage\",\"url\":\"https:\/\/www.robinglauser.ch\/blog\/wp-content\/uploads\/2015\/09\/2015-09-01-22_17_13-Base64.png\",\"contentUrl\":\"https:\/\/www.robinglauser.ch\/blog\/wp-content\/uploads\/2015\/09\/2015-09-01-22_17_13-Base64.png\",\"width\":1197,\"height\":640},{\"@type\":\"BreadcrumbList\",\"@id\":\"https:\/\/www.robinglauser.ch\/blog\/2015\/11\/01\/a-simple-base64-decoderencoder\/#breadcrumb\",\"itemListElement\":[{\"@type\":\"ListItem\",\"position\":1,\"name\":\"Home\",\"item\":\"https:\/\/www.robinglauser.ch\/blog\/\"},{\"@type\":\"ListItem\",\"position\":2,\"name\":\"A simple base64 decoder\/encoder\"}]},{\"@type\":\"WebSite\",\"@id\":\"https:\/\/www.robinglauser.ch\/blog\/#website\",\"url\":\"https:\/\/www.robinglauser.ch\/blog\/\",\"name\":\"Robin Glauser\",\"description\":\"My Blog about Development, Design and my random thoughts.\",\"publisher\":{\"@id\":\"https:\/\/www.robinglauser.ch\/blog\/#\/schema\/person\/e1a94504a6ff5171fa13670932514b19\"},\"potentialAction\":[{\"@type\":\"SearchAction\",\"target\":{\"@type\":\"EntryPoint\",\"urlTemplate\":\"https:\/\/www.robinglauser.ch\/blog\/?s={search_term_string}\"},\"query-input\":{\"@type\":\"PropertyValueSpecification\",\"valueRequired\":true,\"valueName\":\"search_term_string\"}}],\"inLanguage\":\"en-US\"},{\"@type\":[\"Person\",\"Organization\"],\"@id\":\"https:\/\/www.robinglauser.ch\/blog\/#\/schema\/person\/e1a94504a6ff5171fa13670932514b19\",\"name\":\"Robin Glauser\",\"image\":{\"@type\":\"ImageObject\",\"inLanguage\":\"en-US\",\"@id\":\"https:\/\/www.robinglauser.ch\/blog\/wp-content\/uploads\/2015\/10\/DSC_1244_small.jpg\",\"url\":\"https:\/\/www.robinglauser.ch\/blog\/wp-content\/uploads\/2015\/10\/DSC_1244_small.jpg\",\"contentUrl\":\"https:\/\/www.robinglauser.ch\/blog\/wp-content\/uploads\/2015\/10\/DSC_1244_small.jpg\",\"width\":800,\"height\":530,\"caption\":\"Robin Glauser\"},\"logo\":{\"@id\":\"https:\/\/www.robinglauser.ch\/blog\/wp-content\/uploads\/2015\/10\/DSC_1244_small.jpg\"},\"description\":\"I'm a web developer.\",\"sameAs\":[\"https:\/\/www.robinglauser.ch\",\"https:\/\/www.instagram.com\/robinglauser\/\",\"https:\/\/x.com\/robinglauser\"],\"url\":\"https:\/\/www.robinglauser.ch\/blog\/author\/robin\/\"}]}<\/script>\n<!-- \/ Yoast SEO plugin. -->","yoast_head_json":{"title":"A simple base64 decoder\/encoder - Robin Glauser","robots":{"index":"index","follow":"follow","max-snippet":"max-snippet:-1","max-image-preview":"max-image-preview:large","max-video-preview":"max-video-preview:-1"},"canonical":"https:\/\/www.robinglauser.ch\/blog\/2015\/11\/01\/a-simple-base64-decoderencoder\/","og_locale":"en_US","og_type":"article","og_title":"A simple base64 decoder\/encoder - Robin Glauser","og_description":"Why did I create this project Everytime I needed to decode or encode something with base64 I looked up the first website on Google and was mad about all the ads and the non-intuitive interface of the website. This is why I choose to create a really simple base64 de\/encoder without any ads and with a clean interface. How did ... Read More","og_url":"https:\/\/www.robinglauser.ch\/blog\/2015\/11\/01\/a-simple-base64-decoderencoder\/","og_site_name":"Robin Glauser","article_published_time":"2015-11-01T20:26:14+00:00","article_modified_time":"2016-04-06T07:51:51+00:00","og_image":[{"width":1197,"height":640,"url":"https:\/\/www.robinglauser.ch\/blog\/wp-content\/uploads\/2015\/09\/2015-09-01-22_17_13-Base64.png","type":"image\/png"}],"author":"Robin Glauser","twitter_card":"summary_large_image","twitter_creator":"@robinglauser","twitter_site":"@robinglauser","twitter_misc":{"Written by":"Robin Glauser","Est. reading time":"1 minute"},"schema":{"@context":"https:\/\/schema.org","@graph":[{"@type":"Article","@id":"https:\/\/www.robinglauser.ch\/blog\/2015\/11\/01\/a-simple-base64-decoderencoder\/#article","isPartOf":{"@id":"https:\/\/www.robinglauser.ch\/blog\/2015\/11\/01\/a-simple-base64-decoderencoder\/"},"author":{"name":"Robin Glauser","@id":"https:\/\/www.robinglauser.ch\/blog\/#\/schema\/person\/e1a94504a6ff5171fa13670932514b19"},"headline":"A simple base64 decoder\/encoder","datePublished":"2015-11-01T20:26:14+00:00","dateModified":"2016-04-06T07:51:51+00:00","mainEntityOfPage":{"@id":"https:\/\/www.robinglauser.ch\/blog\/2015\/11\/01\/a-simple-base64-decoderencoder\/"},"wordCount":171,"commentCount":0,"publisher":{"@id":"https:\/\/www.robinglauser.ch\/blog\/#\/schema\/person\/e1a94504a6ff5171fa13670932514b19"},"image":{"@id":"https:\/\/www.robinglauser.ch\/blog\/2015\/11\/01\/a-simple-base64-decoderencoder\/#primaryimage"},"thumbnailUrl":"https:\/\/www.robinglauser.ch\/blog\/wp-content\/uploads\/2015\/09\/2015-09-01-22_17_13-Base64.png","keywords":["base64","decoding","encoding","jquery"],"articleSection":["Case Studies","Development"],"inLanguage":"en-US","potentialAction":[{"@type":"CommentAction","name":"Comment","target":["https:\/\/www.robinglauser.ch\/blog\/2015\/11\/01\/a-simple-base64-decoderencoder\/#respond"]}]},{"@type":"WebPage","@id":"https:\/\/www.robinglauser.ch\/blog\/2015\/11\/01\/a-simple-base64-decoderencoder\/","url":"https:\/\/www.robinglauser.ch\/blog\/2015\/11\/01\/a-simple-base64-decoderencoder\/","name":"A simple base64 decoder\/encoder - Robin Glauser","isPartOf":{"@id":"https:\/\/www.robinglauser.ch\/blog\/#website"},"primaryImageOfPage":{"@id":"https:\/\/www.robinglauser.ch\/blog\/2015\/11\/01\/a-simple-base64-decoderencoder\/#primaryimage"},"image":{"@id":"https:\/\/www.robinglauser.ch\/blog\/2015\/11\/01\/a-simple-base64-decoderencoder\/#primaryimage"},"thumbnailUrl":"https:\/\/www.robinglauser.ch\/blog\/wp-content\/uploads\/2015\/09\/2015-09-01-22_17_13-Base64.png","datePublished":"2015-11-01T20:26:14+00:00","dateModified":"2016-04-06T07:51:51+00:00","breadcrumb":{"@id":"https:\/\/www.robinglauser.ch\/blog\/2015\/11\/01\/a-simple-base64-decoderencoder\/#breadcrumb"},"inLanguage":"en-US","potentialAction":[{"@type":"ReadAction","target":["https:\/\/www.robinglauser.ch\/blog\/2015\/11\/01\/a-simple-base64-decoderencoder\/"]}]},{"@type":"ImageObject","inLanguage":"en-US","@id":"https:\/\/www.robinglauser.ch\/blog\/2015\/11\/01\/a-simple-base64-decoderencoder\/#primaryimage","url":"https:\/\/www.robinglauser.ch\/blog\/wp-content\/uploads\/2015\/09\/2015-09-01-22_17_13-Base64.png","contentUrl":"https:\/\/www.robinglauser.ch\/blog\/wp-content\/uploads\/2015\/09\/2015-09-01-22_17_13-Base64.png","width":1197,"height":640},{"@type":"BreadcrumbList","@id":"https:\/\/www.robinglauser.ch\/blog\/2015\/11\/01\/a-simple-base64-decoderencoder\/#breadcrumb","itemListElement":[{"@type":"ListItem","position":1,"name":"Home","item":"https:\/\/www.robinglauser.ch\/blog\/"},{"@type":"ListItem","position":2,"name":"A simple base64 decoder\/encoder"}]},{"@type":"WebSite","@id":"https:\/\/www.robinglauser.ch\/blog\/#website","url":"https:\/\/www.robinglauser.ch\/blog\/","name":"Robin Glauser","description":"My Blog about Development, Design and my random thoughts.","publisher":{"@id":"https:\/\/www.robinglauser.ch\/blog\/#\/schema\/person\/e1a94504a6ff5171fa13670932514b19"},"potentialAction":[{"@type":"SearchAction","target":{"@type":"EntryPoint","urlTemplate":"https:\/\/www.robinglauser.ch\/blog\/?s={search_term_string}"},"query-input":{"@type":"PropertyValueSpecification","valueRequired":true,"valueName":"search_term_string"}}],"inLanguage":"en-US"},{"@type":["Person","Organization"],"@id":"https:\/\/www.robinglauser.ch\/blog\/#\/schema\/person\/e1a94504a6ff5171fa13670932514b19","name":"Robin Glauser","image":{"@type":"ImageObject","inLanguage":"en-US","@id":"https:\/\/www.robinglauser.ch\/blog\/wp-content\/uploads\/2015\/10\/DSC_1244_small.jpg","url":"https:\/\/www.robinglauser.ch\/blog\/wp-content\/uploads\/2015\/10\/DSC_1244_small.jpg","contentUrl":"https:\/\/www.robinglauser.ch\/blog\/wp-content\/uploads\/2015\/10\/DSC_1244_small.jpg","width":800,"height":530,"caption":"Robin Glauser"},"logo":{"@id":"https:\/\/www.robinglauser.ch\/blog\/wp-content\/uploads\/2015\/10\/DSC_1244_small.jpg"},"description":"I'm a web developer.","sameAs":["https:\/\/www.robinglauser.ch","https:\/\/www.instagram.com\/robinglauser\/","https:\/\/x.com\/robinglauser"],"url":"https:\/\/www.robinglauser.ch\/blog\/author\/robin\/"}]}},"_links":{"self":[{"href":"https:\/\/www.robinglauser.ch\/blog\/wp-json\/wp\/v2\/posts\/1284","targetHints":{"allow":["GET"]}}],"collection":[{"href":"https:\/\/www.robinglauser.ch\/blog\/wp-json\/wp\/v2\/posts"}],"about":[{"href":"https:\/\/www.robinglauser.ch\/blog\/wp-json\/wp\/v2\/types\/post"}],"author":[{"embeddable":true,"href":"https:\/\/www.robinglauser.ch\/blog\/wp-json\/wp\/v2\/users\/2"}],"replies":[{"embeddable":true,"href":"https:\/\/www.robinglauser.ch\/blog\/wp-json\/wp\/v2\/comments?post=1284"}],"version-history":[{"count":7,"href":"https:\/\/www.robinglauser.ch\/blog\/wp-json\/wp\/v2\/posts\/1284\/revisions"}],"predecessor-version":[{"id":1849,"href":"https:\/\/www.robinglauser.ch\/blog\/wp-json\/wp\/v2\/posts\/1284\/revisions\/1849"}],"wp:featuredmedia":[{"embeddable":true,"href":"https:\/\/www.robinglauser.ch\/blog\/wp-json\/wp\/v2\/media\/1285"}],"wp:attachment":[{"href":"https:\/\/www.robinglauser.ch\/blog\/wp-json\/wp\/v2\/media?parent=1284"}],"wp:term":[{"taxonomy":"category","embeddable":true,"href":"https:\/\/www.robinglauser.ch\/blog\/wp-json\/wp\/v2\/categories?post=1284"},{"taxonomy":"post_tag","embeddable":true,"href":"https:\/\/www.robinglauser.ch\/blog\/wp-json\/wp\/v2\/tags?post=1284"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}