How to Use JSON Formatter

A step-by-step guide to formatting, validating, and minifying JSON

Getting Started

Using Simple JSON Formatter is easy. Simply paste your JSON data into the input field, and use the available tools to format, validate, or minify your data. Here's a detailed guide on each feature:

1Paste Your JSON

Copy your JSON data from any source and paste it into the "Input" text area on the left (or top on mobile). You can also click the "Sample" button to load example JSON data to try out the features.

{"name":"John","age":30,"city":"New York"}

2Format / Beautify JSON

Click the "Format / Beautify" button to transform your minified or messy JSON into a clean, readable format. Before formatting, you can select your preferred indentation size (1, 2, or 4 spaces) using the dropdown.

{
  "name": "John",
  "age": 30,
  "city": "New York"
}

3Validate JSON

Click the "Validate" button to check if your JSON is valid. If the JSON is valid, you'll see a success message. If there's an error, you'll see a detailed error message indicating what went wrong and where.

✓ Valid JSON

✗ Unexpected token at position 15

4Minify / Compact JSON

Click the "Minify / Compact" button to remove all unnecessary whitespace from your JSON. This is useful when you need to reduce file size or prepare JSON for transmission.

{"name":"John","age":30,"city":"New York"}

5Copy to Clipboard

After formatting or minifying, click the "Copy" button in the output panel to copy the result to your clipboard. You can then paste it anywhere you need.

6Download as File

Click the "Download" button to save your formatted or minified JSON as a file. The file will be named "formatted.json" and saved to your default downloads folder.

Tips and Tricks

  • Dark Mode: Click the sun/moon icon in the header to toggle between light and dark modes.
  • Indentation: Choose between 1, 2, or 4 spaces for indentation before formatting.
  • Error Messages: Pay attention to error messages - they tell you exactly where the problem is in your JSON.
  • Clear All: Use the "Clear" button to reset both input and output fields.
  • Sample Data: Use the "Sample" button to load example JSON and explore the features.

Common JSON Errors

Missing quotes around keys

Wrong: {name: "John"}

Correct: {"name": "John"}

Trailing commas

Wrong: {"name": "John",}

Correct: {"name": "John"}

Single quotes instead of double quotes

Wrong: {'name': 'John'}

Correct: {"name": "John"}

Ready to try it out?

Open JSON Formatter