68

I am currently using this site http://ostermiller.org/calc/encode.html to decode code like.

http%3A%2F%2Fh.mysite.com%2F007%2FYRM-CD-9 to http://h.mysite.com/007/YRM-CD-9 by using URL Decode on that decoding site.

I was wondering if this can be done via Notepad++.

thorn0
  • 9,362
  • 3
  • 68
  • 96
Mowgli
  • 3,422
  • 21
  • 64
  • 88

2 Answers2

143

In Notepad++ under Plugins => MIME Tools you will find URL Encode and URL Decode.

StackzOfZtuff
  • 2,534
  • 1
  • 28
  • 25
Jason69
  • 1,431
  • 2
  • 9
  • 2
24

Thanks to PiLHA.

  1. Download the jN plugin.
  2. Place files from Zip to Plugin folder of Notepad++ in C:\Programs Files\Notepad++\plugins.
  3. Save Code below as URLENDECODE.js and save it to C:\Program Files\Notepad++\plugins\jN\includes.
  4. Restart Notepad++.

Code:

var URLDecoderEncoder = Editor.addMenu('URL-Encoding/Decoding');
URLDecoderEncoder.addItem({
    text: 'Encode',
    cmd: function() {
        var unencoded = Editor.currentView.text;
        var encoded = encodeURIComponent(unencoded);
        Editor.currentView.text = encoded;
    }
});
URLDecoderEncoder.addItem({
    text: 'Decode',
    cmd: function() {
        var encoded = Editor.currentView.text;
        var unencoded = decodeURIComponent(encoded);
        Editor.currentView.text = unencoded;
    }
});
URLDecoderEncoder.addItem({
    text: 'Decode multi-pass (7x)',
    cmd: function() {
        var encoded = Editor.currentView.text;
        var unencoded_pass1 = decodeURIComponent(encoded);
        var unencoded_pass2 = decodeURIComponent(unencoded_pass1);
        var unencoded_pass3 = decodeURIComponent(unencoded_pass2);
        var unencoded_pass4 = decodeURIComponent(unencoded_pass3);
        var unencoded_pass5 = decodeURIComponent(unencoded_pass4);
        var unencoded_pass6 = decodeURIComponent(unencoded_pass5);
        var unencoded = decodeURIComponent(unencoded_pass6);
        Editor.currentView.text = unencoded;
    }
});
thorn0
  • 9,362
  • 3
  • 68
  • 96
Mowgli
  • 3,422
  • 21
  • 64
  • 88
  • 1
    Yes, Thanks. Only thing It won't record Macros. Thanks again. – Mowgli Jul 02 '13 at 20:07
  • 1
    Just a heads up, the JN plugin will add *lots* of new menu items, so if you don't like that you might want to avoid it or customize JN. – Anton Sep 25 '13 at 07:11
  • 1
    This JN plugin is a great tool! Thanks! Are you familiar with some other nice scripts to add to the JN? Where and where can i find them? – micnoy Dec 19 '13 at 12:52
  • 3
    By the way, to remove all unneeded menus you can move the scripts to 'disabled' folder ('plugins\jN\includes\disabled') – micnoy Dec 19 '13 at 13:15
  • And another issue with the plugin is that it causes a very annoying error everytime I open or switch to a .ps1 document (powershell). – Anton Jan 20 '14 at 16:16
  • 2
    This answer is a bit Overkill. See the answer from Jason69 for the built-in solution if you don't need the extra functionality and menu items that jN adds – ScrappyDev Apr 28 '15 at 19:51