JSON Editor
Edit JSON in a code editor in your browser — change values, add or remove fields, then format, sort or repair it and download the result as a .json file. No signup.
Result
Share on Social Media:
Edit JSON in this free JSON Editor, right in your browser: change values, add or remove fields, then tidy the result with the editor's own Format, Compact, Sort, Transform and Repair buttons — and download it as a json-editor.json file when it is valid. No signup, no install, and your JSON is never uploaded to a server. Note that this is a code editor, not a tree editor: if you want to explore JSON as a collapsible tree, use the JSON Viewer instead.
On this page
- How to Edit JSON Step by Step
- What a JSON Editor Does
- Editing in a Code Editor Versus Editing Raw Text
- Who Uses a JSON Editor
- Pro Tips for Editing JSON
- Common JSON Editing Mistakes to Avoid
- Related Tools You May Need Next
- Frequently Asked Questions
How to Edit JSON Step by Step
- Paste your JSON. Drop it in the "Enter or paste JSON" box, or type new JSON there from scratch. The editor starts empty — there is no sample to clear first.
- Or load it another way. Paste a link in the "Load from URL" box to fetch JSON from a public address, or click "Upload File" and choose a .json file from your device. If either of those fails, paste the JSON directly — it always works.
- Edit it in place. Click into the code and change a value, add a key, or delete a field. The editor highlights the JSON syntax and marks errors as you type — a red × in the gutter, a pale-yellow highlight on the problem line, and “parse error on line 1” in the status bar — so a missing bracket or comma shows up while you are still editing.
- Tidy it with the toolbar. The buttons above the editor do the heavy lifting: Format lays the JSON out with 2-space indentation, Compact squeezes it to one line, Sort orders it by a field you pick, Transform reshapes it with a query, and Repair attempts to fix broken JSON. Undo and Redo are there too.
- Click "Download JSON". The tool first checks that your JSON is valid. If it is, a file named json-editor.json downloads. If it is not valid, an error is shown and nothing downloads — fix the error and click again.
- Or copy it instead. Click "Copy to Clipboard" to copy the text exactly as it stands in the editor. There is no separate result screen on this page — the copy and the download both come straight from the editor.

What a JSON Editor Does
JSON is structured data made of keys, values, objects and arrays. Editing it in a plain text field is error-prone: one missing bracket or comma breaks the whole file, and a minified one-liner hides the structure completely. This editor gives you a code editor with syntax highlighting, live error marking, and a toolbar that formats, compacts, sorts, transforms and repairs — so you can change JSON accurately and be sure it is still valid before you use it.
| Feature | What it does | The limit to know |
|---|---|---|
| Paste or type JSON | Edit JSON directly in the code editor | The editor starts empty; there is no sample JSON |
| Load from URL | Fetches JSON from a public web address you paste in | Only works for addresses that serve JSON and allow cross-origin requests; most sites block it, so paste the JSON instead |
| Upload File | Reads a .json file from your device into the editor | Only files reported as application/json are accepted — if yours is rejected as "Invalid File", paste its contents instead |
| Code editor | Syntax highlighting, 2-space soft tabs, line wrapping, error markers as you type | It is a code editor, not a tree view — there is no way to switch it to a collapsible tree |
| Format button | Lays the JSON out with 2 spaces per level | Fixed at 2 spaces — there is no setting to change it |
| Compact button | Squeezes the JSON to a single line | Only for storing or sending; use Format when you need to read it |
| Sort button | Sorts the JSON by a field you pick, ascending or descending | Needs valid JSON first — it cannot sort broken JSON |
| Transform button | Filters, sorts or reshapes the JSON with a JMESPath query | Needs valid JSON first, and you need to know the JMESPath query you want |
| Repair button | Attempts to fix broken JSON text — in our test it removed a trailing comma and the JSON became valid | It only attempts a fix — if it cannot repair the JSON, nothing changes and you fix it by hand |
| Undo / Redo | Steps back or forward through your edits | — |
| Live validation | Marks errors as you type — a red × in the gutter and a pale-yellow highlight on the problem line — and checks again before downloading | Syntax only — it does not check your JSON against a schema |
| Copy to Clipboard | Copies the editor's text exactly as it stands | — |
| Download JSON | Downloads the editor's text as json-editor.json | It downloads the text as it stands — it does not format it first, so click Format first if you want a tidy file |
Your JSON stays in your browser. The editing, formatting and validation all run on your device — the JSON is never uploaded to a server. The only exception is "Load from URL", which fetches that address directly from your browser.
Download does not reformat — Format does. "Download JSON" saves exactly what is in the editor, character for character. Format, Compact, Sort and Transform are the buttons that change the text: they re-read the JSON and write it back, which also means duplicate keys keep only their last value and integers longer than about 15–16 digits can be rounded. A plain download or copy never does that.
Worked example: edit a settings record, then download it
This minified settings record is 113 characters on a single line:
{"name":"Ayesha Rahman","city":"Dhaka","plan":"free","notifications":true,"limits":{"projects":3,"storage_gb":5}}
Click the toolbar's Format button and it becomes 149 characters on 10 lines, indented with 2 spaces:
| Line | Formatted JSON |
|---|---|
| 1 | { |
| 2 | "name": "Ayesha Rahman", |
| 3 | "city": "Dhaka", |
| 4 | "plan": "free", |
| 5 | "notifications": true, |
| 6 | "limits": { |
| 7 | "projects": 3, |
| 8 | "storage_gb": 5 |
| 9 | } |
| 10 | } |
Now edit it in place: change "plan": "free" to "pro", change "projects": 3 to 10, and add "theme": "dark" after the limits object. The edited JSON is 168 characters on 11 lines:
| Line | Edited JSON |
|---|---|
| 1 | { |
| 2 | "name": "Ayesha Rahman", |
| 3 | "city": "Dhaka", |
| 4 | "plan": "pro", |
| 5 | "notifications": true, |
| 6 | "limits": { |
| 7 | "projects": 10, |
| 8 | "storage_gb": 5 |
| 9 | }, |
| 10 | "theme": "dark" |
| 11 | } |
Click Compact and the same edited JSON becomes 128 characters on one line — handy for storing or sending. Click Download JSON and the file json-editor.json downloads holding exactly the text in the editor at that moment: the 168-character formatted version if you formatted last, or the 128-character compact line if you compacted last.
What if the JSON is broken? Pasting the same record with a trailing comma — {"name":"Ayesha Rahman",} — is not valid JSON, so the tool shows a parse error — “Parse error on line 1: ... Expecting 'STRING', got '}'” — and no file downloads. Click Repair — in our test it removed the trailing comma and the JSON became valid — or correct the comma yourself and click "Download JSON" again.

Editing in a Code Editor Versus Editing Raw Text
Both hold the same data. The difference is how much help you get keeping it correct.
| Aspect | This JSON editor | Raw text editing |
|---|---|---|
| View | Syntax-highlighted code with 2-space indentation after Format | Plain text, often one long line |
| Structure | Visible: indentation shows the nesting | Hidden: objects and arrays run together |
| Errors | Marked as you type, and checked again before download | Easy to make and hard to spot — nothing flags them |
| Fixing broken JSON | Repair button attempts a fix | By hand, with no help |
| Reshaping | Format, Compact, Sort and Transform buttons | By hand, or in another tool |
| Getting the file out | Download as json-editor.json, or copy | Save the text yourself and hope the extension is right |
| Best for | Editing accurately and handing on a valid file | Quick notes, where correctness does not matter |
Editor, Viewer, Formatter, Validator — which one do you need?
SEOMagnate has several JSON tools that look similar. They are not the same:
| Tool | What it does | What it does not do |
|---|---|---|
| JSON Editor | Edit JSON in place in a code editor, with Format, Compact, Sort, Transform and Repair, then download a .json file | No tree view, no separate result screen, no schema check |
| JSON Viewer | Shows JSON as a collapsible tree you can explore, expand, collapse and search | Not built for editing — use the Editor to change values |
| JSON Formatter | Formats JSON into a clean, 2-space indented layout in a second editor you can switch between code, form, text, tree and view | No .json download, no fix despite its page title claiming both — but its editor toolbar does have a Compact (minify) button |
| JSON Beautifier | The same formatting as the Formatter, under a different name and button ("Beautify JSON") | No .json download — its Beautify button renders into a second result editor and saves as .txt; no auto-fix |
| JSON Validator | Answers only "is this JSON valid?" with a yes/no message | No formatted output, no .json download — it only answers yes or no |
| JSON Minify | Shrinks JSON back to a single compact line | Not for reading or editing; this editor's Compact button does the same in place |
Use the Editor when you need to change JSON, the Viewer when you need to look at it as a tree, the Formatter or Beautifier when you only need a readable layout, and the Validator when you only need a yes/no validity answer.
Who Uses a JSON Editor
Developers editing API payloads. Changing a field or two in a request or response body, formatting it to check the structure, then downloading a valid file to use in code.
People editing configuration files. Opening a settings or config file, changing a value such as a plan or a limit, and confirming the file is still valid before it goes back into service.
People fixing broken JSON. Taking JSON that will not parse, using Repair for a first attempt, then fixing the remaining error by hand with the editor marking each problem.
People creating JSON from scratch. Building a new JSON document in the editor, with highlighting and live validation catching mistakes as they go, so the result is valid from the start.
Anyone who needs a tidy .json file to hand on. Formatting the JSON, downloading it as a properly named .json file, and passing it to a colleague, a program or a service.

Pro Tips for Editing JSON
Format before you edit. Editing a minified line is error-prone because you cannot see the structure. Click Format first, make your change on the readable version, then download it.
Format before you download. "Download JSON" saves the text exactly as it stands. If you want a tidy file, click Format before you click Download — otherwise the file holds whatever layout you last left in the editor.
Use Compact for the smallest file. When size matters — sending JSON over a network or storing it — click Compact first and download the one-line version.
Try Repair first on broken JSON. If pasted JSON will not validate, click Repair before fixing it by hand — in our test it removed a trailing comma and the JSON became valid. It only attempts a fix, so if nothing changes, correct the error yourself and try downloading again.
Check very long numbers and duplicate keys after formatting. Format, Compact, Sort and Transform re-read the JSON, so a repeated key keeps only its last value and integers longer than about 15–16 digits can be rounded. A plain download or copy does not do this — check those two cases in the result before you rely on it.
Paste instead of loading from a URL. "Load from URL" only works when the address serves JSON and allows cross-origin requests. If nothing loads, copy the JSON and paste it — that always works.
If upload says "Invalid File", paste the contents. The uploader checks the file's reported type, not just its .json name, and some systems report .json files differently. Open the file, copy its text, and paste it in.
Keep a backup before editing important JSON. Save a copy of the original first. The editor has Undo, but a backup is the only sure way back if an edit goes wrong.
Common JSON Editing Mistakes to Avoid
Expecting a tree view. This editor is a code editor — there is no collapsible tree and no mode switcher. If you want to explore JSON as a tree, use the JSON Viewer.
Looking for a result screen. There is no separate result area on this page and no "Save as TXT" step. Your edited JSON stays in the editor — copy it or download it from there.
Expecting Download to format the JSON. "Download JSON" saves the text exactly as it stands. A minified paste downloads minified unless you click Format first.
Assuming it fixes invalid JSON on download. An invalid file never downloads. Repair only attempts a fix, and the download button only validates — you fix the error, then download again.
Looking for an indent-size setting. Format is fixed at 2 spaces, with no way to pick 4 spaces or tabs.
Expecting "Load from URL" to work on any site. Most websites block cross-origin fetching, and a failed load shows nothing at all. Paste the JSON when the URL load stays empty.
Trusting duplicate keys or very long numbers blindly after formatting. If the same key appears twice, only the last value survives a Format, and very long integers can be rounded. Check those two cases before you rely on the downloaded file.
Related Tools You May Need Next
Once your JSON is edited and valid, use the tool built for the next step:
JSON Viewer — view your JSON as a collapsible tree to explore its structure. JSON Formatter — format JSON into a clean, readable layout in a second editor with switchable views. JSON Beautifier — the same formatting, under a different name, if you prefer its layout. JSON Validator — a straight yes/no check that your JSON is valid, with no editing. JSON Minify — shrink JSON back to a single compact line. JSON Escape — escape or unescape JSON strings. JSON to XML — convert your JSON into XML. JSON to CSV — convert JSON data into a spreadsheet-ready CSV. JSON to YAML — convert JSON into YAML. CSV to JSON — convert a CSV file into JSON, then edit it here. XML to JSON — convert XML into JSON. XML Formatter — the same beautify idea, for XML documents.
Frequently Asked Questions
How do I edit JSON?
Paste your JSON into the "Enter or paste JSON" box and edit it directly in the code editor — change a value, add a key, or delete a field. Use the toolbar to format, compact, sort, transform or repair it, then click "Download JSON" to save it as a json-editor.json file, or "Copy to Clipboard" to copy it.
Does the JSON Editor show JSON as a tree?
No. This is a code editor with syntax highlighting — there is no tree view and no mode switcher on this page. To explore JSON as a collapsible tree, use the JSON Viewer.
What does "Download JSON" download?
A file named json-editor.json holding exactly the text currently in the editor. It does not reformat the JSON first — click Format before downloading if you want a tidy, indented file.
What do the Format and Compact buttons do?
Format lays the JSON out with 2 spaces of indentation per level, so you can read the structure. Compact does the opposite — it squeezes the JSON to a single line with no extra whitespace, which is best for storing or sending. Both need valid JSON to work.
Can it fix invalid JSON?
Partly. The Repair button attempts to fix broken JSON, and it works on some common mistakes — in our test it removed a trailing comma and the JSON became valid — but if it cannot repair the text, nothing changes and you fix the error yourself. The Download button never fixes anything: invalid JSON simply does not download.
What happens if my JSON is invalid?
A parse error is shown and no file downloads — for example, a trailing comma gives “Parse error on line 1: ... Expecting 'STRING', got '}'”. With an empty editor, the button shows “JSON is invalid” and nothing downloads. Fix the error — a trailing comma or a missing quote is the usual cause — and click "Download JSON" again. The editor also marks errors as you type, so you can catch them before downloading.
Can I load JSON from a URL or a file?
Yes, both. Paste a public JSON address in "Load from URL", or click "Upload File" and choose a .json file. URL loading only works when the address serves JSON and allows cross-origin requests — if nothing loads, paste the JSON directly. File upload only accepts files reported as application/json; if yours is rejected, paste its contents instead.
Is there a separate result screen?
No. Unlike the Formatter and Beautifier, this page has no result area — your edited JSON stays in the editor, and Copy and Download both work straight from it.
Is the JSON Editor free?
Yes. It is free with no account and no signup. The work happens in your browser, so your JSON is never uploaded to a server.
What is the difference between the JSON Editor and the JSON Formatter?
The Editor lets you change JSON in place — edit values, sort, transform, repair — and download the result as a .json file. The Formatter only reformats valid JSON into a readable layout in a second editor and saves it as a .txt file; it has no .json download.