JSON5 Tools

Editor extensions, CLI tools, validators, and utilities for working with JSON5.

TL;DR: Most editors support JSON5 through extensions. VS Code has excellent support via extensions, and many IDEs like JetBrains have built-in JSON5 recognition.

Quick Start: VS Code

VS Code is the most popular editor for JSON5 development. Here's how to get started:

1

Install the JSON5 Extension

Search for "JSON5" in VS Code extensions or click below:

ext install mrmlnc.vscode-json5
2

Create a .json5 File

The extension automatically recognizes .json5 files.

3

Enjoy Full Support

Syntax highlighting, error detection, and formatting are now active!

Linting & Validation

Ensure your JSON5 files are valid and follow best practices.

npm json5 CLI

The official json5 package includes a CLI for validation.

# Install globally npm install -g json5 # Validate a file json5 -v config.json5

ajv with JSON5

Use ajv for JSON Schema validation of JSON5 files.

import Ajv from 'ajv'; import JSON5 from 'json5'; const ajv = new Ajv(); const data = JSON5.parse(json5String); const valid = ajv.validate(schema, data);

Need a Specific Tool?

Start with VS Code setup or explore our complete resources page.