PDFのミカタ

JSONの書き方の間違いを見つける方法

公開日:2026年10月19日|最終更新:2026年10月19日|運営者情報

この記事のポイント
  • 貼る
  • 確かめる
  • 直す

JSONを書いたら、プログラムが読めずに、エラーになった。どこが間違っているのか分からない。JSONを整える・チェックする は、貼り付けたJSONが正しいかを、チェックします。

手順

  1. 「整える前」に、JSONを貼り付けます。
  2. 「整える」を押します。
  3. 正しい場合は、「正しいJSONです」と表示され、「整えた後」に整った結果が出ます。
  4. 誤りがある場合は、「JSONの形が正しくありません」と表示されます。
このツールは、誤りの場所を表示しません。誤りがあるときは、よくある間違いを順に確認します。

チェックの流れ

  1. 貼り付けたJSONが、正しいか確認する。
  2. 誤りがあれば、直す。
  3. もう一度「整える」で確認する。
  4. 「正しいJSONです」と出れば、書き方は合っている。

誤りを探すコツ

正しいと判定される例

項目名がダブルクォーテーションで囲まれ、値が文字列・数値・真偽値・null・配列・オブジェクトのいずれか。

正しいJSONでも注意すること

「正しいJSONです」と出ても、プログラムが期待する項目や形式と合っているとは限りません。項目名の綴りや、値の型は、別途確認します。

向いている場面

例

設定ファイルを手で編集したら、アプリが起動しなくなった。貼り付けて確認したところ、「JSONの形が正しくありません」。最後の項目の後ろの余分なカンマを消したら、直った。

つまずきやすい点

よくある質問

JSON5やコメント付きのJSONはチェックできますか?

通常のJSONの規則で判定します。コメントは、書けません。

まとめ

貼って「整える」を押すだけで、書き方をチェック。誤りは、よくある間違いから探しましょう。

JSONを整える・チェックするを使う(無料)

あわせて使えるツール

この解説が役に立ったら、応援してもらえるとうれしいです。

応援する(300円)ほしい物リストで応援

同じツールの、ほかの解説

解説の一覧を見る

How to Find Mistakes in JSON

Published: Oct 19, 2026 | Updated: Oct 19, 2026 | About (Japanese)

Key points
  • Paste
  • Check
  • Fix

You wrote JSON, and the program couldn't read it and gave an error. You can't tell what's wrong. Format and Validate JSON checks whether the pasted JSON is correct.

Steps

  1. Paste the JSON into "Before".
  2. Press "Format".
  3. If correct, "Valid JSON" is shown and the tidy result appears under "After".
  4. If there is an error, "The JSON is malformed" is shown.
This tool doesn't show the location of the error. When there is one, check the common mistakes in turn.

Flow of checking

  1. Check whether the pasted JSON is correct.
  2. If there is an error, fix it.
  3. Check again with "Format".
  4. If "Valid JSON" appears, the syntax is right.

Tips for finding errors

Examples judged correct

Item names enclosed in double quotes, and values that are a string, number, boolean, null, array or object.

Even correct JSON needs care

Even if "Valid JSON" appears, it doesn't necessarily match the items and form the program expects. Check the spelling of item names and value types separately.

Good for

Example

After hand-editing a configuration file, the app wouldn't start. Pasting it in showed "The JSON is malformed". Deleting an extra comma after the last item fixed it.

Common stumbling blocks

Frequently asked questions

Can JSON5 or JSON with comments be checked?

It is judged by the rules of ordinary JSON. Comments can't be written.

Summary

Just paste and press "Format" to check the syntax. Look for errors starting with the common mistakes.

Use "Format and Validate JSON" (free)

Tools that go well with this

If this guide helped, a small tip would mean a lot.

Send a tip (¥300)Send a gift (Amazon wishlist)

More guides for this tool

See all guides