Seeding a development database
Convert a small fixture file into inserts and paste them into your migration or console. Check the column names line up with the schema first.
Turn a JSON array into SQL INSERT statements in your browser, with quotes escaped correctly.
Maintained by Roshan.
Converts JSON array of objects into SQL in this tab. Configuration files routinely hold hostnames, keys and credentials, so nothing here is sent anywhere.
Find related browser-local tools for nearby tasks without starting another search.
Browse all developer and data toolsGetting a handful of records into a database is a task with no good tool. Writing the INSERT statements by hand is tedious and error-prone, setting up a proper import pipeline is disproportionate for fifty rows, and the obvious shortcut - pasting values into a template - is exactly how SQL injection bugs and broken imports happen. The specific hazard is the apostrophe. A single quote inside a value terminates the string literal, so a customer called O'Brien turns a valid statement into a syntax error, or worse into a statement that runs and does something unintended. Escaping is handled properly here by doubling embedded quotes, which is the standard-conformant approach that every major database accepts.
Convert a small fixture file into inserts and paste them into your migration or console. Check the column names line up with the schema first.
Take the JSON, generate the statements, and review them before running. Watch for date formats, which vary between databases.
By doubling them, which is the standard SQL escape. A name like O'Brien becomes 'O''Brien' and inserts correctly.
No. The statements assume the table exists. Only INSERT statements are produced.
They become NULL. Writing fewer values would shift the remaining data into the wrong columns, which is far worse than an explicit null.
They are written as JSON text in the value, which suits a JSON column and needs handling otherwise.
Review it first. It is generated from your data and intended to be read before being executed against anything real.
Convert JSON objects to UTF-8 CSV in your browser. Union columns, quote values, and protect formula-like strings.
Convert CSV to a JSON array locally. Parse quoted commas, embedded newlines, BOM files, duplicate headers, sparse rows, and optional safe value types.
Turn a JSON array into a clean HTML table in your browser, with markup in the data escaped safely.