Go to Sign up
Note: Your files never leave your device. We don't upload, transfer, or store your data.
| Syntax | Description |
|---|---|
| {h1} {h2} ... | 1st, 2nd ... field of heading. Also {hA} {hB} ... |
| {$1} {$2} ... | 1st, 2nd ... field of current row. Also {$A} {$B} ... |
| {$1.trim()} | Support JS String methods |
| {F,} {F;} | Join all fields with delimiter after F |
| {NR} {NR+100} | Row number (1-based), supports arithmetic |
| {ENR} | Total / end number of rows |
| {x new Date()} | Execute JavaScript expression |
| {...\}} | Escape braces to output literal { ... } |
JSON (JavaScript Object Notation) is a lightweight, text-based data-interchange format defined by RFC 8259. It represents structured data as arrays and key-value objects. REST APIs, configuration files, databases, and data pipelines use JSON as their primary exchange format.
Example JSON array:
[
{"id": 1, "name": "Alice", "email": "[email protected]"},
{"id": 2, "name": "Bob", "email": "[email protected]"}
]
A custom template is a text pattern containing placeholders. The tool replaces each placeholder with data from your JSON and outputs the result. This approach lets you convert the same JSON dataset into any text format — SQL statements, CSV rows, HTML snippets, code files, shell commands, or configuration blocks — without writing scripts.
| Scenario | Template Output |
|---|---|
| Database migration | Generate INSERT INTO or UPDATE SQL statements from JSON records |
| Batch file operations | Create rename commands (RENAME old.txt new.txt) or file-creation scripts |
| Code generation | Produce PHP arrays, C arrays, or configuration files from structured data |
| Data formatting | Convert JSON to CSV with semicolons, LDIF, URL query strings |
| Web development | Generate HTML <select><option> tags, JIRA tables |
| DevOps automation | Build shell scripts or config files from infrastructure-as-code JSON |
Without this tool, each format conversion requires a custom script. This tool replaces all of them with a single template definition.
File Upload: Drag and drop or select a .json file.
Code Editor: Paste or type JSON directly. Real-time validation shows "Valid JSON" or "Invalid JSON" status.
Pre-configured templates organized by category:
| Category | Templates |
|---|---|
| SQL / Database | UPDATE statements, INSERT statements |
| Quoting | Double-quote cells, single-quote cells, double-quote columns |
| Rename / File | Batch rename by replace(), rename $1 to $2, create empty files, create files with content |
| Programming | PHP arrays, C arrays |
| Data Format | CSV with semicolons, columns-to-rows transpose |
| Markup / Web | HTML <select> option tags, JIRA table markup |
| Structured | JSON for 2 fields, LDIF for 3 fields, URL query strings |
| Syntax | Description |
|---|---|
{$1} {$2} ... | 1st, 2nd, ... field of the current row. Also {$A} {$B} ... |
{h1} {h2} ... | 1st, 2nd, ... field of the header (column names). Also {hA} {hB} ... |
{$1.trim()} | Apply JavaScript String methods to a field |
{F,} {F;} | Join all fields with the delimiter after F (comma, semicolon, etc.) |
{NR} {NR+100} | Row number (1-based). Supports arithmetic expressions |
{ENR} | Total number of rows (end number) |
{x new Date()} | Execute an arbitrary JavaScript expression |
{...} with escape | Escape braces to output literal { and } characters |
Header Template: Applied once before all rows (e.g., INSERT INTO table VALUES or a file header).
Row Template: Applied to every JSON object (the main conversion logic).
Footer Template: Applied once after all rows (e.g., closing brackets, COMMIT;).
All processing runs entirely in your browser. No data is uploaded to any server. The tool works offline after the initial page load.
Upload a file: Click "Choose File" and select a .json file, or drag it into the upload area.
Paste data: Click "Enter Data" to switch to the code editor. Paste your JSON array. The editor validates syntax in real time.
Option A — Use a Built-in Template:
Open the "Built-in Template" dropdown and select a template. The Row, Header, and Footer fields populate automatically.
Option B — Write a Custom Template:
Choose "Make your Magic" from the dropdown, then write your own:
Row Template (required): Define the output pattern for each row using {$1}, {$2}, etc.
Header Template (optional): Output text before all rows.
Footer Template (optional): Output text after all rows.
Click Convert. The output appears in the "Output Data" panel.
Click Copy to Clipboard to paste the result.
Premium users can click Download File to save the output.
JSON Input:
[
{"id": 1, "name": "Alice", "role": "Engineer"},
{"id": 2, "name": "Bob", "role": "Designer"}
]
Row Template:
INSERT INTO employees (id, name, role) VALUES ({$1}, '{$2}', '{$3}');Output:
INSERT INTO employees (id, name, role) VALUES (1, 'Alice', 'Engineer');
INSERT INTO employees (id, name, role) VALUES (2, 'Bob', 'Designer');
Row Template:
<option value="{$1}">{$2}</option>Output:
<option value="1">Alice</option>
<option value="2">Bob</option>
Row Template:
ren "{$1}.txt" "{$2}.txt"Output:
ren "1.txt" "Alice.txt"
ren "2.txt" "Bob.txt"
Select "CSV with Semi-colons" from the dropdown. The tool generates:
1;Alice;Engineer2;Bob;DesignerRow Template:
{NR}. {$2} — {$3}Output:
1. Alice — Engineer
2. Bob — Designer
JSON arrays of objects: [{"key": "value"}, ...] — most common
JSON arrays of arrays: [["val1", "val2"], ...]
Nested objects: Flattened to dot-notation keys automatically
No. All conversion happens locally in your browser. Your data never leaves your device.
{$1} mean? {$1} is a placeholder that gets replaced with the value of the first field in each JSON object. {$2} is the second field, and so on. You can also use {$A}, {$B}, etc.
Yes. The syntax {x expression} evaluates any JavaScript expression. For example, {x new Date().toISOString()} inserts the current timestamp.
Header outputs once before all rows.
Row outputs once per JSON object (repeated for each row).
Footer outputs once after all rows.
SQL (INSERT, UPDATE), CSV, HTML select options, JIRA tables, PHP arrays, C arrays, LDIF, URL query strings, batch rename commands, and file creation scripts. Select any from the dropdown to auto-populate the template fields.
Yes. Select "SQL: Insert example" or "SQL: Update example" from the built-in template dropdown, or write your own SQL template using the syntax INSERT INTO table (col1, col2) VALUES ('{$1}', '{$2}');.
The tool processes data entirely in your browser. Files up to 10 MB typically convert without issues on modern hardware.
Yes. The tool is responsive and works on smartphones and tablets.