How to Find and Fix JSON Config Errors

Minecraft

·

Sep 11, 2024

·

7 Mins Read

An invalid .json configuration file can cause your server to crash or plugins/mods to not load. You should never edit a JSON file directly, as they have a very specific format and one minor error will cause the entire file to become invalid.

The most common files that cause this issue are the default .json files found in the root directory (default / base directory) on your server files. These files handle your whitelist, player bans and server operators (admins). We recommend deleting these files to solve the issue, but do be aware that this will reset your whitelist, banned players and ops. You can reconfigure these files by running commands in the console (never edit .json files directly).


# Using a JSON Validator

An easy and effective way to locate and fix issues with your JSON code is by using an online JSON validator tool.

  1. Open an online JSON validator tool, like this one

  1. Paste your JSON code into the input box

When you paste your code, the website will automatically fix and format any simple spacing errors it finds.

If your JSON still has any errors in it, the line(s) containing the issue(s) will be highlighted red, making it easy to spot the problems.

  1. Locate and fix any remaining errors

If there are any other errors detected, the website will point them out to you in notes below the input window. As you can see in the example below, this note shows where the error is, so we can easily fix it.

Once you've finished fixing any errors, you can optionally click the Format button in the top right of the input window to clean up the formatting.

Kobe Plane

Game Experience Engineer