[{"data":1,"prerenderedAt":1234},["ShallowReactive",2],{"blog-post-en-how-to-create-json-file":3,"surround-\u002Fen\u002Fblog\u002Fhow-to-create-json-file":1227},{"id":4,"title":5,"author":6,"body":7,"category":1205,"date":1206,"description":1207,"draft":1208,"extension":1209,"h1":14,"image":1210,"lastmod":1206,"locales":1211,"meta":1213,"navigation":1214,"path":1215,"promo":1216,"seo":1220,"stem":1221,"tags":1222,"__hash__":1226},"blog\u002Fen\u002Fblog\u002Fhow-to-create-json-file.md","How to Create a JSON File: Step-by-Step Guide","JSON Toolbox Team",{"type":8,"value":9,"toc":1169},"minimark",[10,15,24,31,34,39,42,48,58,76,79,119,134,138,144,149,154,205,221,225,230,258,263,267,275,291,295,298,344,358,362,365,371,378,384,388,391,538,561,565,709,717,721,724,730,741,747,753,774,782,786,789,810,813,817,820,824,831,849,853,861,867,871,874,880,883,887,892,895,904,910,925,948,962,965,972,976,980,999,1003,1006,1013,1024,1028,1034,1038,1057,1061,1071,1081,1097,1101,1109,1113,1160,1163],[11,12,14],"h1",{"id":13},"how-to-create-a-json-file-step-by-step-guide-for-beginners","How to Create a JSON File: Step-by-Step Guide for Beginners",[16,17,18,19,23],"p",{},"A JSON file is just a text file with the ",[20,21,22],"code",{},".json"," extension. You do not need special software, a paid tool, or an account — Notepad, TextEdit, and VS Code can all create one.",[16,25,26,27,30],{},"What trips people up is rarely the writing. It is the saving: Windows silently appending ",[20,28,29],{},".txt",", macOS TextEdit saving rich text instead of plain text, and a missing comma that makes the file unreadable to every JSON parser.",[16,32,33],{},"This guide covers what a JSON file is, how to create one on each operating system, the syntax rules that decide whether your file is valid, how to validate it, and how to generate JSON files from code.",[35,36,38],"h2",{"id":37},"what-is-a-json-file","What is a JSON file?",[16,40,41],{},"JSON (JavaScript Object Notation) is a plain-text data format built from two structures — objects and arrays — and six value types: string, number, boolean, null, object, and array.",[16,43,44,45,47],{},"A JSON file is a text file that contains JSON and uses the ",[20,46,22],{}," extension:",[49,50,56],"pre",{"className":51,"code":53,"language":54,"meta":55},[52],"language-json","{\n  \"name\": \"Ada Lovelace\",\n  \"role\": \"engineer\",\n  \"active\": true,\n  \"projects\": [\"analytical-engine\", \"bernoulli-numbers\"]\n}\n","json","",[20,57,53],{"__ignoreMap":55},[16,59,60,61,68,69,72,73,75],{},"Per ",[62,63,67],"a",{"href":64,"rel":65},"https:\u002F\u002Fwww.rfc-editor.org\u002Frfc\u002Frfc8259",[66],"nofollow","RFC 8259",", the registered media type is ",[20,70,71],{},"application\u002Fjson"," and the file extension is ",[20,74,22],{},". Because it is plain text, you can read and edit it anywhere — and any programming language can parse it.",[16,77,78],{},"JSON files are used for:",[80,81,82,101,107,113],"ul",{},[83,84,85,89,90,93,94,93,97,100],"li",{},[86,87,88],"strong",{},"Configuration:"," ",[20,91,92],{},"package.json",", ",[20,95,96],{},"tsconfig.json",[20,98,99],{},"manifest.json",".",[83,102,103,106],{},[86,104,105],{},"Data exchange:"," API request and response bodies.",[83,108,109,112],{},[86,110,111],{},"Saved data:"," exports, fixtures, and test datasets.",[83,114,115,118],{},[86,116,117],{},"Logs:"," structured one-line records.",[16,120,121,122,125,126,129,130,100],{},"A JSON file has one root value. It is either an object (",[20,123,124],{},"{ }",") or an array (",[20,127,128],{},"[ ]",") in practice, and everything else nests inside it. If you are new to the format itself, start with ",[62,131,133],{"href":132},"\u002Fblog\u002Fwhat-is-json","What Is JSON? Structure, Syntax, and Common Mistakes",[35,135,137],{"id":136},"how-to-create-a-json-file-with-a-text-editor","How to create a JSON file with a text editor",[16,139,140,141,143],{},"Every operating system follows the same three steps: write the JSON, save the file with a ",[20,142,22],{}," extension as UTF-8, then validate it. The default editors differ, and each has one trap.",[145,146,148],"h3",{"id":147},"windows-notepad-or-vs-code","Windows: Notepad or VS Code",[16,150,151],{},[86,152,153],{},"Notepad:",[155,156,157,160,166,183,189],"ol",{},[83,158,159],{},"Open Notepad and paste or type your JSON.",[83,161,162,163,100],{},"Choose ",[86,164,165],{},"File → Save As",[83,167,168,169,172,173,176,177,179,180,100],{},"Set ",[86,170,171],{},"Save as type"," to ",[86,174,175],{},"All Files (*.*)"," — this is the step people skip. If it stays on \"Text Documents (*.txt)\", Notepad appends ",[20,178,29],{}," and you get ",[20,181,182],{},"data.json.txt",[83,184,185,186,100],{},"Enter the full file name including the extension: ",[20,187,188],{},"data.json",[83,190,168,191,172,194,197,198,201,202,100],{},[86,192,193],{},"Encoding",[86,195,196],{},"UTF-8",", then save. Recent versions of Notepad default to UTF-8, but check the dropdown — it is the difference between ",[20,199,200],{},"café"," and ",[20,203,204],{},"cafÃ©",[16,206,207,210,211,214,215,217,218,100],{},[86,208,209],{},"VS Code"," is easier: create a new file, select ",[86,212,213],{},"JSON"," as the language mode, paste the content, and save as ",[20,216,188],{},". VS Code validates as you type and can format the document with ",[86,219,220],{},"Format Document",[145,222,224],{"id":223},"macos-textedit-or-vs-code","macOS: TextEdit or VS Code",[16,226,227],{},[86,228,229],{},"TextEdit:",[155,231,232,243,246,255],{},[83,233,234,235,238,239,242],{},"Open TextEdit and choose ",[86,236,237],{},"Format → Make Plain Text"," (",[86,240,241],{},"Shift + Cmd + T",") before typing. TextEdit defaults to rich text, and saving rich text produces RTF, not JSON.",[83,244,245],{},"Paste or type your JSON.",[83,247,248,249,251,252,254],{},"In the save dialog, type the full name with the extension — ",[20,250,188],{}," — and make sure the option to append ",[20,253,29],{}," when no extension is given is not active.",[83,256,257],{},"Save.",[16,259,260,262],{},[86,261,209],{}," avoids both problems and is the better default on macOS too.",[145,264,266],{"id":265},"linux-nano-gedit-or-vs-code","Linux: nano, gedit, or VS Code",[49,268,273],{"className":269,"code":271,"language":272,"meta":55},[270],"language-bash","nano data.json\n","bash",[20,274,271],{"__ignoreMap":55},[16,276,277,278,201,281,284,285,288,289,100],{},"Type or paste the JSON, then press ",[86,279,280],{},"Ctrl + O",[86,282,283],{},"Enter"," to save, ",[86,286,287],{},"Ctrl + X"," to exit. Desktop editors such as gedit and VS Code work the same way — just make sure the file name ends in ",[20,290,22],{},[145,292,294],{"id":293},"the-saving-checklist","The saving checklist",[16,296,297],{},"Whatever editor you use, confirm three things before you trust the file:",[299,300,301,314],"table",{},[302,303,304],"thead",{},[305,306,307,311],"tr",{},[308,309,310],"th",{},"Check",[308,312,313],{},"Why it matters",[315,316,317,328,336],"tbody",{},[305,318,319,325],{},[320,321,322,323],"td",{},"The name ends in ",[20,324,22],{},[320,326,327],{},"The extension tells editors, servers, and tools how to treat the file.",[305,329,330,333],{},[320,331,332],{},"It is plain text, not rich text",[320,334,335],{},"Word, Google Docs, and TextEdit's rich-text mode add formatting that is not JSON.",[305,337,338,341],{},[320,339,340],{},"The encoding is UTF-8",[320,342,343],{},"Non-UTF-8 files produce garbled characters; a UTF-8 BOM makes some parsers throw.",[16,345,346,347,349,350,353,354,357],{},"If your file might actually be ",[20,348,182],{},", check from a terminal (",[20,351,352],{},"dir"," on Windows, ",[20,355,356],{},"ls"," on macOS and Linux) rather than trusting File Explorer or Finder — both hide known extensions by default.",[35,359,361],{"id":360},"step-by-step-create-your-first-json-file","Step-by-step: create your first JSON file",[16,363,364],{},"Here is a complete first file. It is an object with four keys and one nested array:",[49,366,369],{"className":367,"code":368,"language":54,"meta":55},[52],"{\n  \"project\": \"json-toolbox\",\n  \"version\": \"1.0.0\",\n  \"author\": \"Ada\",\n  \"tags\": [\"json\", \"config\"]\n}\n",[20,370,368],{"__ignoreMap":55},[16,372,373,374,377],{},"Save it as ",[20,375,376],{},"project.json",". An array of objects is equally valid as the root value:",[49,379,382],{"className":380,"code":381,"language":54,"meta":55},[52],"[\n  { \"id\": 1, \"name\": \"Ada\", \"active\": true },\n  { \"id\": 2, \"name\": \"Lin\", \"active\": false }\n]\n",[20,383,381],{"__ignoreMap":55},[145,385,387],{"id":386},"syntax-rules-that-decide-whether-the-file-works","Syntax rules that decide whether the file works",[16,389,390],{},"JSON is strict. These are the rules that cause most first-file failures:",[299,392,393,406],{},[302,394,395],{},[305,396,397,400,403],{},[308,398,399],{},"Rule",[308,401,402],{},"Valid",[308,404,405],{},"Invalid",[315,407,408,423,438,453,467,480,501,525],{},[305,409,410,413,418],{},[320,411,412],{},"Strings use double quotes",[320,414,415],{},[20,416,417],{},"\"name\"",[320,419,420],{},[20,421,422],{},"'name'",[305,424,425,428,433],{},[320,426,427],{},"Keys are quoted",[320,429,430],{},[20,431,432],{},"{ \"name\": \"Ada\" }",[320,434,435],{},[20,436,437],{},"{ name: \"Ada\" }",[305,439,440,443,448],{},[320,441,442],{},"No trailing comma",[320,444,445],{},[20,446,447],{},"{ \"a\": 1, \"b\": 2 }",[320,449,450],{},[20,451,452],{},"{ \"a\": 1, \"b\": 2, }",[305,454,455,458,462],{},[320,456,457],{},"Members separated by commas",[320,459,460],{},[20,461,447],{},[320,463,464],{},[20,465,466],{},"{ \"a\": 1 \"b\": 2 }",[305,468,469,472,475],{},[320,470,471],{},"No comments",[320,473,474],{},"—",[320,476,477],{},[20,478,479],{},"{ \"a\": 1 } \u002F\u002F note",[305,481,482,485,493],{},[320,483,484],{},"Numbers have no leading zeros or hex",[320,486,487,93,490],{},[20,488,489],{},"42",[20,491,492],{},"3.14",[320,494,495,93,498],{},[20,496,497],{},"042",[20,499,500],{},"0x1F",[305,502,503,516,521],{},[320,504,505,506,93,509,512,513],{},"No ",[20,507,508],{},"undefined",[20,510,511],{},"NaN",", or ",[20,514,515],{},"Infinity",[320,517,518],{},[20,519,520],{},"null",[320,522,523],{},[20,524,511],{},[305,526,527,530,535],{},[320,528,529],{},"Escape newlines inside strings",[320,531,532],{},[20,533,534],{},"\"line1\\nline2\"",[320,536,537],{},"a literal line break inside a string",[16,539,540,541,544,545,201,548,551,552,556,557,560],{},"Two of these deserve a note. ",[86,542,543],{},"Comments are not part of JSON"," — ",[20,546,547],{},"\u002F\u002F",[20,549,550],{},"\u002F* *\u002F"," make the file invalid, and only tools that explicitly accept JSONC will read it; see ",[62,553,555],{"href":554},"\u002Fblog\u002Fjson-comments","Comments in JSON",". And ",[86,558,559],{},"trailing commas are invalid"," even though they are fine in JavaScript object literals, which is why copied-and-pasted config so often fails to parse.",[35,562,564],{"id":563},"common-mistakes-and-how-to-fix-them","Common mistakes and how to fix them",[299,566,567,580],{},[302,568,569],{},[305,570,571,574,577],{},[308,572,573],{},"Symptom",[308,575,576],{},"Likely cause",[308,578,579],{},"Fix",[315,581,582,601,612,627,640,660,682,696],{},[305,583,584,589,592],{},[320,585,586,587],{},"File is named ",[20,588,182],{},[320,590,591],{},"Save dialog type was \"Text Documents\", or the extension is hidden",[320,593,594,595,598,599],{},"Re-save with ",[86,596,597],{},"Save as type: All Files"," and type ",[20,600,188],{},[305,602,603,606,609],{},[320,604,605],{},"Parser reports an error at line 1, column 1",[320,607,608],{},"UTF-8 BOM at the start of the file",[320,610,611],{},"Save as UTF-8 without BOM",[305,613,614,621,624],{},[320,615,616,618,619],{},[20,617,200],{}," becomes ",[20,620,204],{},[320,622,623],{},"File saved as ANSI \u002F non-UTF-8",[320,625,626],{},"Re-save with UTF-8 encoding",[305,628,629,632,635],{},[320,630,631],{},"Editor shows formatting or fonts",[320,633,634],{},"File was saved as rich text (RTF\u002FDOCX)",[320,636,637,638],{},"Use a plain-text editor and save as ",[20,639,22],{},[305,641,642,647,657],{},[320,643,644],{},[20,645,646],{},"SyntaxError: Unexpected token }",[320,648,649,650,653,654],{},"Trailing comma before ",[20,651,652],{},"}"," or ",[20,655,656],{},"]",[320,658,659],{},"Remove the last comma in the object or array",[305,661,662,667,675],{},[320,663,664],{},[20,665,666],{},"SyntaxError: Unexpected token \u002F",[320,668,669,670,653,672,674],{},"A ",[20,671,547],{},[20,673,550],{}," comment",[320,676,677,678],{},"Remove comments, or convert with ",[62,679,681],{"href":680},"\u002Ftools\u002Fconvert\u002Fjsonc-to-json","JSONC to JSON",[305,683,684,690,693],{},[320,685,686,689],{},[20,687,688],{},"Unexpected token '"," in JSON`",[320,691,692],{},"Single-quoted strings",[320,694,695],{},"Replace with double quotes",[305,697,698,701,704],{},[320,699,700],{},"Error mentions an unexpected string or colon",[320,702,703],{},"Unquoted key",[320,705,706,707],{},"Quote the key: ",[20,708,432],{},[16,710,711,712,716],{},"When several of these are present at once, fixing them by hand is slow. Paste the file into ",[62,713,715],{"href":714},"\u002Ftools\u002Fformat\u002Fjson-repair","JSON Repair",", which fixes trailing commas, single quotes, unquoted keys, missing brackets, comments, and Python-style constants, then copy or download the valid result.",[35,718,720],{"id":719},"how-to-validate-a-json-file","How to validate a JSON file",[16,722,723],{},"\"Valid\" has one meaning for a JSON file: a strict parser can read it without error. Four ways to check:",[16,725,726,729],{},[86,727,728],{},"1. Editor feedback."," VS Code underlines syntax errors as you type and shows the message on hover. This catches most problems before you save.",[16,731,732,735,736,740],{},[86,733,734],{},"2. In the browser."," Paste or open the file in the ",[62,737,739],{"href":738},"\u002Ftools\u002Fformat\u002Fjson-editor","JSON Editor",". It validates live, highlights syntax, and lets you format or minify the document before you copy or download it — no account and no upload, because it runs in your browser.",[16,742,743,746],{},[86,744,745],{},"3. Command line."," Both of these parse the file and print it, so a parse error means the file is invalid:",[49,748,751],{"className":749,"code":750,"language":272,"meta":55},[270],"jq . data.json\npython -m json.tool data.json\n",[20,752,750],{"__ignoreMap":55},[16,754,755,758,759,763,764,768,769,773],{},[86,756,757],{},"4. Schema validation."," Syntax is only the first layer. If the file has to match an expected structure — required fields, types, ranges — validate it against a JSON Schema. Generate a starting schema from a representative file with the ",[62,760,762],{"href":761},"\u002Ftools\u002Fconvert\u002Fjson-schema-generator","JSON Schema Generator",", then check data against it with the ",[62,765,767],{"href":766},"\u002Ftools\u002Fformat\u002Fjson-schema-validator","JSON Schema Validator",". See ",[62,770,772],{"href":771},"\u002Fblog\u002Fjson-validation-syntax-vs-schema","JSON Validation Explained"," for how the layers differ.",[16,775,776,777,781],{},"If a file fails to parse and you are not sure why, ",[62,778,780],{"href":779},"\u002Fblog\u002Fjson-parse-error-debug","JSON Parse Failed: 10 Common API Errors and How to Debug Them"," walks through the error messages one by one.",[35,783,785],{"id":784},"create-a-json-file-online","Create a JSON file online",[16,787,788],{},"If you would rather not deal with Save As dialogs, a browser-based editor does the same job and hands you a downloadable file:",[80,790,791,801],{},[83,792,793,797,798,800],{},[86,794,795],{},[62,796,739],{"href":738}," — paste or open JSON, edit it in a syntax-highlighted editor with live validation, format or minify it, then copy or download the ",[20,799,22],{}," file. This is the closest equivalent to \"create a JSON file online\" and works on any OS, including Chromebooks and tablets.",[83,802,803,809],{},[86,804,805],{},[62,806,808],{"href":807},"\u002Ftools\u002Fconvert\u002Fjson-array-generator","JSON Array Generator"," — if you need a file full of sample records rather than one hand-written object, set the number of items and the field names and download a pretty-printed array. Useful for test fixtures and demos.",[16,811,812],{},"Both run entirely in your browser, so nothing you paste is sent to a server.",[35,814,816],{"id":815},"generate-json-files-from-code","Generate JSON files from code",[16,818,819],{},"When data already lives in your program, do not hand-write the file — let the code write it.",[145,821,823],{"id":822},"python","Python",[49,825,829],{"className":826,"code":828,"language":822,"meta":55},[827],"language-python","import json\n\ndata = {\n    \"project\": \"json-toolbox\",\n    \"version\": \"1.0.0\",\n    \"author\": \"Ada\",\n    \"tags\": [\"json\", \"config\"],\n}\n\nwith open(\"project.json\", \"w\", encoding=\"utf-8\") as f:\n    json.dump(data, f, indent=2, ensure_ascii=False)\n    f.write(\"\\n\")\n",[20,830,828],{"__ignoreMap":55},[16,832,833,836,837,840,841,844,845,848],{},[20,834,835],{},"indent=2"," produces readable output; drop it for a compact file. ",[20,838,839],{},"ensure_ascii=False"," keeps non-ASCII characters readable instead of escaping them, which is why opening the file with ",[20,842,843],{},"encoding=\"utf-8\""," matters. Use ",[20,846,847],{},"json.dumps(data)"," when you want the JSON as a string rather than a file.",[145,850,852],{"id":851},"nodejs","Node.js",[49,854,859],{"className":855,"code":857,"language":858,"meta":55},[856],"language-js","import { writeFile } from 'node:fs\u002Fpromises'\n\nconst data = {\n  project: 'json-toolbox',\n  version: '1.0.0',\n  author: 'Ada',\n  tags: ['json', 'config'],\n}\n\nawait writeFile('project.json', JSON.stringify(data, null, 2) + '\\n', 'utf8')\n","js",[20,860,857],{"__ignoreMap":55},[16,862,863,866],{},[20,864,865],{},"JSON.stringify(value, null, 2)"," adds two-space indentation; omit the last two arguments for minified output.",[145,868,870],{"id":869},"in-the-browser","In the browser",[16,872,873],{},"To let a user download a file your page generated:",[49,875,878],{"className":876,"code":877,"language":858,"meta":55},[856],"const text = JSON.stringify(data, null, 2)\nconst blob = new Blob([text], { type: 'application\u002Fjson' })\nconst url = URL.createObjectURL(blob)\n\nconst a = document.createElement('a')\na.href = url\na.download = 'project.json'\na.click()\n\nURL.revokeObjectURL(url)\n",[20,879,877],{"__ignoreMap":55},[16,881,882],{},"This never touches a server — the file is assembled in the page and downloaded from memory.",[35,884,886],{"id":885},"what-is-a-manifestjson-file","What is a manifest.json file?",[16,888,669,889,891],{},[20,890,99],{}," is not a different format. It is an ordinary JSON file whose contents are defined by whichever platform reads it — so \"how do I create one\" really means \"what fields does this platform expect\".",[16,893,894],{},"Three common cases:",[16,896,897,900,901,100],{},[86,898,899],{},"Progressive Web App (web app manifest)"," — describes how your app appears when installed: name, icons, start URL, and display mode. Referenced from HTML with ",[20,902,903],{},"\u003Clink rel=\"manifest\" href=\"\u002Fmanifest.json\">",[49,905,908],{"className":906,"code":907,"language":54,"meta":55},[52],"{\n  \"name\": \"JSON Toolbox\",\n  \"short_name\": \"JSON Toolbox\",\n  \"start_url\": \"\u002F\",\n  \"display\": \"standalone\",\n  \"background_color\": \"#ffffff\",\n  \"theme_color\": \"#0284c7\",\n  \"icons\": [\n    {\n      \"src\": \"\u002Ficons\u002Ficon-192.png\",\n      \"sizes\": \"192x192\",\n      \"type\": \"image\u002Fpng\"\n    },\n    {\n      \"src\": \"\u002Ficons\u002Ficon-512.png\",\n      \"sizes\": \"512x512\",\n      \"type\": \"image\u002Fpng\"\n    }\n  ]\n}\n",[20,909,907],{"__ignoreMap":55},[16,911,912,913,918,919,924],{},"The specification is the ",[62,914,917],{"href":915,"rel":916},"https:\u002F\u002Fwww.w3.org\u002FTR\u002Fappmanifest\u002F",[66],"W3C Web Application Manifest",", and ",[62,920,923],{"href":921,"rel":922},"https:\u002F\u002Fweb.dev\u002Farticles\u002Fadd-manifest",[66],"web.dev"," has a practical walkthrough.",[16,926,927,930,931,933,934,939,940,947],{},[86,928,929],{},"Chrome extension"," — every extension has a ",[20,932,99],{}," declaring its name, version, and permissions. The current version is ",[62,935,938],{"href":936,"rel":937},"https:\u002F\u002Fdeveloper.chrome.com\u002Fdocs\u002Fextensions\u002Fdevelop\u002Fmigrate\u002Fwhat-is-mv3",[66],"Manifest V3","; see MDN's ",[62,941,944,946],{"href":942,"rel":943},"https:\u002F\u002Fdeveloper.mozilla.org\u002Fen-US\u002Fdocs\u002FMozilla\u002FAdd-ons\u002FWebExtensions\u002Fmanifest.json",[66],[20,945,99],{}," reference"," for the key list.",[16,949,950,953,954,957,958,961],{},[86,951,952],{},"Framework manifests"," — frameworks generate or consume their own. Next.js, for example, supports ",[20,955,956],{},"app\u002Fmanifest.json"," (or ",[20,959,960],{},"manifest.ts",") and serves the file for you.",[16,963,964],{},"The syntax rules in this guide apply to all of them: valid JSON first, correct fields second. Many editors accept comments in these files because they read them as JSONC — but the platform that consumes the file may not, so check before shipping comments.",[16,966,967,968,100],{},"For step-by-step examples with the required fields for each spec — PWA web app manifests and Chrome extension Manifest V3 — see ",[62,969,971],{"href":970},"\u002Fblog\u002Fhow-to-create-manifest-json","How to Create a manifest.json File",[35,973,975],{"id":974},"faq","FAQ",[145,977,979],{"id":978},"can-i-create-a-json-file-in-notepad","Can I create a JSON file in Notepad?",[16,981,982,983,985,986,172,988,990,991,993,994,996,997,100],{},"Yes. Write the JSON, choose ",[86,984,165],{},", set ",[86,987,171],{},[86,989,175],{},", type the name as ",[20,992,188],{},", and pick ",[86,995,196],{}," as the encoding. Skipping \"All Files\" is what produces ",[20,998,182],{},[145,1000,1002],{"id":1001},"do-i-need-special-software-to-create-a-json-file","Do I need special software to create a JSON file?",[16,1004,1005],{},"No. Any plain-text editor works — Notepad, TextEdit, nano, VS Code. A code editor adds syntax highlighting and live validation, which is why it is recommended, but it is not required.",[145,1007,1009,1010,1012],{"id":1008},"how-do-i-make-a-json-file-on-a-mac","How do I make a ",[20,1011,22],{}," file on a Mac?",[16,1014,1015,1016,238,1018,1020,1021,1023],{},"Use TextEdit with ",[86,1017,237],{},[86,1019,241],{},") first, then save with the full name ",[20,1022,188],{},". Or use VS Code, which saves plain text with the extension you type and validates as you go.",[145,1025,1027],{"id":1026},"why-does-my-json-file-not-work-even-though-it-looks-correct","Why does my JSON file not work even though it looks correct?",[16,1029,1030,1031,1033],{},"Most often it is one of four things: the file is actually ",[20,1032,182],{},", it was saved as rich text or with a BOM, it contains a trailing comma, or it has comments. Validate the file — an error message with a line and column points straight at the problem.",[145,1035,1037],{"id":1036},"can-a-json-file-have-comments","Can a JSON file have comments?",[16,1039,1040,1041,201,1043,1045,1046,1049,1050,1052,1053,1056],{},"No. Standard JSON has no comment syntax, so ",[20,1042,547],{},[20,1044,550],{}," make the file invalid. Use a ",[20,1047,1048],{},"_comment"," key, keep documentation outside the file, or work in JSONC and strip comments before shipping. Full details in ",[62,1051,555],{"href":554},", and the ",[62,1054,1055],{"href":680},"JSONC to JSON Converter"," removes them for you.",[145,1058,1060],{"id":1059},"is-a-json-file-the-same-as-a-javascript-object","Is a JSON file the same as a JavaScript object?",[16,1062,1063,1064,1067,1068,100],{},"No. A JSON file is text; a JavaScript object literal is code. JavaScript allows unquoted keys, trailing commas, single quotes, and comments — none of which are valid JSON. That is why an object copied out of a ",[20,1065,1066],{},".js"," file often fails ",[20,1069,1070],{},"JSON.parse()",[145,1072,1074,1075,201,1077,1080],{"id":1073},"what-is-the-difference-between-json-and-webmanifest","What is the difference between ",[20,1076,22],{},[20,1078,1079],{},".webmanifest","?",[16,1082,1083,1084,1086,1087,1090,1091,1093,1094,1096],{},"Both contain JSON; only the convention differs. ",[20,1085,1079],{}," is the file extension recommended by the W3C for a web app manifest, served as ",[20,1088,1089],{},"application\u002Fmanifest+json",", while ",[20,1092,22],{}," is the general extension for any JSON document. Many projects still use ",[20,1095,99],{}," with no issue.",[145,1098,1100],{"id":1099},"how-large-can-a-json-file-be","How large can a JSON file be?",[16,1102,1103,1104,1108],{},"JSON itself sets no size limit. Practical limits come from the tool reading the file: editor memory, parser configuration, and server upload caps. For testing how your own tools behave, the ",[62,1105,1107],{"href":1106},"\u002Fblog\u002Ffree-realistic-json-test-data","free realistic JSON test datasets"," range from small demos to large files.",[35,1110,1112],{"id":1111},"whats-next","What's Next?",[80,1114,1115,1127,1135,1143,1152],{},[83,1116,1117,1120,1121,1123,1124,1126],{},[86,1118,1119],{},"Ready to write one?"," Open the ",[62,1122,739],{"href":738}," — paste, validate, format, and download a ",[20,1125,22],{}," file without installing anything.",[83,1128,1129,1132,1133,100],{},[86,1130,1131],{},"Need sample records?"," Generate an array with the ",[62,1134,808],{"href":807},[83,1136,1137,1140,1141,100],{},[86,1138,1139],{},"File already broken?"," Fix trailing commas, quotes, and comments with ",[62,1142,715],{"href":714},[83,1144,1145,1148,1149,100],{},[86,1146,1147],{},"Wondering about comments?"," Read ",[62,1150,1151],{"href":554},"Comments in JSON: Why They're Not Allowed and What to Use Instead",[83,1153,1154,1157,1158,100],{},[86,1155,1156],{},"Debugging a parse error?"," See ",[62,1159,780],{"href":779},[1161,1162],"hr",{},[16,1164,1165],{},[1166,1167,1168],"em",{},"All tools on JSON Toolbox run entirely in your browser. Your data never leaves your device.",{"title":55,"searchDepth":1170,"depth":1170,"links":1171},2,[1172,1173,1180,1183,1184,1185,1186,1191,1192,1204],{"id":37,"depth":1170,"text":38},{"id":136,"depth":1170,"text":137,"children":1174},[1175,1177,1178,1179],{"id":147,"depth":1176,"text":148},3,{"id":223,"depth":1176,"text":224},{"id":265,"depth":1176,"text":266},{"id":293,"depth":1176,"text":294},{"id":360,"depth":1170,"text":361,"children":1181},[1182],{"id":386,"depth":1176,"text":387},{"id":563,"depth":1170,"text":564},{"id":719,"depth":1170,"text":720},{"id":784,"depth":1170,"text":785},{"id":815,"depth":1170,"text":816,"children":1187},[1188,1189,1190],{"id":822,"depth":1176,"text":823},{"id":851,"depth":1176,"text":852},{"id":869,"depth":1176,"text":870},{"id":885,"depth":1170,"text":886},{"id":974,"depth":1170,"text":975,"children":1193},[1194,1195,1196,1198,1199,1200,1201,1203],{"id":978,"depth":1176,"text":979},{"id":1001,"depth":1176,"text":1002},{"id":1008,"depth":1176,"text":1197},"How do I make a .json file on a Mac?",{"id":1026,"depth":1176,"text":1027},{"id":1036,"depth":1176,"text":1037},{"id":1059,"depth":1176,"text":1060},{"id":1073,"depth":1176,"text":1202},"What is the difference between .json and .webmanifest?",{"id":1099,"depth":1176,"text":1100},{"id":1111,"depth":1170,"text":1112},"json_tools","2026-09-30T00:00:00.000Z","Create a JSON file on Windows, macOS, or Linux: write valid JSON, avoid the .json.txt trap, validate the result, and generate files from code.",false,"md","\u002Fblog\u002Fcover\u002Fen\u002Fhow-to-create-json-file-cover.svg",[1212],"en",{},true,"\u002Fen\u002Fblog\u002Fhow-to-create-json-file",{"slug":1217,"text":1218,"btn":1219},"json-editor","Want to write, format, and validate JSON without installing anything?","Open JSON Editor",{"title":5,"description":1207},"en\u002Fblog\u002Fhow-to-create-json-file",[213,1223,739,1224,1225],"Beginners","File Format","Tutorial","i2tDp54BDyFQSPRjbCkSB9YU3FA0Ko8wTFj8gRCufeE",[1228,1231],{"path":1229,"title":1230},"\u002Fen\u002Fblog\u002Fhow-to-create-manifest-json","How to Create a manifest.json File: PWA & Chrome Examples",{"path":1232,"title":1233},"\u002Fen\u002Fblog\u002Fjson-comments","Comments in JSON: Why Not Allowed & What to Use",1791273861868]