SQL转JSON

从 INSERT 语句中反解出 JSON 数据。

sql反解
关于「SQL转JSON」

它属于「JSON 工具」分类:JSON 的格式化、结构变换与各种数据格式互转。

  • 从 INSERT INTO 表名 (列…) VALUES (值…); 中反解出结构化数据。
  • 同时支持单条与批量插入(一条语句多组 VALUES)。
  • 正确处理值中包含的括号、逗号与转义引号,不会错误切分。
  • NULL 会转成 JSON 的 null,纯数字会转成数值类型。
  • 反引号、双引号、方括号三种标识符引用风格都能识别。

完全免费、无需注册;所有处理都在浏览器本地完成,文件不会上传到任何服务器。

相关关键词:SQL转JSON、JSON 工具、sql、反解、在线工具、免费

如何使用「SQL转JSON」
  1. 打开工具:打开「SQL转JSON」页面,无需注册、无需安装任何软件。
  2. 准备输入:粘贴 INSERT 语句或上传 .sql / .txt 文件(可多选),反解出其中数据并转为 JSON。
  3. 填入内容:把内容粘贴进输入框,或把文件拖入页面;也可以点击「示例」先填入样例数据试一下。
  4. 设置选项并处理:按需调整页面上的选项,然后点击处理 / 转换 / 生成按钮。
  5. 获取结果:处理完全在浏览器本地完成,结果可直接复制或下载,文件不会上传到任何服务器。
常见问题
为什么提示未识别到 INSERT 语句?
解析要求语句明确列出列名,即 INSERT INTO t (a, b) VALUES (...) 这种形式,并且以分号结尾。省略列名的写法因为无法得知字段名,暂不支持。
能解析 SELECT 的查询结果吗?
不能。工具只识别 INSERT 语句。如果你有查询结果,建议先导出成 CSV,再用「CSV转JSON」处理。
日期时间会被转换吗?
日期会保持原始字符串形式,不做自动转换,以免时区和格式歧义导致数据失真。

返回崽崽工具箱首页

SQL to JSON

Reverse-engineer JSON data from INSERT statements.

sqlreverse
About SQL to JSON

Belongs to “JSON Tools”: Format, transform and convert JSON to and from various data formats.

  • Reverse-engineers structured data from INSERT INTO table (cols…) VALUES (vals…);.
  • Supports both single and batch inserts (one statement with multiple VALUES).
  • Correctly handles parentheses, commas and escaped quotes inside values — no wrong splits.
  • NULL becomes JSON null; bare numbers become numeric.
  • Backtick, double-quote and bracket identifier quoting styles are all recognized.

Free, no sign-up; everything runs locally in your browser and files are never uploaded.

Keywords: SQL to JSON, JSON Tools, sql, reverse, online tool, free

How to use SQL to JSON
  1. Open the tool:Open the “SQL to JSON” page — no sign-up and nothing to install.
  2. Prepare the input:Paste INSERT statements or upload .sql / .txt files (multi-select) to reverse-engineer the data inside into JSON.
  3. Provide the input:Paste your content into the input box or drop a file onto the page; you can also click “Sample” to try example data first.
  4. Adjust options and run:Adjust the options if needed, then click the process / convert / generate button.
  5. Get the result:Everything runs locally in your browser; copy or download the result — your files are never uploaded.
FAQ
Why "no INSERT statement recognized"?
Parsing requires explicit column names, i.e. INSERT INTO t (a, b) VALUES (...), ending with a semicolon. Column-less syntax is unsupported because field names are unknown.
Can it parse SELECT result sets?
No — it only recognizes INSERT statements. For query results, export to CSV first and use "CSV to JSON".
Are date/time values converted?
Dates stay as raw strings with no auto-conversion, to avoid timezone/format ambiguity and data loss.

Back to Zaizai Tools home