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-value-extractor.md.
  • English
  • JSON Field Value Extractor

    JSON Field Value Extractor pulls field values out of JSON with JSONPath. The redesigned workbench first scans and lists every scalar field — click a chip to create a rule and the result updates live on the right. You can keep several rules, give each its own prefix / suffix, and pick Lines, Comma, SQL IN or JSON array output.

    JSON Field Value Extractor Interface

    :::tip 30-second quickstart

    1. Paste or drop JSON (an empty input shows example cards: product names, SQL IN clause, URL template)
    2. Click a field chip under Discovered fields, or type a JSONPath
    3. Optionally add a prefix / suffix to the rule (use {value} for the extracted value)
    4. Choose the output format: Lines / Comma / SQL IN / JSON array
    5. Copy or export the live result on the right :::

    Workbench at a glance

    • Left: input area → Discovered fields → Extraction rules → Output format
    • Right: result area with a Text / Table switch plus Copy and Export
    • Top: Format JSON, Upload file, Clear all; the whole input card accepts dropped files
    • Live results: there is no Start button anymore — editing the JSON, the rules or the output format recalculates instantly

    How to use

    1. Input JSON data

    • Paste JSON, or drop a .json / .txt file anywhere on the input card; Upload file works too
    • Format JSON re-indents the input with two spaces (disabled while the JSON is invalid)
    • Clear all wipes the source, the extraction rules and the field filter
    • Invalid JSON shows "JSON format error, please check the syntax" under the input and in the result pane
    • With an empty input, the right pane offers three example cards — Product names, SQL IN clause and URL template — clicking one loads the JSON, rules and output format at once

    2. Pick the fields to extract

    From Discovered fields

    • Once the JSON is valid, this row lists every scalar path (string, number, boolean, null); the number on each chip is how many times that path occurs
    • Hover a chip to see its path and a sample value; click to add / remove the corresponding rule — selected chips stay highlighted
    • With more than 8 fields a search box appears (filters by path or sample value); the first 12 are shown by default with Show all / Show less
    • Huge documents are scanned up to 20,000 nodes and at most 200 field paths are listed; past that the tool asks you to type the full JSONPath in a rule
    • If the JSON has no extractable scalar fields, a notice tells you so

    Type a JSONPath

    • Enter the path directly in the rule's path field; discovered paths are suggested as you type — click one to fill it in
    • Supported forms are listed in Path syntax below

    3. Configure extraction rules

    • Each rule is a card with an index, path, status pill, prefix and suffix; Add field appends more rules, and Clear resets to a single empty rule
    • The status pill updates live: 4 matched, No match, Objects only or Syntax error
    • Prefix and suffix accept the {value} placeholder, replaced with the extracted value; leave them empty when not needed
    • Results from several rules merge in rule order

    4. Choose the output format

    Four one-click presets:

    PresetOutput
    LinesOne value per line (default)
    CommaValues joined with ,
    SQL INSingle-quoted and parenthesized, e.g. ('A', 'B')
    JSON arrayA standard JSON array, e.g. ["A", "B", 2, true]

    Expand Format & cleanup to fine-tune; when collapsed, its summary shows the current setup (e.g. "Sep: \n · Deduped"):

    • Separator: the text-mode join string; \\n, \\t and other escapes are supported
    • Quotes: None / single / double; conflicting quotes inside values are escaped automatically
    • Outer prefix / suffix: wrapped around the entire output (separate from per-rule affixes)
    • Remove duplicates: dedupes by the final formatted value, keeping the first occurrence
    • Skip empty and null: filters empty strings and null
    • After customizing anything, a Reset defaults button appears at the bottom
    • JSON array mode needs no separator: it keeps numbers, booleans and null as typed values, and only rules with an affix turn their values into strings

    5. Copy or export

    • Copy in the result header copies the full current output
    • Export saves extracted_values.txt in text mode, or extracted_values.json in JSON array mode
    • In Table view each row has its own copy button

    Result area: text and table

    Results recalculate as you type. Above them you see:

    • N extracted: how many values this run produced
    • Deduped N: how many duplicates Remove duplicates dropped
    • Skipped N: how many empty values Skip empty and null filtered out

    Text view: the complete output, read-only, with character and line counts at the bottom — ready to copy.

    Table view: one row per value with #, matched path and raw value; when a rule's affix changes the value, an extra Formatted column appears, and the row button copies that single value. The table previews at most 300 rows; Copy and Export still include everything.

    Notices above the results:

    • Some rules matched no scalar values: a warning listing those paths; the other rules still produce output
    • No scalar values matched the current rules: happens when the matched nodes are objects or arrays
    • Matched values were all filtered out by Skip empty and null: check that toggle

    Path syntax

    FormMeaningExample
    Bare field nameRecursive match at any depth (equivalent to $..fieldName)name, user.name
    Path starting with $Absolute path from the root$.products[*].name
    Array wildcard / indexEvery array element, or one at a given position$.items[*].id, $.items[0].id
    Bracket notationFor keys containing special characters$['data']['title']

    Only scalars are extracted — object and array nodes are skipped. To reach a value inside an object, point the path at that concrete field.

    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 extracted output inherits it. The tool never edits the source JSON; store such IDs as strings when exactness matters.

    Pairing with other JSON tools

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