Format JSON Online logoMobile Menu

Comments in JSON

A common point of confusion, as the official JSON standard (RFC 8259) does not support comments.

Unlike JavaScript objects, standard JSON does not allow for comments (e.g., // or /* */). Including them will cause most parsers to fail. If comments are needed, for example in configuration files, formats like YAML or JSONC (JSON with Comments) are often used instead.

Need to work with Comments in JSON?

Try our JSON to YAML Converter