Convert JSON to JSONP (on-the-fly) for easy cross-domain data requests using pure JavaScript.

Requests are served as content type "application/javascript" and cached for 4 hours for better performance. Simply pass 2 parameters (url and callback function name) to the json2jsonp.com domain, like this: https://json2jsonp.com/?url=http://domain.com/some/json&callback=cbfunc

If you use this service via JavaScript, pass the JSON URL to the "encodeURIComponent" function like this: https://json2jsonp.com/?url='+encodeURIComponent('JSON_URL_HERE')+'&callback=CB_FUNCTION_HERE ...to make sure it is properly parsed and JSONP is returned.
Use a similar function in other languages - e.g. "urlencode()" in PHP.

Drag the following link (bookmarklet) to your bookmarks toolbar for quick JSON to JSONP conversions: JSON to JSONP

Copyright © 2006-2016 JoomlaWorks.