You can also try using base64 encoding.
There is a previous post that deals with its implementation in JavaScript.
Like in .NET, there are many examples showing how to do this. Here is one I found from Google.
Of course, strings may be slightly larger than urlencoding. However, they will be confusing, which may be an advantage depending on the application.
cdmckay
source share