← Back to Blog

Developers & Code | Published Aug 21, 2026 | Updated Oct 13, 2026 | 6 min read

How to Share Large JSON Payloads Without Pasting Them

By Deepender Yadav

How to Share Large JSON Payloads Without Pasting Them — Edge Drop Guide

To share a large JSON payload, save it to a .json file and send the file (or a link to it) instead of pasting the text. A file stays whole and parseable, the other person can open it in an editor or query it with jq, and you get one clear moment to strip tokens before anyone sees it. Paste only short excerpts, such as a single error object, inside a code block.

When to paste JSON and when to use a file

What you haveBest way to share it
A few lines: one error object, one record, one config blockPaste it inside a code block
A whole API response or anything longer than a screenSave it as a .json file and attach or link it
A payload with tokens, cookies or personal dataRedact first, then share the redacted file
Data someone needs to test against or queryA file, so they can run jq or a test on it

Long pastes are hard to read in a chat thread, and when someone copies a long paste back out of chat they can easily miss part of it. A file avoids both problems.

Save the JSON to a file

From browser DevTools

In Chrome or Edge, open DevTools, go to the Network panel, right-click the request and choose Copy > Copy response. Firefox has the same idea under Copy > Copy Response. Then save it:

  1. In VS Code, press Ctrl+N for a new file.
  2. Press Ctrl+V to paste the response.
  3. Press Ctrl+S and save it as response.json.

Two menu items look similar but do something else. Copy as fetch and Copy as cURL copy code that repeats the *request*, not the response body. Copy all as HAR exports the whole session; Chrome's default (sanitized) version leaves out the Cookie, Set-Cookie and Authorization headers. Browser DevTools copy options explained covers every item in that menu.

From PowerShell

Write the response straight to disk, so it never touches the clipboard:

Invoke-WebRequest -Uri "https://api.example.com/items" -OutFile response.json

In Git Bash or WSL, curl -s "https://api.example.com/items" -o response.json does the same.

If the JSON is already on your clipboard, PowerShell 7 can write it to a file in one line. PowerShell 7 writes UTF-8 without a byte order mark by default, which is what JSON tools expect:

Get-Clipboard -Raw | Set-Content -Path response.json

Use -Raw so the clipboard comes back as one string rather than an array of lines.

Format minified JSON for reading

Minified JSON arrives as one enormous line. To make it readable:

  • VS Code: open the file (or paste into a new file and set the language to JSON with Ctrl+K M), then press Shift+Alt+F to run Format Document.
  • jq: jq . response.json prints it indented. Add -S to sort keys, which makes two payloads much easier to compare.
  • Python: python -m json.tool response.json uses only the standard library.

PowerShell can also reformat clipboard JSON with ConvertFrom-Json | ConvertTo-Json, but treat that as a quick view rather than a faithful copy. ConvertTo-Json only goes 2 levels deep unless you pass -Depth (up to 100), and parsing into PowerShell objects can change how values such as dates are written back out. For a byte-faithful pretty-print, use VS Code or jq.

Remove tokens and personal data before you share

JSON from real systems often carries credentials: access_token, refresh_token, id_token and api_key fields, session cookies captured in a HAR, or connection strings inside config objects. Remove them in the file, not by hand in a chat box.

This jq filter deletes those keys wherever they appear and writes a new file:

jq 'walk(if type == "object" then del(.access_token, .refresh_token, .id_token, .api_key, .password) else . end)' response.json > response.redacted.json

Key names are case-sensitive, so adjust the list to match the payload. Afterwards, search the redacted file for Bearer, eyJ (the start of most JWTs) and password to catch anything left inside string values. If a real token did reach a chat or ticket, rotating it matters more than deleting the message; what to do after copying an API key has the steps, and stack traces, tokens and the clipboard covers redacting logs.

Share the file

Pick the channel by who should see the data:

  • Teammates: attach the .json file to the Slack or Teams thread, the ticket or the pull request.
  • Code review or public examples: gh gist create response.redacted.json uploads it as a secret gist by default. Secret gists are hidden from search but are not private: anyone with the link can open them. Gists or clipboard for throwaway code compares the options.
  • Test fixtures: if the payload is sample data, commit it to the repository next to the test that uses it.
  • Customer or production data: keep it in a system with access control and an audit trail, and share a link rather than a copy.

Let people query the file instead of scrolling

Once the payload is a file, the reader can pull out exactly what they need:

jq '.error' response.json
jq '.data | length' response.json
jq '.data[] | select(.status == "active") | .id' response.json

On Windows, install jq with winget install jqlang.jq (Scoop and Chocolatey packages also exist). The PowerShell clipboard cheat sheet has more ways to move text between files and the clipboard, and WSL clipboard behaviour covers piping from Linux tools.

Does copying large JSON break anything?

The copy itself is usually fine. The live clipboard holds the whole payload, so Ctrl+V pastes all of it. Two things are worth knowing:

  • Clipboard history has a size cap. Windows clipboard history (Win+V) keeps items up to 4 MB, so a bigger response won't be saved there even though it pastes normally.
  • Line endings don't break valid JSON. The JSON standard requires line breaks and other control characters inside strings to be escaped, so a raw newline can only appear between values. Converting LF to CRLF on paste doesn't change what the JSON means.

Clipboard managers do keep a copy of large text, tokens included. Edge Drop, for example, stores text clips longer than 300 characters as plain text files in its data folder; where Edge Drop stores data on disk lists the locations. Use its Incognito mode, or delete the item afterwards, when the JSON holds credentials.

FAQ

How do you copy a JSON response from Chrome DevTools?

In the Network panel, right-click the request and choose Copy > Copy response. To read it first, select the request and open its Response tab.

Why does pasted JSON fail to parse?

Usually the paste is incomplete (part of the text was missed when copying it back out of a chat or a log), or extra text such as a log prefix came along with it. Parse the original file instead of a re-copied paste.

Is it safe to paste JSON into an online formatter?

Only if it contains no tokens, cookies or personal data. Format it locally with VS Code or jq instead; pasting tokens into online debuggers explains the risk.

Related reading

Sources

Deepender Yadav
Written by Deepender Yadav · Creator & Developer

Deepender Yadav created Edge Drop and builds and tests it, from the edge-hover shelf to each release. A B.Tech Computer Science Engineering student, Deepender writes the Edge Drop guides, comparisons and developer posts, and checks product details against the app's source code.

GitHub · LinkedIn

Copy. Stack. Drop.

Transform your clipboard into an interactive edge shelf. Stack, pin, and drag assets into any app with zero friction.

Download for Windows Get from Microsoft Store

How to Install Guide · First 10 Minutes Guide · Drag & Drop Guide · Edge Drop vs Win+V · Support

Free · Lightweight · Privacy First
Find us on CodeHype