[{"data":1,"prerenderedAt":191},["ShallowReactive",2],{"tool-content-en-json-to-sql":3},{"id":4,"title":5,"body":6,"description":16,"extension":182,"locale":183,"meta":184,"navigation":185,"path":186,"seo":187,"stem":188,"toolId":189,"__hash__":190},"tools\u002Ftools\u002Fen\u002Fjson-to-sql.md","JSON to SQL Generator",{"type":7,"value":8,"toc":176},"minimark",[9,13,17,21,29,119,126,130,155,165,169,172],[10,11,5],"h2",{"id":12},"json-to-sql-generator",[14,15,16],"p",{},"Generate INSERT statements from JSON arrays locally in your browser.",[10,18,20],{"id":19},"input-format","Input format",[14,22,23,24,28],{},"Paste a JSON array whose items are objects, or use Upload file to choose a ",[25,26,27],"code",{},".json"," file from your device. For example:",[30,31,36],"pre",{"className":32,"code":33,"language":34,"meta":35,"style":35},"language-json shiki shiki-themes github-dark-high-contrast github-dark-high-contrast","[\n  {\"id\": 1, \"name\": \"Alice\", \"active\": true},\n  {\"id\": 2, \"name\": \"Bob\"}\n]\n","json","",[25,37,38,47,89,113],{"__ignoreMap":35},[39,40,43],"span",{"class":41,"line":42},"line",1,[39,44,46],{"class":45},"sy94i","[\n",[39,48,50,53,57,60,64,67,70,72,76,78,81,83,86],{"class":41,"line":49},2,[39,51,52],{"class":45},"  {",[39,54,56],{"class":55},"smsAo","\"id\"",[39,58,59],{"class":45},": ",[39,61,63],{"class":62},"sDo_k","1",[39,65,66],{"class":45},", ",[39,68,69],{"class":55},"\"name\"",[39,71,59],{"class":45},[39,73,75],{"class":74},"sg8On","\"Alice\"",[39,77,66],{"class":45},[39,79,80],{"class":55},"\"active\"",[39,82,59],{"class":45},[39,84,85],{"class":62},"true",[39,87,88],{"class":45},"},\n",[39,90,92,94,96,98,101,103,105,107,110],{"class":41,"line":91},3,[39,93,52],{"class":45},[39,95,56],{"class":55},[39,97,59],{"class":45},[39,99,100],{"class":62},"2",[39,102,66],{"class":45},[39,104,69],{"class":55},[39,106,59],{"class":45},[39,108,109],{"class":74},"\"Bob\"",[39,111,112],{"class":45},"}\n",[39,114,116],{"class":41,"line":115},4,[39,117,118],{"class":45},"]\n",[14,120,121,122,125],{},"The generator combines fields in the order they first appear. If a later object does not have a field, its value is emitted as ",[25,123,124],{},"NULL",". Arrays and nested objects are serialized as JSON strings so they can be inserted into a text or JSON column.",[10,127,129],{"id":128},"sql-options","SQL options",[14,131,132,133,136,137,140,141,144,145,148,149,144,151,154],{},"Choose PostgreSQL, MySQL, or SQLite, then enter a table name such as ",[25,134,135],{},"users"," or ",[25,138,139],{},"public.users",". Identifiers are quoted for the selected dialect, and quotes inside identifiers are escaped safely. Strings use SQL single-quote escaping; MySQL also escapes backslashes. Booleans use ",[25,142,143],{},"TRUE","\u002F",[25,146,147],{},"FALSE"," for PostgreSQL and SQLite, and ",[25,150,63],{},[25,152,153],{},"0"," for MySQL.",[14,156,157,158,161,162,164],{},"The batch size controls how many rows go into each ",[25,159,160],{},"INSERT"," statement. Set it to ",[25,163,153],{}," to generate one statement for all rows, or use a positive number to split a large import into several statements.",[10,166,168],{"id":167},"privacy-and-limits","Privacy and limits",[14,170,171],{},"Parsing and conversion happen entirely in your browser. Nothing is uploaded or sent to a server. Input is limited to 1 MB.",[173,174,175],"style",{},"html pre.shiki code .sy94i, html code.shiki .sy94i{--shiki-default:#F0F3F6;--shiki-dark:#F0F3F6}html pre.shiki code .smsAo, html code.shiki .smsAo{--shiki-default:#72F088;--shiki-dark:#72F088}html pre.shiki code .sDo_k, html code.shiki .sDo_k{--shiki-default:#91CBFF;--shiki-dark:#91CBFF}html pre.shiki code .sg8On, html code.shiki .sg8On{--shiki-default:#ADDCFF;--shiki-dark:#ADDCFF}html .default .shiki span {color: var(--shiki-default);background: var(--shiki-default-bg);font-style: var(--shiki-default-font-style);font-weight: var(--shiki-default-font-weight);text-decoration: var(--shiki-default-text-decoration);}html .shiki span {color: var(--shiki-default);background: var(--shiki-default-bg);font-style: var(--shiki-default-font-style);font-weight: var(--shiki-default-font-weight);text-decoration: var(--shiki-default-text-decoration);}html .dark .shiki span {color: var(--shiki-dark);background: var(--shiki-dark-bg);font-style: var(--shiki-dark-font-style);font-weight: var(--shiki-dark-font-weight);text-decoration: var(--shiki-dark-text-decoration);}html.dark .shiki span {color: var(--shiki-dark);background: var(--shiki-dark-bg);font-style: var(--shiki-dark-font-style);font-weight: var(--shiki-dark-font-weight);text-decoration: var(--shiki-dark-text-decoration);}",{"title":35,"searchDepth":49,"depth":49,"links":177},[178,179,180,181],{"id":12,"depth":49,"text":5},{"id":19,"depth":49,"text":20},{"id":128,"depth":49,"text":129},{"id":167,"depth":49,"text":168},"md","en",{},true,"\u002Ftools\u002Fen\u002Fjson-to-sql",{"title":5,"description":16},"tools\u002Fen\u002Fjson-to-sql","json-to-sql","ZKwkgaf6dplgApCkfWxv7DGchmV6V75XNuQQSHYpS7Y",1792391418864]