Skip to main content

Good for converting interface examples and configuration data: preserving large integers, exact decimals, and string types without reserializing numbers through JavaScript floats.

Convert according to YAML 1.2, retaining numerical precision; not retaining comments and anchor writing. Reject aliases, complex keys, duplicate keys, custom labels, and non-finite numbers. Downstream programs may still read JSON large integers as floating point numbers. Up to 100 layers, 10,000 nodes.

70 / 100,000 characters

Shortcut key: Ctrl/⌘+Enter. Modifying inputs or options clears old results.

Instructions for use

  1. Choose JSON → YAML or YAML → JSON.
  2. Paste the data and click Convert; first change to direct values and string keys when encountering unsupported aliases or complex keys.
  3. Copy the output, or use the result as input for reverse transformation; the configuration still needs to be verified in the target program.

Input and output examples

Example input
{"id":9007199254740993,"code":"00123"}
Example output
"id": 9007199254740993 "code": "00123"

The last digit of id is not rounded, code remains a string; quotes are valid YAML to avoid type ambiguity.

FAQ

Aliases, non-string keys, duplicate keys, custom labels, NaN, or Infinity are not accepted. YAML comments and anchors are not preserved; only the data is transformed.

The output of this site retains the original text of the numbers, but programs that receive JSON may still use floating point parsing. If the business needs to reliably transmit long IDs across languages, it is recommended to define the ID as a string.

Calculation basis and reference materials

Parses data using yaml's YAML 1.2 syntax tree, outputting node-by-node JSON or block YAML; numbers follow raw decimal lexicon, and hexadecimal and octal integers are converted using BigInt. Reject types and aliases that cannot be mapped to JSON.

Content check: · About this site and content description

Related tools