# Shuffle JSON > A free JSON shuffler that runs in the browser: drop a JSON array, a JSON object with a list inside, or a JSON Lines (JSONL, NDJSON) file, check that every record has the same keys, and download it in a new random order. https://shuffle-json.skillsafe.ai/ ## What it does (free, no sign-in, nothing uploaded) - Reads a JSON array, a list one or two levels inside a JSON object (`{"items": [...]}`), or JSON Lines with one record per line. Syntax errors are reported with line and column and what to fix (trailing commas, single quotes, comments, unquoted keys). - Checks, before shuffling, that every record has exactly the keys of record 1 (or a list of required keys you give), no nested objects, and no repeated key. It names the keys and records that differ and shuffles nothing until you leave keys out of the check, allow nested values, or fix the names. - Shuffles with an unbiased Fisher-Yates shuffle from a seeded generator (rejection sampling, no modulo bias). The seed is shown; the same seed gives the same order again. - Moves every record exactly as written: long numbers, escapes, key order and spacing are kept. - Can instead shuffle the values of one key across records, leaving the records in place. - Saves as JSON or JSON Lines, copies to the clipboard, and exports the new order as CSV. ## Optional AI step (signed-in, metered) "Match up key names with AI" decides, for keys that only some records have, whether each is the same field under another name (renamed in the shuffled copy), a note or leftover (left out of the check), or a real field of its own. It is sent the key names, how many records have each, their value types and up to three short example values per key - never the records. The page checks every decision (keys must exist, no chains, capitals-only and separator-only claims are verified, records that hold both names keep both) and checks the records again. - API: https://shuffle-json.skillsafe.ai/api.html - Input fields: `task` ("match_keys"), `keys` (JSON text: [{key, records, types, samples}]), `facts` (JSON text: records, first_record_keys, uneven_keys, keys_sent, keys_total). - Output: one JSON object `{"task":"match_keys","renames":[{"from","to","why"}],"ignore":[{"key","why"}],"keep":[{"key","why"}]}` with fixed reason words. ## Source Adapted from the agent skill @github/shuffle-json-data from github/awesome-copilot (https://github.com/github/awesome-copilot, MIT): https://skillsafe.ai/skill/@github/shuffle-json-data