---
title: "Convert YAML to JSON Locally - Blobster Guide"
description: "Convert YAML to JSON in your browser without an online converter. The steps in Blobster, plus the YAML details that change values: merge keys, versions and booleans."
canonical: "https://www.mochavi.com/blobster/guides/convert-yaml-to-json-locally"
markdown_mirror: "https://www.mochavi.com/blobster/guides/convert-yaml-to-json-locally.md"
language: "en"
generated_from: "prerendered HTML"
---

> Canonical HTML: [https://www.mochavi.com/blobster/guides/convert-yaml-to-json-locally](https://www.mochavi.com/blobster/guides/convert-yaml-to-json-locally)
>
> This machine-readable Markdown mirror is generated from the canonical page during the Mochavi production build.

[Blobster](https://www.mochavi.com/blobster) / [Guides](https://www.mochavi.com/blobster/guides)

YAML guide

# Convert YAML to JSON without pasting it into a website.

Open the YAML file in Blobster, check the tree and copy the top-level value. Blobster copies it as indented JSON, and the conversion runs in your browser, so manifests and configs with internal hostnames or credentials never reach a converter site.

Published 14 October 2026 3 minute read By Mochavi

[Install Blobster](https://chromewebstore.google.com/detail/blobster/epddolhfilamhbnmgglenceabjbbeeho) [Read as Markdown](https://www.mochavi.com/blobster/guides/convert-yaml-to-json-locally.md)

Short answer

Open the file, confirm the tree shows what you expect, then copy the root value as JSON. Before you rely on the output, check merge keys, unquoted version numbers and very large integers.

## Key points

-   Blobster selects the top-level node when a file opens, and `Ctrl+C` (`Cmd+C` on macOS) copies the selected value as JSON with two-space indentation.
-   A file that holds several documents separated by `---` becomes a JSON array with one entry per document.
-   Anchors and aliases are expanded. `<<` merge keys are not applied, so the shared mapping appears under a literal `<<` key.
-   Comments are dropped, because JSON has no comment syntax.

## Steps

-   Open the `.yaml` or `.yml` file, drag it into Blobster or paste the text.
-   If pasted YAML opens as plain text, set Settings, Document, Format to YAML.
-   Read the tree. Parse errors show the line, the column and an excerpt, so fix those first.
-   With the top-level node selected, press `Ctrl+C` or `Cmd+C`. Select any branch instead to copy only that part.
-   Paste the JSON where you need it and check the cases below.

## What changes on the way to JSON

Blobster reads YAML with the default YAML 1.2 rules of the `yaml` library. Most files convert exactly. A few common YAML habits produce JSON you might not expect.

| Case | YAML | JSON |
| --- | --- | --- |
| Unquoted version number | `version: 1.10` | `"version": 1.1` |
| yes, no, on and off | `enabled: yes` | `"enabled": "yes"` |
| Dates | `created: 2026-10-14` | `"created": "2026-10-14"` |
| Merge key | `<<: *defaults` | `"<<": { ... }` |
| Integer beyond 2^53 | `id: 12345678901234567890` | `"id": 12345678901234567000` |

## Why two converters can disagree

YAML 1.1 treats `yes`, `no`, `on` and `off` as booleans. YAML 1.2 does not, so under Blobster’s default rules they stay strings. That is usually what you want for the `on:` key of a GitHub Actions workflow, which a YAML 1.1 parser turns into `true`.

A file that starts with a `%YAML 1.1` directive is read with 1.1 rules instead. Merge keys then apply, and `yes` and `on` become `true`, including `on` when it is a key.

An unquoted `1.10` is a number in both versions, so it becomes `1.1`. Quote version strings in the YAML if the trailing zero matters. Very large integers lose precision because the values become JavaScript numbers in the browser.

## Merge keys need the tool that reads the file

Compose files can reuse settings with a merge key such as `<<: *defaults`. Merge keys are a YAML 1.1 feature that is not part of YAML 1.2, so Blobster expands the alias but leaves it under a `<<` key instead of merging it into the service.

Compose’s documentation says it follows the YAML merge type. When you need the merged result, `docker compose config --format json` prints the model Compose will apply, as JSON.

## When an online converter is fine

If the YAML is already public, such as an example from documentation, any converter will do. Blobster is for the files you should not paste into a website: Kubernetes manifests with internal hostnames, CI workflows, customer configs and anything with credentials in it. For conversions you repeat in a pipeline, use a command-line tool.

## Sources

-   [YAML 1.2.2 specification](https://yaml.org/spec/1.2.2/)
-   [YAML 1.1 boolean type](https://yaml.org/type/bool.html)
-   [yaml library documentation: version and merge options](https://eemeli.org/yaml/)
-   [Docker Compose: docker compose config](https://docs.docker.com/reference/cli/docker/compose/config/)
-   [Docker Compose: fragments and merge](https://docs.docker.com/reference/compose-file/fragments/)

Related

[Private JSON formatter→](https://www.mochavi.com/blobster/private-json-formatter)[Redact secrets before sharing→](https://www.mochavi.com/blobster/guides/redact-secrets-before-sharing)[Blobster vs CyberChef→](https://www.mochavi.com/blobster/compare/cyberchef)

Machine-readable

[Markdown version→](https://www.mochavi.com/blobster/guides/convert-yaml-to-json-locally.md) [Blobster RSS feed→](https://www.mochavi.com/blobster/feed.xml)

Local-first workbench

## Inspect the data. Keep the document local.

Open JSON, logs, tokens, configs and tables in Blobster without adding an account, telemetry or a public paste URL.

[Install from Chrome Web Store](https://chromewebstore.google.com/detail/blobster/epddolhfilamhbnmgglenceabjbbeeho)
