Getting AJAX response body for use in error callback May 10, 2023 by Tarik As of jQuery 1.4.1 you should use: var json = JSON.parse(xhr.responseText); See http://api.jquery.com/jQuery.parseJSON/.