JSONToonPro
JSON tool

JSON Editor

Edit JSON online in the browser with live validation, formatting, sort keys, tree view, and instant error feedback. Upload a file or paste your JSON, make changes, then copy or download the result. Everything runs 100% client-side, so your data never leaves your device.

100% client sideInstant resultNo data sent
Input JSON
Output
Paste JSON to format, beautify, validate, minify, analyze, or view it as a tree.
0 input chars0 output charsWaiting for valid JSON

Editing JSON Safely

JSON is unforgiving to edit by hand because a single misplaced character invalidates the entire document, and the error is usually reported somewhere other than where you made the change. A few habits remove almost all of that pain.

Validate continuously rather than at the end. If you check after twenty edits, you have twenty candidate causes for the failure. If the editor tells you the moment a change breaks the syntax, you always know which edit did it, because it was the one you just made.

Format before you start editing. Minified JSON is nearly impossible to modify correctly by hand: you cannot see nesting, you cannot tell which closing brace matches which opening one, and a comma inserted in the wrong place looks identical to one in the right place. Beautify first, edit in the readable form, and minify at the end if you need to.

Keep the original before any bulk change. Renaming a key across 400 records or removing a nested block is fast to do and slow to undo. Copy the source somewhere first, whether that is a git commit, a duplicate file, or another browser tab. Then diff the two when you finish, because a diff catches the record you accidentally skipped in a way that re-reading the file never will.

Change one kind of thing at a time. Renaming keys and converting types in the same pass makes the diff much harder to review and hides mistakes inside noise.

Common Editing Tasks

Four operations cover most hand edits. Each has a specific failure mode worth naming.

Adding a field

The mistake is always the comma. Adding a pair at the end of an object means the previous last line now needs a trailing comma, and the new line must not have one.

BEFORE
{
  "name": "reporting-service",
  "port": 8080
}
AFTER
{
  "name": "reporting-service",
  "port": 8080,
  "healthPath": "/healthz"
}

Renaming a key across an array of records

Find and replace works, but only if you match enough context to avoid collateral damage. Searching for user and replacing it will also hit values, substrings such as username, and any key ending in user. Include the quotes and the colon in the search term, so you replace "user": and not user. Then confirm the replacement count matches the record count before you save.

Changing a type from string to number

This is a two-character edit that is easy to do halfway, leaving one quote behind and breaking the document. Delete both quotes together, and check the value is still a legal JSON number afterwards: a leading zero or a plus sign that was harmless inside a string becomes a syntax error outside one.

BEFORE
{
  "quantity": "12",
  "unitPrice": "4.50",
  "batch": "0091"
}
AFTER
{
  "quantity": 12,
  "unitPrice": 4.5,
  "batch": "0091"
}

Note that batch stayed a string on purpose. Its leading zeros are meaningful and would both be lost and be invalid as a number.

Removing a nested block

Delete from the opening brace of the block through its matching closing brace, then fix the comma on whichever side is now adjacent to a bracket. If the removed block was last in its parent, the preceding entry loses its trailing comma. If it was first or in the middle, one comma goes with it. Reformatting immediately afterwards confirms you got the braces right, since a mismatched pair will refuse to format.

Config File Formats You Will Edit

Most hand-edited JSON is configuration rather than data. These are the files you will meet most often and what each one controls.

FileEcosystemWhat it controls
package.jsonnpm and NodeDependencies, dev dependencies, scripts, entry points, and package metadata. Strict JSON, so no comments.
tsconfig.jsonTypeScriptCompiler options, module resolution, path aliases, and include and exclude globs. Actually JSONC, comments allowed.
.eslintrc.jsonESLintRule severities, parser options, plugins, environments, and per-directory overrides.
composer.jsonPHPPackage requirements, autoload rules, and scripts. The PHP equivalent of package.json.
appsettings.json.NETConnection strings, logging levels, and app configuration, layered per environment.
manifest.jsonExtensions and PWAsPermissions, icons, background scripts, and display mode for browser extensions and installable web apps.

The tsconfig.json row is the one that causes arguments. TypeScript accepts comments and trailing commas there because it parses the file as JSONC, and the default generated config is full of explanatory comments. Those same comments will make a strict JSON validator reject the file, and that rejection is accurate: the file is valid JSONC and invalid JSON. The same applies to Visual Studio Code settings.json and launch.json. Everything else in the table is strict JSON, so a comment in package.json really will break npm.

Escaping Rules When Hand Editing

Six characters cannot appear literally inside a JSON string. Everything else, including unicode text in any script, can be written directly as long as the file is UTF-8.

CharacterWrite it asNote
" double quote\"Otherwise the string terminates early.
\ backslash\\Every literal backslash must be doubled.
newline\nA real line break inside a string is invalid JSON.
tab\tSame rule as newline. Control characters must be escaped.
carriage return\rCommon in text copied from Windows-authored files.
any control char\u001fAnything below U+0020 needs the four-digit unicode form.

The classic trap is the Windows file path. A single backslash starts an escape sequence, so a path pasted straight from Explorer is either invalid or, worse, silently wrong. In the example below the first line fails because backslash U is not a recognized escape, while a path containing a folder starting with n or t would parse into a string with a real newline or tab inside it and cause a confusing failure much later.

INVALID
{"log": "C:\Users\dev\notes\temp.txt"}
VALID
{"log": "C:\\Users\\dev\\notes\\temp.txt"}

Forward slashes are the simpler answer where the consuming program accepts them, since Windows APIs generally do and no escaping is needed at all. Note also that a forward slash may optionally be written as backslash forward-slash, a legacy allowance for embedding JSON inside HTML script tags, but it is never required.

Pair this with the JSON Validator while you work and the JSON Formatter before you commit. Browse the full collection of free JSON tools to find the right one for the job.

Frequently asked questions

4 answers
Yes. Paste your JSON or upload a file, make your changes in the editor, and then copy the result or download it as a file. Nothing is installed and nothing is uploaded to a server: the whole editing session happens in your browser tab, which makes it a quick alternative to opening an IDE for a one-off config change.

More JSON Tools

About the JSON Editor

Sometimes you just need to tweak one value in a config file, fix a broken API payload, or reshape a test fixture, and opening a full IDE is overkill. This JSON editor online tool covers that workflow end to end: paste or upload your JSON, edit it with continuous validation catching every syntax slip as you type, reformat with your preferred indentation, sort keys alphabetically, and check the result in tree view before copying or downloading the file. Common mistakes like trailing commas and single quotes can be repaired automatically. Because the editor is free and runs entirely in your browser, credentials, tokens, and customer data in your files never touch a server.