Render JSONL Through a Template
Structured records in, whatever text you need out. Write a template with {{field}} placeholders and every record becomes one rendering of it: a prompt per row, an INSERT per row, a Markdown list, an HTML block, a CSV line. It is the escape hatch for the export format nobody built a converter for.
Render
Templates worth stealing
A prompt per record — Summarise this in one sentence:\n\n{{text}}, joined with a
blank line, gives you a file you can paste into a playground or feed to a script.
SQL — INSERT INTO t (id, name) VALUES ({{id}}, '{{name}}'); with CSV escaping is a
quick load script, though JSONL to SQL does it properly with type inference.
Markdown — - **{{title}}** — {{body}} for a release note or a ticket.
A JSON reshape — {"q": "{{prompt}}", "a": "{{completion}}"} with JSON escaping,
which turns any record shape into any other one line at a time.
{{@index}} numbers the records from 1, {{@line}} gives the source line number so errors
can be traced back, and {{@json}} inserts the whole record re-serialised — useful for embedding a
record inside a larger structure.
Escaping is the part that bites
Raw substitution is correct for prose and wrong for anything with syntax. A value containing a double quote breaks
the JSON you are generating; a value containing < breaks the HTML; a value containing a comma
breaks the CSV. Pick the escaping that matches what you are building and the values are made safe for that
context — JSON escaping backslash-escapes quotes and control characters, HTML escaping converts the five entity
characters, CSV escaping quotes and doubles internal quotes when needed.
Missing values default to rendering blank, which keeps the output well-formed. Leave the
placeholder is the debugging setting — a literal {{price}} in the output is impossible to miss.
Stop with an error is the setting for a pipeline where a missing field means the input is wrong; it names
the offending line.
Privacy
Nothing is uploaded. The whole thing runs in this tab, in your own browser. That matters here more than on most tool sites — training data is usually the most sensitive file a team owns.
Frequently asked questions
Can I loop over an array inside a record?
No. Index into it — {{tags[0]}} — or explode the array into separate records first so each element gets its own rendering. A whole array inserted as {{tags}} is rendered as compact JSON.
How do I get one output file per record?
Render here, then split. For per-record files keyed on a field, Split by field gives you a zip.
Is this Jinja or Handlebars compatible?
Only in the sense that {{ }} looks the same. There are no filters, blocks, comments or conditionals — those need a real template language, and a real template language needs a sandbox. This substitutes paths and nothing else, which is why it can run entirely in your browser with no evaluation of arbitrary code.
Does whitespace in the template survive?
Exactly as written, including leading indentation and blank lines. The join separator is added between renderings, not inside them.