JSON ↔ YAML Converter
Convert between JSON and YAML 1.2 without uploading your data. Large integer IDs and decimal digits are preserved rather than rounded.
Ready. Processing stays in this browser.
No uploads or saved history. Files are read on your device. Ctrl or Command + Enter runs the tool. Editing input clears outdated output.
How to use the JSON ↔ YAML Converter
- Choose JSON to YAML or YAML to JSON.
- Paste your data or choose a UTF-8 file, then select Convert.
- Copy or download the result. Use output as input switches the direction for a return conversion.
For example, 9007199254740993 and 1.2300 keep their digits. The converter reads number tokens directly instead of passing them through JavaScript floating-point numbers.
Copying or downloading output creates a separate copy under your control. Clear the page when working on a shared device.
Supported data and limits
JSON supports string keys, arrays, strings, numbers, booleans and null. YAML comments and original formatting are not represented in JSON. Non-string mapping keys, aliases, custom tags, NaN and Infinity are rejected rather than silently changed. Duplicate keys are rejected in either direction.
YAML uses the 1.2 core schema. Hexadecimal and octal YAML integers become equivalent decimal JSON numbers; numeric spelling may change while the value stays exact. JSON to YAML quotes all strings and keys to prevent implicit type changes. Unpaired UTF-16 surrogate strings are rejected because YAML cannot represent them.
Limits: 5 MiB input, 100 nested levels, 200,000 values and 16 million output characters. Local worker processing stops after 15 seconds. The tool does not save your input or output.
Frequently asked questions
Will a large numeric ID lose precision?
No. Number tokens are retained without converting them to JavaScript Numbers. Large decimal integers, decimal digits and exponent values can be represented in the output exactly. Your downstream program may still have its own numeric limits.
Why are YAML aliases rejected during conversion?
JSON does not have references or aliases. This tool asks you to replace aliases with explicit values instead of expanding them, losing object identity or risking excessive output.
Does YAML yes become JSON true?
Under the YAML 1.2 core schema used here, yes is a string. Use true or false for booleans. This differs from some YAML 1.1 programs.
Can I keep comments when converting?
JSON has no comment syntax, so YAML comments and original layout are omitted. Keep a backup of the original configuration if comments matter.
YAML support and privacy
YAML parsing uses a self-hosted copy of the open-source yaml library. No library is downloaded from a third-party server while you use this page. Custom executable tags are not loaded, and input is never executed.
YAML library documentation explains the YAML 1.2 core schema and document model.
Processing runs in a local browser worker when supported. You can cancel long operations. No database or server processing is used for the text you enter.
Examples and practical checks
Understand the result before using it elsewhere.
- Convert JSON and YAML without silently rounding numbersWorked example · 5 min read
- Explore Developer ToolsCompare tools and their limits
- How we test these toolsMethods, verification and limitations