How to Encode and Decode URL's in Nintex Workflow (all versions)

Nintex Newbie
18 7 8,969

The other day I overheard someone needing to encode/decode a URL string inside of a Nintex Workflow (and again at the Nintex 2017 InspireX during a presentation on Azure Functions). Presently this is a non-trivial task (more information here), so I decided to simplify the process a bit by creating a set of REST web service endpoints that would handle the encoding/decoding process.

These web services can easily be called from the Nintex Workflow Web Request actions in On premises products as well as O365.

To use these web service endpoints, configure a 'Web Request' action to POST application/json content to these endpoints:



To use the endpoints POST the following JSON:

{"value" : "Url To Encode/Decode"}
Canvas Initiate

Very cool!

Automation Master
Automation Master

For those of us who know this is impressive but don't really know what it means, can you give an example of when one might want to use this? Or for what reason?

Nintex Newbie

Hi Rhia,

Thanks for the feedback! I suppose I should have called a bit more attention to my mention of the UserVoice entry that prompted me to build this initially:

Here is the contents so folks do not have to click over:

Add "URL encode" and "URL decode" Action

We meet situations quite often when need to create customized URL which is saved and used later for redirecting within or outside SP. For this purpose we need to encode input text to valid URL and save it.

Opposite situation is for reading existing URL (decode) and parsing several elements for additional usage.

While URL encode / decode is quite simple for programmer (few lines of code) but very difficult (or impossible) to perform with current tools such as "Build String" for WF designer.

Existing/known workaround:
Multiple embedded "fn-Replace" functions are not a good solution because there can be many of them and WF designer can forget some and the result is not good. Maintenance of such a UDA is also very difficult.

Suggested solution:
Both functions are quite easy to perform in Visual Studio. Included link shows how it should work.

Thank you!

Nintex Newbie

I have had a use case where I needed to take user input to create a new list/library in SharePoint, so had to "encode" their input to deal with all characters that can't be used in URLs.  Instead of properly encoding the URL, I used a regular expression action in a workflow to just remove all the illegal characters.  It can be a bit ugly, but it's another workaround for some situations.

Regular expression pattern:


(The | means “or” in regex, and \ is the escape character.)


“If you find any of these weird characters in the Title, replace them with nothing, then save the result in the variable CleanNameForURL”.

Nintex Newbie

I think you were one of the folks that inspired the creation of this haha!

Nintex Newbie

Just wondering, when this will be integrated inside Nintex for Office 365?

Is there any assurance that the API above will stay forever?

Nintex Adventurer

Hey aaron_labiosa,

Thanks for your explanation in the comments section, for better explaining, why to use the Encoding/Decoding function. Here is a tool I would like to recommend, you must check it out.

that tool provides a wide variety of other online web development utilities