Convert each table data in a SQL file to a separate JSON file

Want to convert each table data in a SQL file to a separate JSON file at one time?

Try Data File Converter, a SQL converting tool for Windows, MacOS, and Linux, Convert tables in a SQL file to JSON files, Easy and Fast.

  • Can run in GUI mode, Step by Step, just a few mouse clicks.
  • Can run in Command line, for Scheduled Tasks and Streams.
  • Convert files locally and privately, avoid uploading large SQL file(s) to online services.

Download Withdata DataFileConverter Download DataFileConverter

Convert each table data in a SQL file to a separate JSON file

Select source SQL file -> Set target JSON file -> Convert SQL table to JSON

Click “Start a New Convert” at task dialog.

batch convert each table data in a SQL file to a separate JSON file - task window

then show the wizard.

Select From “File” “SQL” To “Files” “JSON”.

extract each table data in a SQL file to a separate JSON file - select type

1. Open a source SQL file, select tables to convert to JSON files.

bulk convert each table data in a SQL file to a separate JSON file - select SQL file

2. Config target JSON files.

bulk extract each table data in a SQL file to a separate JSON file - config JSON files

3. Summary.

List selected tables.

transform each table data in a SQL file to a separate JSON file - list tables

convert each table data in a SQL file to a separate JSON file - summary

4. Convert each SQL table to a separate JSON file.

convert each table data in a SQL file to a separate JSON file - convert

After converting, you can view output JSON files.

convert each table data in a SQL file to a separate JSON file - view JSON file

Convert each SQL table to a separate JSON file in command line

Save “SQL table to JSON” session, then you can:

Set scheduled tasks for converting each SQL table to a separate JSON file

You can schedule and automate this SQL table to JSON converting task by:

  1. Save session and create .bat (Windows) or .sh (Linux/macOS) file for “SQL table to JSON” conversion.
  2. Set scheduled task for “SQL table to JSON” conversion.

FAQ

What is Withdata DataFileConverter?
How long does it take to convert each SQL table to a separate JSON file?
Is it safe to convert each SQL table to a separate JSON file using DataFileConverter?
Can I convert each SQL table to a separate JSON file on Linux, Mac OS?
Can I convert each SQL table to a separate JSON file in command line?

More about Withdata DataFileConverter – Tables in SQL file to JSON converter

See Video: Convert each table data in a SQL file to a separate JSON file at one time

SQL → JSON reference

Type mapping

Value kindin SQLin JSON
IntINT1234 (number)
BigintBIGINT9007199254740993
DecimalDECIMAL(p,s)1234.56 (number)
FloatDOUBLE PRECISION1.234e10 (number)
TextVARCHAR(n)"text" (string)
Long textTEXT / CLOB"multi-line\ntext" (escaped newline inside a string)
DateDATE"2026-09-18" (string)
DatetimeTIMESTAMP"2026-09-18T14:30:00Z" (string)
BinaryBLOB / BYTEA"base64:..." (string)
BooleanBOOLEAN / SMALLINTtrue / false (boolean)
JSONJSON / TEXTnested object or array, kept as structure

Dialect differences

Both SQL and JSON are file formats, so what differs below is how each one chooses to represent a value.

Propertyin SQLin JSON
identifiersTwo competing conventions: single-quoted literals and diale...Double quotes; backslash escapes
datesDepends on the dialect: DATE literals, TO_DATE(), or plain ...No date type: dates arrive as strings and the reader must p...
binaryDialect-specific: X-quoted literal, 0x hex, or decode()Not supported natively - base64 inside a string
separatorStatement terminators (;)Braces and commas
encodingNo declarationUTF-8 by definition
typingTypes belong to the target database, and they differ betwee...string, number, boolean, null, object, array - no date type
shapeStatements; a dump usually means CREATE TABLE plus INSERT rowsNested objects and arrays
ceilingNo formal limit, but a single INSERT statement has to fit i...Whole document is usually parsed into memory

Data File Converter without the manual work

For batch jobs, large files and scheduling use the Data File Converter converter — an offline desktop app for Windows, Linux and macOS. Free trial.


Posted

in

by