Tool

Online YAML to JSON converter

Convert a YAML 1.2 document to readable JSON without sending your data.

Your data is processed locally in your browser and is not sent to our servers.

Shortcut: Ctrl or ⌘ + Enter
Read only · 2-space indentation

Enter a YAML document to convert it to JSON.

Verifiable example

This YAML document contains a map, numbers, a boolean, a string that It looks like a number and a list:

service:
  name: api
  port: 8080
  active: true
  version: '1.0'
  tags:
    - production
    - private

The result preserves the structure and types:

{
  "service": {
    "name": "api",
    "port": 8080,
    "active": true,
    "version": "1.0",
    "tags": ["production", "private"]
  }
}

How it works

Paste a single document and press Convert to JSON, or use Ctrl/⌘ + Enter. The tool parses YAML 1.2 Core and generates JSON with two-space indentation and a final line break.

It normalizes hexadecimal and octal integers to decimal without losing precision. You can then copy or download the .json file.

If you are starting from JSON, see how to convert it to YAML without losing types.

The library is loaded only when you use the editor. Everything happens in this tab, without processing requests, storage, or URL changes. Optional page-view measurement never receives the YAML or its result.

Common uses

  • Adapt YAML to an API that only accepts JSON.
  • Prepare JSON examples for documentation or testing.

What YAML is supported

A YAML 1.2 Core document is accepted: maps and lists of blocks or flow, comments, single, double or multiline strings, root values and types null, boolean, integer and finite decimal. You can also use Core tags such as !!str, !!int, !!map and !!seq.

yes, no, on, and off are text in YAML 1.2. The %YAML 1.1 directive is reject to avoid old and ambiguous rules.

Common errors

  • Indentation with tabs: YAML uses spaces to define blocks.
  • Unseparated colon: on a map, the value usually requires a space after :.
  • Repeated keys: different readers can retain different values; the tool asks to resolve the duplication before converting.
  • Various documents: separates the sections delimited by --- and convert them one by one.
  • Complex keys: JSON can only represent property names such as text.

When the parser knows the location of a syntax error, the message includes line and column and places the cursor near the problem.

Anchors, aliases and combination keys

JSON does not express shared references. That’s why anchors don’t expand (&name), aliases (*name) or the key <<: they could duplicate data or hide conflicts.

Expand those properties in your editor before converting. If << is really the literal name of a property, enclose it in quotes: "<<".

Safety limits

  • Maximum input of 1,000,000 characters.
  • A single document and up to 100 levels of nested collections.
  • A maximum of 100,000 nodes and 2,000,000 output characters.
  • Anchors, aliases, merges, custom tags, keys are not supported duplicates or non-finite numbers such as .nan or .inf.
  • Keys like __proto__, constructor and prototype are treated as text literal; the result is written directly from the syntax tree without assign them to a JavaScript object.

Frequently asked questions

Is my configuration sent to a server?

No. The document is analyzed and converted in your browser. The input is not saves and disappears when closing or reloading the page.

Do large integers lose precision?

No. Integers are normalized with exact arithmetic and written directly at the exit. Keep in mind that the program that then reads the JSON could convert them to a numeric type with less precision.

Reviewed on by Tools in a Tab.