1
OneClickUse
Converters Tool

YAML to JSON Browser Converter

Convert YAML to JSON or JSON to YAML locally in your browser without uploading config files, secrets, or CI snippets.

Runs locally in your browser
Privacy-first workflows
Fast and simple
100% Free, no signup
Conversion ready
Converted YAML to JSON. Copy the output or paste new input on the left.

Written by Anil Gautam · Updated

Why did 3.10 become 3.1 in the JSON?

Unquoted YAML values are typed by how they look. Whole numbers and decimals become JSON numbers, so 3.10 turns into 3.1 and 007 into 7. The words true, false, yes, no, on and off become booleans in any letter case, which turns the country code NO into false. An empty value, ~ or null becomes null. Integers larger than 9,007,199,254,740,991 stay strings, because JavaScript cannot store them exactly, and hex values such as 0x1F and dates such as 2026-10-07 also stay strings.

The three lines python-version: 3.10, country: NO and zip: 007 convert to {"python-version": 3.1, "country": false, "zip": 7}. Quote them as "3.10", "NO" and "007" and all three come through as strings. Quoting also protects you from parser differences, since parsers that follow YAML 1.2 read yes, no, on and off as ordinary strings.

Which YAML layouts does the converter miss?

The converter uses its own small parser, which reads indentation with spaces only. List items must sit deeper than their key, as in tools: followed by lines that start with two spaces and a dash. A list written at the same depth as its key comes out as null and ends the conversion, so later keys never reach the JSON. Any unexpected extra indentation also stops it without an error, so compare the top-level keys of the output with your input.

Block scalars written with | or > are skipped: the indented lines below them disappear and the key becomes an empty object. Write multi-line text as a double-quoted string with \n line breaks instead. Inline lists and maps work only when they are valid JSON, so [1, 2] becomes an array and [x, y] stays the string "[x, y]". A space followed by # starts a comment anywhere on a line, even inside quotes, which cuts "C# and F# #1" short. Documents separated by --- merge into one object, with later keys winning.

What does the JSON to YAML output look like?

The JSON must parse first. A trailing comma or a single-quoted string stops it, and the status box shows the parser's message. Output uses two-space indentation, and an object inside a list is written as a lone - line with its keys indented below, which is valid YAML even if it looks unusual. Strings that YAML could misread get double quotes, including "3.10", "NO", "007", "yes", empty strings and text containing a colon followed by a space or a line break. Keys stay bare when they start with a letter or underscore and contain only letters, digits, underscores and hyphens; others, such as "a.b", are quoted.

Numbers pass through JavaScript, so 12345678901234567890 comes out as 12345678901234567000 and 1.10 as 1.1. Keep long IDs and version numbers as strings in the JSON. The JSON Formatter can validate and inspect the data before you convert it.

How it works

How to convert YAML to JSON (or back)

STEP 01
Pick the conversion direction — YAML → JSON or JSON → YAML.
STEP 02
Paste your input on the left. The output updates live on the right.
STEP 03
Copy the converted output and paste it into your config file, API call, or CI workflow.
You might also need

Related tools

Converters
Currency Converter (Live Rates)
Convert between USD, INR, EUR, GBP, JPY and 15 more major currencies with live exchange rates.
Use now
Converters
Height Converter (cm ↔ feet)
Convert height between centimeters and feet + inches both ways, with a full height chart.
Use now
Converters
Military Time Converter
Convert military (24-hour) time to standard 12-hour time and back, with a full conversion chart.
Use now
Converters
QR Code Generator
Make QR codes for URLs, Wi‑Fi, WhatsApp, contact cards, maps, events, files, and more.
Use now
Converters
JPG to PDF Converter Online
Convert JPG, PNG, WebP, and photo files into a single ordered PDF in your browser.
Use now
Converters
PDF to JPG Converter Online
Export PDF pages as high-resolution JPG images in your browser for previews, uploads, and thumbnails.
Use now
FAQ

Common questions