Thursday, September 26, 2013

Offline URL Decoder - or GUID Decoder :)

I recently read a post by Jasper Oosterveld about how to decode a URL encoded string using the on-line page http://meyerweb.com/eric/tools/dencoder/.
I’ve used that a lot myself, but an almost as easy way is to use your browser. In IE you may type
javascript:unescape('%7BBE72746E%2D85DA%2D41AB%2DBB91%2D73941AF9DC10%7D')

in the address bar and it will decode it on the fly. Of course there is a quirk as some versions of IE strip the javascript part if you paste it.

image

Same works in Chrome if you first open a new blank tab, and then enter the same command. If you re-use an existing page it fails.

Or in your favorite browser, hit F12 which should open developer toolbars, choose the javascript console and execute the command there. Below is a screenshot from IE11.

image

Then all you’re left with is if it’s still easier to open that on-line page Smile

2 comments:

  1. Great way of doing it offline. And works fine for GUID's. However there are other encoding methods you can use for encoding / decoding Uri's. All of them you can use the same way but may have a different outcome based on the complexity of the URI.

    Replace 'unescape' with 'decodeURI'. And for encoding you can use 'encodeURI' or 'encodeURIComponent'.

    ReplyDelete
    Replies
    1. Valid point indeed :) And I should have covered it.

      Delete