JSON5 Converter

Convert JSON5 and strict JSON locally using two-space formatting.

ReadyRuns in your browser
INPUT & CONTROLS

Prepare your input

Local processing

JSON5 supports comments, unquoted identifier keys, single quotes, trailing commas and extended number syntax. Reverse conversion requires strict JSON. Output uses two-space formatting. Executable expressions and functions are rejected.

Limits: 262,144 input UTF-16 units, parsed depth 64 (root depth 0), 10,000 JSON values and 300,000 output UTF-16 units. Nonfinite numbers, negative zero and integers outside ±9,007,199,254,740,991 are rejected. Finite fractions such as 0.1 use JavaScript binary64 precision, not arbitrary precision.

Runs locally in your browser using JSON5 2.2.3. Input is not sent or stored.

Result

Your result starts here

Review the input and selected options, then use the primary action. Output and any validation messages will appear here.

METHOD & CONTEXT

Understand the result before using it.

How it works

Parses JSON5 with JSON5 2.2.3, or strict JSON in reverse mode, validates parsed budgets and numbers, then serializes with two spaces.

Interpretation

Read the result summary first, then inspect the detailed output and any errors or warnings. The result describes the supplied input and selected options. Changing input requires another run.

Assumptions & warnings

Comments and source formatting are not retained; duplicate names use the last value. Finite decimals use binary64. Nonfinite numbers, negative zero and unsafe integers reject. JSON5 output may contain trailing commas.

Inputs are processed in your browser. Follow the input format and size limits shown next to the controls.

Try an example

Select Load example in the input panel, review the selected mode, then use its displayed primary action. Inspect the result before replacing the sample with your own input.

Related utilities for the next step in your task.

Explore Developer Utilities →