JSONP to JSON Converter
Strips the callback wrapper of a JSONP response leaving only the JSON contained inside the parentheses.
Stripping the callback wrapper off JSONP
You opened an old API endpoint in the browser and got back something like callback({...});. That is JSONP: JSON wrapped in a function call, the trick everyone used to dodge the same-origin policy before CORS existed. No JSON parser will touch it, so pasting it into a validator fails on the very first character. Paste the whole response here and you get just the payload back.
The tool matches the entire input against the pattern name(content), with an optional trailing semicolon, and returns whatever sits between the first and the last parenthesis, trimmed. Callback names may contain letters, digits, underscores, dollar signs and dots, so a response shaped like angular.callbacks._0({...}) works fine. When nothing matches you get a not-recognised message rather than a wrong answer.
Two practical notes. Google APIs tend to prefix the body with a /**/ comment, and that prefix breaks the match, so delete it before pasting. The payload comes out as raw text with no validation and no reindenting, so if the call carries more than one argument you get all of them, comma separated. The page is just the two boxes, and everything runs in your browser.
Frequently asked questions
Does it pretty-print the result?
Does it handle the /**/ prefix used by Google APIs?
Does it check that the payload is valid JSON?
Related Tools
MessagePack to JSON (text) Converter
Explains the MessagePack binary format, its advantages and how to translate it into textual JSON.
BSON to JSON (text) Converter
Explains differences between binary BSON and JSON with a type table and textual conversion examples.
JSON to YAML
Convert JSON data to YAML format.
CBOR to JSON (text) Converter
Explains CBOR (RFC 8949), its types and how to represent compact binary values in textual JSON.
JSON to TypeScript
Convert a JSON to TypeScript interfaces with automatically inferred types. Detects strings, numbers, booleans, arrays, nested objects and union types. Everything in your browser.
YAML to JSON
Convert YAML data to JSON format.