Use your browser to decode base64 encoded data

By | October 2, 2010

If you are dealing with base64 encoded data you may find useful to know that any modern browser can easily decode it using the Data URI scheme. All you need is pass the encoded data to the browser in the same way as you would enter a regular URL, but of course using the correct structure of the data URI scheme:

data:<MIME-type>;charset=<encoding>;base64,<data>

The MIME-type and charset parameters are optional, with default values text/plain and US-ASCII but is a good practice to always specify at least the MIME-type.

An example of base64 encoded data is:

data:text/plain;base64,bWVzc2FnZSBlbmNvZGVkIGluIGJhc2U2NA==

which should be decoded to:

message encoded in base64

Suggested tools for base64 encoding / decoding:

3 thoughts on “Use your browser to decode base64 encoded data

  1. mostafa

    this use full, but do u have a way to automatically convert base 64 urls in a page to simple url?

Leave a Reply