Share JSON without losing the bytes
JSON problems hide in whitespace, escaping and truncation. The payload looks fine in a console, then the reader retypes it from a screenshot and the bug moves. A JSON paste keeps the exact characters and makes the structure readable at the same time.
Pretty-print, then paste
Minified JSON is technically valid and practically unreadable. Format it before sharing, and keep a copy of the original if the exact byte layout matters (it rarely does — JSON parsers do not care about whitespace).
With jq installed
# pretty-print to stdout
jq . response.json
# pretty-print in place, keeping a backup
jq . response.json > response.pretty.json
# validate without printing
jq empty response.json && echo "valid JSON"
In the browser console, JSON.stringify(obj, null, 2) does the same thing. On the paste itself, choose JSON as the language: keys, strings and numbers get coloured, so a missing brace or an unquoted key is visible at a glance.
What to keep and what to remove
| Keep | Remove or replace |
|---|---|
| The full envelope: status, headers you depend on, nested objects | Authorization headers and API keys |
| Field names exactly as the API returns them | Access and refresh tokens |
Types — null versus "" versus 0 is often the bug | Email addresses, phone numbers, device ids |
| Error codes and messages, verbatim | Internal hostnames and bucket names |
| Array lengths, even for long arrays | Thousands of real records — use a representative sample |
When a payload is huge, keep the shape and cut the volume: replace 5,000 array entries with three representative ones and note the real length in your message. The paste stays readable and the reader still sees the structure.
Sharing a JSON paste with a script
The raw endpoint returns the text exactly as stored, which means you can pipe it straight back into jq:
Read a JSON paste from a terminal
curl -s https://pastesite.com/raw/Js0nAbC123 | jq '.items | length'
That round trip is also a sanity check: if jq fails on the raw paste, the payload really is malformed and the problem is not the reader's copy-paste.
A note on validation
Highlighting is not validation. The site colours JSON; it does not tell you whether it parses. Run jq empty, python -m json.tool or JSON.parse before blaming the consumer. If you need to compare two payloads, the text comparison tool shows exactly which lines differ, which is usually faster than reading both by eye.
Frequently asked questions
Does the site validate my JSON?
No. It stores and highlights the text. Use jq, python -m json.tool or your runtime to validate before sharing.
Can I share a very large API response?
Up to 100,000 characters. For larger responses, trim the array to a representative sample and keep the surrounding structure.
Why does my JSON show as one long line?
It was minified. Pretty-print it first — a formatted payload is easier for someone else to inspect and quote in a reply.
Can I download the JSON from the paste?
Yes. /raw/<id> returns text/plain, so curl -s … > file.json gives you a file you can parse.