One missing comma in a configuration file can stop an application from starting, and the error message often points to a line that looks fine. Plain text editors do not warn you. Using the JSON Editor in your browser lets you change values while the structure stays visible, so the file you save is still valid JSON.
JSON Editor FREE online toolRuns in your browser. No sign-up, nothing to install. Open the tool →The rules that cause most breakage
- Every key and every string must use double quotes; single quotes are not valid JSON.
- Items are separated by commas, but the last item in an object or array must not have one.
- Comments are not allowed. A // line or /* */ block will make strict parsers fail.
- Brackets must pair up: each opening { or [ needs a matching closing one.
- Numbers cannot have leading zeros, and true, false and null must be lowercase.
A safe editing routine
- Make a copy of the original file and name it with a date, such as settings.backup.json.
- Paste the content into the editor and confirm it loads without error before you change anything.
- Edit only the value you need, such as a port number or a feature flag, and leave the rest untouched.
- Fix any error the editor reports and verify the structure still looks as you expect.
- Copy the result back into the original file and save with UTF-8 encoding.
- Restart or reload the application and check the log for config errors.
Pick the right data types
A common slip is changing a number into a string by adding quotes. The value 8080 is a number, while "8080" is a string, and some applications treat them differently. The same applies to booleans: true is not "true". When you edit a value, look at its neighbors to see how the file already writes it, and stay consistent.
Handling larger files
Large configuration files with nested sections are easy to get lost in. Collapse sections you do not need, and work on one branch of the tree at a time. If you must add a new item to an array, copy an existing item and change its values, since the structure is then guaranteed to match. For environment-specific files, keep separate copies for development and production, and compare them before deploying to see exactly what differs.
Keep secrets out
Configuration files often contain keys, tokens and passwords. Editing in a browser tool that runs locally avoids sending the content elsewhere, but you should still avoid pasting live production secrets into any page unless you must. Replace them with placeholders while you edit, then put the real values back in the final file. Never commit secrets to a public repository, and use environment variables or a secrets manager where your platform supports it.
Watch out for encoding
Save the file as UTF-8 without a byte order mark if your parser is strict, and check that special characters such as accents survived the paste. Line endings do not matter to JSON, so do not worry about Windows versus Unix newlines.
Verify before you deploy
Validation only proves the syntax is correct, not that the settings make sense. A port set to 80800 is valid JSON and still wrong. Run your application locally with the new file, or run its own config check command if it has one. Keep the backup until the change has been running for a while, so rollback is a single copy.
Comments (0)
No comments yet. Be the first to share a thought.