JSONPath 在线测试器

对任意 JSON 实时执行 JSONPath 查询 —— 通配符、递归下降、切片与过滤,全在浏览器中。

JSON 输入

节点详情

选择节点以查看详情

更多 JSON 工具

JSON 格式化

格式化、校验、浏览 JSON —— 100% 浏览器端处理,隐私安全

XML 转 JSON

粘贴 XML 即刻获得干净的 JSON —— 属性、重复元素、文本节点全部正确处理

CSV 转 JSON

将 CSV 行转换为 JSON 对象数组——引号字段、自定义分隔符、类型推断全部自动处理

JSON 转 CSV

将嵌套 JSON 扁平化为干净的 CSV 列——一键下载 Excel 可用的 .csv 文件

JSON 压缩

将 JSON 压缩为单行,实时查看节省的字节数

JSON 对比

语义化对比两个 JSON 文档——键顺序和空白差异不算差异

JSON 转义

为嵌入代码转义 JSON 字符串,或将字符串化的日志还原为可读 JSON

JSON 修复

一键修复损坏 JSON、JSON5、JS 对象、Python dict 及大模型截断输出。

JSON to TypeScript

将任意 JSON 转为干净的 TypeScript interface 或 type —— 自动合并数组、识别可选字段与联合类型。

YAML to JSON

将 K8s、Docker Compose、GitHub Actions 等 YAML 配置解析为干净 JSON,并可视化编辑。

JSON to YAML

任意 JSON 生成规范 YAML —— 智能引号、紧凑列表、2/4 空格缩进。

JSON to XML

将 JSON 序列化为规范 XML —— @_ 属性、重复元素、文本节点与安全标签名。

JSON Schema

从示例 JSON 推导标准 Schema —— 格式识别、required 交集、联合类型。

JSONPath 测试 ●

对任意 JSON 实时执行 JSONPath 查询 —— 通配符、递归下降、切片与过滤,全在浏览器中。

核心特性

Recursive Descent ..

Search every level of the document at once — $..price finds price fields wherever they hide.

Filter Expressions

Conditions like [?(@.price < 20)] or [?(@.inStock == true)] with && and || support.

Slices & Indexing

Negative indices, [0:2] slices and multi-index [0,2] selection, plus * wildcards on objects and arrays.

Match Paths

Toggle path display to see exactly where each match lives — $.store.books[3].title style output.

如何使用JSONPath 在线测试器

1

Paste Your JSON

Drop any JSON document into the input panel — the tree parses instantly.

2

Write a JSONPath

Type an expression or click a preset — results refresh live as you type.

3

Copy the Matches

Copy matched values (or paths) to the clipboard for queries, tests or docs.

技术架构与隐私安全对比

formatjson.net 与传统服务端上传型 JSON 工具的核心技术差异

100% 浏览器本地运行 零服务端上传 遵循 RFC 8259 & RFC 4180 64 位大整数与前导零保护 JSON Schema 2020-12 支持 PWA 离线使用
能力维度 / 技术规范 formatjson.net(纯浏览器端本地工作台) 传统服务端在线工具
数据处理位置与隐私性 100% 浏览器原生 JS 本地解析 —— 数据绝不离开当前设备 常将 JSON/XML/CSV 发送至远程后端服务器处理
敏感接口数据 / Token / 密钥安全 架构级安全 —— 零网络传输,加载后断网亦可完整使用 存在服务端日志留存或第三方数据泄露隐患
非标 JSON 与大模型截断修复 内置词法状态机一键修复注释、单引号、无引号 Key、尾随逗号、Python 字面量及未闭合括号 遇到非严格 JSON 直接报错中断
64 位雪花 ID 与前导零保护 精准识别超出 IEEE-754 安全范围的大整数与 "00123" 邮编/工号,零精度丢失 静默截断 64 位长整型或丢失前导零
深层嵌套数组电子表格化 支持任意层级子数组/子对象胶囊([n items] →)点击下钻、面包屑导航、三态排序与单元格直改 仅支持根节点一维表格或只读树视图
大文件渲染性能 200 节点分片懒加载树 + 分页表格 + 150KB 高亮熔断保护 数 MB 文件一次性渲染极易卡死主线程

常见问题

Which JSONPath syntax is supported? ▾

Dot notation $.a.b, bracket keys ['a b'], wildcards [*], recursive descent .., negative indices, slices [s:e:step], multi-index [0,2] and filters [?(@.x > 1)] including existence checks, =~ regex and && / ||.

How do I select books cheaper than 20? ▾

Use $.store.books[?(@.price < 20)] — the filter evaluates @ against each array element.

What does $..* return? ▾

Every descendant node in the document — handy to explore unknown structures quickly.

Can I see where matches came from? ▾

Enable "Include matched paths" to output [{ path, value }] objects with full JSONPath locations.

Is evaluation done locally? ▾

Yes — a custom zero-dependency evaluator runs entirely in your browser.