Also, for well formed JSON (not arbitrary JSON), it also works fine in HTTP headers. I think those two situations cover about 90% of use cases.
For example, here is a JSON payload URL encoded. It's not too bad, and much better than base64:
https://cyphr.me/coze#?input={%22pay%22:{%22msg%22:%22Hello%...
The initial payload is 238 bytes, URL encoded that payload is 288 bytes, as base 64 it is 318 bytes. (Here's another tool just for that: https://convert.zamicol.com/#?inAlph=text&in=%257B%2522pay%2...)
Also, for well formed JSON (not arbitrary JSON), it also works fine in HTTP headers. I think those two situations cover about 90% of use cases.
For example, here is a JSON payload URL encoded. It's not too bad, and much better than base64:
https://cyphr.me/coze#?input={%22pay%22:{%22msg%22:%22Hello%...
The initial payload is 238 bytes, URL encoded that payload is 288 bytes, as base 64 it is 318 bytes. (Here's another tool just for that: https://convert.zamicol.com/#?inAlph=text&in=%257B%2522pay%2...)