Processed in your browser

JSON / JSON5 Converter

Parses JSON5 comments, single quotes, unquoted keys, hexadecimal numbers, and trailing commas into standard JSON. Reverse output is readable JSON5 but cannot recreate original comments.

Processed in your browser
0 / 1,000,000
Converted output

Tool guide

What is JSON / JSON5 Converter?

JSON and JSON5 Converter handles development configuration containing comments, single quotes, unquoted keys, hexadecimal numbers, or trailing commas. JSON5 is parsed into data before strict JSON output, while reverse generation cannot recreate original comments, quote choices, or hand formatting. Common workflows include the following. Convert development JSON5 configuration for a strict JSON consumer. Generate readable JSON5 for human-maintained settings. Diagnose compatibility issues caused by comments or trailing commas. The page also documents input boundaries, output behavior, and practical cautions so you can review the result before putting it into an application, configuration, test, or production workflow.

When to use it

  • Convert development JSON5 configuration for a strict JSON consumer.
  • Generate readable JSON5 for human-maintained settings.
  • Diagnose compatibility issues caused by comments or trailing commas.

How to use it

  1. Identify strict JSON or JSON5 input.
  2. Load an example to inspect keys and arrays.
  3. Convert and fix parser errors.
  4. Review comment and number normalization before copying.
  5. Load one of the realistic examples first to verify the selected options and processing direction before replacing it with your own data.
  6. Review the output, status message, and documented limits; copy, download, or continue only after the result matches your expectation.

Runnable examples

The “Example 1” and “Example 2” buttons load the matching inputs. They cover different structures, directions, or boundaries and can be run directly in the workspace.

Example 1

{"name":"JSONLane","release":{"tools":40,"ready":true},"features":["comments","trailing commas"]}

Example 2

// JSONLane local configuration
{
  name: 'JSONLane',
  release: { tools: 40, ready: true },
  colors: [0x10243e, 0x26b6a4,],
}

Input rules

  • The JSON direction still requires strict JSON syntax.
  • JSON5 input may use syntax defined by that format.
  • Infinity, NaN, and values without a standard JSON form are rejected on export.
  • Text input is counted before processing and is limited to 1,000,000 characters on this page; file modes apply the separate file limit shown in the workspace.
  • JSON5 comments and original quote style are not retained.

Output rules

  • JSON5 to JSON removes comments and normalizes numbers.
  • JSON to JSON5 may use unquoted keys and trailing commas.
  • Object and array order follows the parsed data order.
  • Output reflects only the current input, direction, and options; rerun after changing a mode or value instead of treating an earlier result as current.
  • Infinity and NaN cannot be emitted as standard JSON.

Limitations and cautions

  • JSON5 comments and original quote style are not retained.
  • Infinity and NaN cannot be emitted as standard JSON.
  • JSON-to-JSON5 output is not strict JSON.

How your data is handled

All parsing, conversion, binary encoding, and intermediate data remain in the current browser tab. JSONLane does not upload the input or retain it after refresh or close.

FAQ

Is JSON5 content uploaded?

No. Parsing, conversion, and output generation remain in the current browser tab.

Is every round trip lossless?

No. Formats differ in types, comments, ordering, and binary capabilities; the page documents the important losses.

Why are some inputs rejected?

Unsafe integers, dangerous keys, excessive depth, and values with no clear target representation are rejected instead of silently rewritten.

Are comments preserved?

No. Parsing produces data values only, so comment text and placement cannot be recreated during output.

Why are Infinity and NaN rejected?

Standard JSON has no representation for those values, so JSON output must reject them.

Can JSON5 be sent to a JSON API?

Only when the API explicitly supports JSON5. Most JSON endpoints require strict JSON syntax.

Updated: 2026-08-09