For AI agents: the complete documentation index is available at /en/llms.txt, the full documentation bundle is available at /en/llms-full.txt, and this page is available as Markdown at /en/guide/json/json-node-inserter.md.
  • English
  • JSON Node Bulk Insert

    JSON Node Bulk Insert inserts new fields into JSON objects, live. The redesigned workbench first scans and lists every object key - click a chip to make that field the insertion anchor and the right pane instantly shows the new JSON. Insert before or after a reference field, or at the start or end of an object, add several fields at once, and give them text, JSON values, or copies of the reference value.

    JSON Node Bulk Insert Interface

    30-second quickstart
    1. Paste or drop JSON (an empty input shows example cards: locale keys, status field, copy reference, array field)
    2. Pick an insert position and click a reference field under Discovered object keys
    3. Enter comma-separated new field names
    4. Choose the initial value (text / JSON value / copy reference), adjust the conflict strategy if needed
    5. Watch the live result, review Preview, then copy or export :::

    Workbench at a glance

    • Left: input area → Position and reference field → Insert new fields (with key order preview) → Initial value → Advanced settings
    • Right: result area with a JSON / Preview switch plus Result to Source, Copy, Copy node, and Export
    • Top: Format JSON, Upload, Clear all; the whole left card accepts dropped files
    • Live results: there is no Start button anymore - editing the input, the reference field, the new field names, or the initial value recalculates instantly
    • Layout: two side-by-side panes on wide screens, stacked on narrow ones

    How to use

    1. Input JSON data

    • Paste JSON into the left input area, or drop a .json / .txt file onto the left card; Upload works too
    • Format JSON re-indents the input with two spaces (disabled while the JSON is invalid); Clear all wipes the input, reference field, new field names, and initial value
    • Invalid JSON shows "Invalid JSON format" under the input and in the result pane, and the input header shows an "Invalid JSON" pill
    • Input is pre-processed loosely, so JSON5-style comments, single quotes, and trailing commas are accepted
    • The badge in the input header counts every object in the document, e.g. "2 objects"
    • If the JSON has no objects (or a top-level null), a notice says "No JSON objects found to insert fields into"
    • Long integers beyond the safe range trigger a precision warning (see Notes and number precision)
    • With an empty input the right pane offers four example cards - Add missing locale keys (After · ""), Append nullable status field (End · null), Clone reference field as draft (After · Copy), and Insert array before field (Before · []) - clicking one loads the JSON, position, reference field, and new fields at once

    2. Choose the insert position and reference field

    • Position and reference field starts with four options: Before / After (default) / Start / End
    • Once a reference field is filled in, the header shows "N target objects" so you know how many objects this run will touch
    • Discovered object keys lists every key found in the JSON; the number on each chip is how many objects contain that key
    • Hover a chip to see "key: sample value"; click to set it as the reference field, click again to clear it, and the active chip stays highlighted
    • With more than 8 keys a filter box appears (filters by key or sample value); the first 12 are shown by default with Show all N keys / Show fewer
    • Huge documents are scanned up to 20,000 nodes and at most 200 keys are listed, past which a notice appears
    • Reference field takes a field name, not a JSONPath; discovered keys are suggested as you type, and Clear empties it
    • With Before or After selected and no reference field, the right pane invites you to pick one from the discovered keys
    • If the reference field does not exist in the JSON, the tool reports "Invalid path or key"
    • With Start or End the reference field may be empty; see Reference field and insert scope for the exact behaviour

    3. Enter the new field names

    • Comma-separate several field names (English or Chinese commas) and the fields are inserted in the order you typed them
    • Each name becomes a chip with an x button so it can be removed individually; Clear empties the whole list
    • Duplicate names are ignored automatically with an "Ignored N duplicate field names" notice
    • The key order preview below the input marks the insert point with +fieldName: value while ... stands for the other existing keys
    • While no new field name is entered the right pane asks for one and offers four quick templates - "en, ja", "status", "tags", and "updatedAt" - one click fills them in

    4. Set the initial value

    Initial value has three modes: Text (default), JSON value, and Copy reference.

    • Quick presets: "", null, 0, false, true, [], {} - clicking one switches the mode and fills the value, and the active preset is highlighted
    • Text: whatever you type becomes the value of every new field; leave it blank to insert an empty string
    • JSON value: enter a valid JSON literal (such as null, 0, false, [], {}); a syntax error turns the input red and the result pane switches to an "Invalid JSON initial value ..." error
    • Copy reference: copies each target object's own reference value; without a reference field the tool asks you to pick one first

    Advanced settings shows a summary in its collapsed header (e.g. "Skip existing · 2 spaces"). Expanding it reveals:

    • When field already exists: Skip & keep (default) / Overwrite
    • JSON indentation: 2 spaces / 4 spaces / Compact
    • After changing any advanced option a Reset defaults button appears at the bottom
    • Insert position, conflict strategy, and JSON indentation are remembered locally; the reference field, new field names, and initial value are not saved

    5. Copy, export, or apply back to source

    • Copy copies the current JSON result; Copy node strips the outer {} / [] first
    • Export saves json_node_inserter.json
    • Result to Source writes the result back into the input area and clears the new field names so you can run another insertion
    • The result footer shows character and line counts

    Result area: JSON and insertion preview

    Results recalculate as you type. The badges in the right header:

    • N added: how many new fields this run inserted
    • N overwritten: how many existing fields were replaced under the Overwrite strategy
    • N skipped: how many same-name fields were skipped by the current strategy
    • 0 added: shown when nothing was inserted or overwritten

    JSON view: the complete JSON after insertion, read-only, with character and line counts at the bottom.

    • When every field already existed and was skipped, a notice says the output matches the input JSON
    • When only some were skipped, a warning notes how many existing fields were skipped automatically

    Preview: one row per target object with #, object path, inserted fields, and key order context columns.

    • Inserted fields are pills: +fieldName for added (green), ~fieldName → value for overwritten (yellow), and =fieldName skipped for skipped
    • Key order context lists the keys in their real order - inserted keys show as +key, overwritten keys as ~key - with the anchor and ellipses marking the position
    • The toolbar switches between Changed (N) and All objects (N); it defaults to Changed, and once more than 5 objects match, a search box filters by object path or field name
    • Preview shows the first 300 objects; past that a notice points you to the JSON view, copy, or export
    • When all target fields already existed and were skipped, the empty Changed view suggests switching to All objects

    The result pane also guides you when:

    • Before or After is selected but the reference field is empty - pick a reference field
    • The reference field is set but matches no object - "Invalid path or key" is shown
    • No new field name has been entered yet - the pane asks for one and offers quick templates

    Reference field and insert scope

    PositionInsert pointReference field
    BeforeRight before the reference fieldRequired
    AfterRight after the reference field (default)Required
    StartBefore the first key of the objectOptional
    EndAfter the last key of the objectOptional
    • The reference field matches by exact field name (case-sensitive), not JSONPath; several new fields are inserted consecutively at the anchor in the order typed
    • With a reference field filled in, the whole JSON is walked recursively (including objects inside arrays) and every object containing that key gets the new fields; nested objects are handled too
    • Empty reference field with Start or End applies only to the root object, or to each object directly inside a root array - deeper nested objects are left alone
    • New fields start as empty strings by default; to fill them in bulk, use "Overwrite value" in JSON Node Bulk Edit

    Notes and number precision

    :::warning Field names and key order Purely numeric field names are hoisted to the front and sorted numerically when JavaScript serializes an object - prefix the numbers with a non-digit (such as k_001 or k_002) to keep the order you typed. Same-name keys are skipped by default and never overwrite existing data.

    Number precision

    JSON numbers are parsed as floating point in the browser, so integer literals beyond the safe range (18-digit snowflake IDs, for example) may already lose precision while parsing, and the inserted output inherits that loss. The tool never touches the source input - store such IDs as strings when exactness matters.

    • The input JSON must be parseable; a top-level null or a document without objects cannot receive new fields
    • Results only appear in the right pane - the original input is not overwritten automatically, so copy, export, or click Result to Source to keep them
    • Everything runs locally in your browser; input is never uploaded

    Pairing with other JSON tools

    Every tool runs locally in your browser - input never leaves your machine.