You paste a Stripe webhook payload into an online JSON formatter to figure out why the signature header keeps rejecting, and only later realize the body contained customer email addresses, internal order IDs, and a session token that someone else’s server now has in its logs. That paste happens in a fraction of a second; the data trail it leaves can last years.
This post walks through a three-minute local debugging routine that does the same work without ever shipping a byte off your machine. You will use a JSON formatter, validator, and tree viewer that runs entirely in the browser to format messy responses, jump to the exact broken line, browse deep payloads as a collapsible tree, and minify the corrected body for the wire, then verify the routine with a DevTools network check that proves nothing left.
Why Sending API Payloads to a Random Website Is a Real Risk
Most API responses look boring on the surface. A JSON object with a few string fields, maybe an array of items, nothing that screams “leak me.” In production, however, those same responses routinely contain session tokens, refresh tokens, customer email addresses, internal user IDs, internal hostnames embedded in error messages, and credential fragments in nested error objects that the developer never intended to share.
A server-backed JSON formatter receives the entire payload the moment you paste it. You have no way to know whether that copy is logged, indexed, retained for analytics, indexed by a crawler, or fed downstream as training data. The only safe assumption is that the data left your control, and once it has, you cannot prove where it went or who saw it.
The privacy angle is not theoretical. Pasting a customer’s PII into a server-backed tool can violate GDPR, HIPAA, PCI-DSS, or your own data-handling policy, with the audit trail starting at the moment the paste happened.1 A single field like user.email can quietly drag an entire incident response behind it.
The CapyToolkit JSON Formatter, Validator & Tree Viewer takes the opposite approach. Parsing, formatting, validation, and the tree view all execute in the browser tab, and a DevTools network check confirms that no request carries the input anywhere. That is the same verifiable guarantee every other CapyToolkit tool ships with, because client-side is the only way to make a privacy promise the developer can prove instead of trust.
Sensitive Data That Hides in Routine API Payloads
Several common payload fields look innocuous but carry meaningful exposure:
error.messagestrings that include internal hostnames or stack-trace fragmentsmetadataobjects that hold session tokens, refresh tokens, or device fingerprintsuser.email,user.id, anduser.phonefields that are usually real customer identifiersredirect_uriparameters that include signed state tokens for OAuth callbacks2debug.trace_idvalues that link a payload back to internal logs and infrastructure
The risk compounds once a payload is pasted again. One copy in a debugging tool, another in a Slack thread to ask a teammate, another in a support ticket to file a bug, and the same identifier has touched four different systems with no central record of consent. The fastest way to break the chain is to never send the data anywhere outside your browser in the first place.
The Three-Minute Local Debugging Routine
The routine is the same five steps every time a broken or unfamiliar API response lands on the screen. Paste it into the JSON Formatter, let the validator flag any syntax error and jump to its line, switch to tree view if the structure is deeper than three levels, follow any embedded identifiers (URLs, tokens, base64 fields) into the matching CapyToolkit tool, and minify the corrected payload before re-sending it.
- Paste. Copy the raw response from the dev tools network tab or the API client’s response viewer, paste it into the JSON Formatter’s input pane for messy API responses, and the tool parses it as you type, rendering the formatted version in the right pane.
- Validate. If the response is malformed JSON, the validator flags it immediately with a line and column number. The Find JSON Syntax Error by Line Number variant walks you through the four failures that account for most broken JSON: trailing comma, missing comma, unquoted key, and single quotes.
- Tree. Switch from text view to tree view using the toggle. Nested objects become expandable nodes that show their key count and array item count before you open them, which is essential for payloads over a few hundred lines where scrolling is no longer useful.
- Decode. For any JWT, base64 blob, or signed URL in the payload, copy the value out and paste it into the matching decoder (covered in the next section) before reading or acting on it.
- Minify. Once the structure is correct, switch to the minify output mode and copy the result straight into the request body.
The five steps cover roughly three minutes of focused work for a typical webhook payload, and the same routine scales up without modification for response bodies in the hundreds of kilobytes.
Pre-Deploy Validation Before a Config File Ships
Configuration files like package.json, .eslintrc.json, tsconfig.json, and CI manifest exports deserve the same discipline. The Validate JSON Before a Deploy variant turns the JSON Formatter into a pre-deploy check that runs in the browser before you commit or push.
A trailing comma after the last property is the single most common configuration error. The validator catches it instantly because RFC 8259 forbids trailing commas in both objects and arrays, unlike JavaScript object literals, which allow them and create the confusion that produces the bug in the first place.3 JavaScript and TypeScript forgive the trailing comma, so your IDE stays silent, and the strict parser inside node only complains when the file reaches the build step.
The validator’s “Jump to error” button focuses the input and selects the offending line, so you see the exact character to fix instead of counting offset positions inside a one-line error message. The fix is usually a one-character edit that turns an invalid file into a parseable one before the next build runs. That same check belongs in CI as a node -e "JSON.parse(require('fs').readFileSync('config.json'))" call, but the in-browser validator is the developer’s local spot-check before committing.
Handling Payloads Larger Than the Screen
For responses in the hundreds of kilobytes or megabytes, the kind that come from export endpoints, log search APIs, and large admin listings, text view is the wrong shape. Reading a Large JSON Payload With the Tree View is the only practical way to navigate.
The tree is built lazily. A node’s children do not exist in the DOM until the first time you expand that node, and any object or array with more than 500 children renders the first 500 plus a button that loads 100 more per click. You can browse a 50 MB response without freezing the tab.
Parsing for inputs over roughly 500 KB happens in a Web Worker that keeps typing and scrolling responsive on the main thread,4 which is the visible difference between a tool that handles real data and one that locks up at scale.
Minifying for the Wire
Once the payload is fixed, the Minify JSON for Production variant strips the formatting for the wire. Every insignificant byte of whitespace is removed, the parsed value is re-serialized with no indent, and you copy the minified result straight into the request body.
One honest caveat: because the output is a re-serialization of the parsed data, equivalent representations normalize. The number 1e2 comes back as 100, escape sequences may be rewritten in canonical form, and duplicate keys keep the last value per the spec.5 The data is unchanged, but its textual spelling may differ, which is a non-issue for API submission but worth knowing if you are diffing input and output byte-for-byte.

The Four Mistakes Behind Most Failed JSON Parses
A trailing comma after the last member, a missing comma between members, an unquoted key, and single quotes where double quotes are required account for the vast majority of failed parses. The fix for each is a one-character edit once the failing line is selected in front of you, and the MDN reference for JSON.parse errors covers every variant with examples.
The trailing comma is the easiest to see in practice. Paste {"a": 1,} and the validator flags the comma after 1, because RFC 8259 treats a comma with no following member as a syntax error rather than the harmless trailing token that JavaScript object literals allow.3 The behavior difference is the entire reason the bug exists.
The single-quote mistake is the most expensive to debug. A payload using {'a': 1} produces a confusing error about an unexpected token at the first single quote, and you often assume the structure is wrong before realizing the quote style is the issue.6 Once you see the error point at the quote itself, the fix takes a second.
When the Payload Contains More Than JSON
Real API responses often contain fields that need decoding before they make sense. A JWT sits in an Authorization header,7 a base64-encoded avatar occupies a user.profile_picture field, a webhook signature lives in a custom header, and an embedded URL in a next_page parameter needs inspection for tracking tokens.
The same local-first pattern applies to each of these. Paste the JWT into the JWT Decoder to inspect the header, payload, expiry, and claims without sending the token to a third-party validator. Paste base64 blobs into the Base64 encoder and decoder to read what they actually contain. Run any URL through the URL Parser to surface tracking parameters and credential leaks.
For webhook workflows, you should also verify the signature locally. Hash the raw request body with the Hash Generator using HMAC-SHA256 and the shared secret, then compare against the signature header in the request.8 That check catches replay attacks and follows the same pattern documented for API authentication, all without exposing the shared secret to anyone outside your tab.
This stack, JSON Formatter, JWT Decoder, Base64, URL Parser, and Hash Generator, is the everyday debug kit for an API engineer, and the entire stack runs locally in the browser with no copy of the payload ever leaving your tab. The full kit of browser-based developer tools that process everything locally sits behind that same guarantee, so the same privacy model holds the moment you reach for a hex viewer, a JWT debugger, or a UUID generator.
Verifying the Workflow Holds With a DevTools Network Check
The proof that nothing left the browser is reproducible in every tool. Open DevTools, switch to the Network tab, set the filter to “Doc” and “Fetch/XHR”, load the JSON Formatter, disconnect from the network using DevTools’s offline toggle, paste a real payload, and watch every step of the routine complete with zero outbound requests.
The same offline test on each of the supporting tools, including the JWT Decoder, Base64, URL Parser, and Hash Generator, shows the same pattern. Parsing and decoding happen entirely in the page context, and the only network traffic during a session is whatever you explicitly paste into an external API client to test the fix.

Reading a Webhook Signature or Auth Token Inline
Many API responses include a JWT in the Authorization header or a webhook signature in a custom header. Instead of opening a separate tool, copy the token directly from the formatted JSON view and paste it into the JWT Decoder to inspect its expiry and claims locally.
For HMAC webhook signatures, the same pattern works with the Hash Generator. Paste the raw request body, choose HMAC-SHA256, enter the shared secret, and compare the computed hash against the signature header. That verification step runs entirely in the browser and never exposes the shared secret to a third-party validator.
A Repeatable Pre-Share Audit
Before sharing a payload with a vendor, an AI assistant, or a support thread, run this checklist locally:
- Format the payload to confirm structure and visualize the tree
- Validate it to catch the four common syntax errors before any further handling
- Search the tree for
email,token,id,Authorization, andpasswordfields - Decode or hash any embedded values using the local tool stack
- Confirm the DevTools network panel is empty during the entire routine
For payloads that will be shared with AI tools specifically, run the JSON Formatter step first, then layer a PII scrub on top. PII detection on tokenized identifiers is more accurate when the structure is already formatted and visible.
For CI and pre-deploy checks, run the same validator step inside the build pipeline. A node -e "JSON.parse(require('fs').readFileSync('config.json'))" call is the shell-level equivalent of the in-browser check, and the JSON Formatter is your local spot-check for the same condition before committing.
The whole point of the routine is that the privacy guarantee is something you can prove, not something you have to take on faith. Paste a real payload, watch DevTools, and the empty network panel is the receipt.
- 1.
European Parliament and Council, “Regulation (EU) 2016/679 (General Data Protection Regulation), Article 4 — Definitions,” eur-lex.europa.eu, April 2016. https://eur-lex.europa.eu/eli/reg/2016/679/art_4/oj/eng
- 6.
OWASP Foundation, “OAuth 2.0 Protocol Cheat Sheet,” cheatsheetseries.owasp.org, accessed September 2026. https://cheatsheetseries.owasp.org/cheatsheets/OAuth2_Cheat_Sheet.html
- 2.
Mozilla Developer Network, “Trailing commas,” developer.mozilla.org, July 2025. https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Trailing_commas
- 8.
Surma, “Use web workers to run JavaScript off the browser’s main thread,” web.dev, December 2019. https://web.dev/articles/off-main-thread
- 3.
Mozilla Developer Network, “JSON.stringify(),” developer.mozilla.org, accessed September 2026. https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/JSON/stringify
- 5.
Ecma International, “ECMA-404: The JSON Data Interchange Syntax,” ecma-international.org, 2nd edition, December 2017. https://ecma-international.org/wp-content/uploads/ECMA-404.pdf
- 7.
M. Jones, J. Bradley, and N. Sakimura, “JSON Web Token (JWT),” RFC 7519, IETF, May 2015. https://www.rfc-editor.org/rfc/rfc7519
- 4.
Stripe, “Receive Stripe events in your webhook endpoint,” docs.stripe.com, accessed September 2026. https://docs.stripe.com/webhooks