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.

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.

CaseYAMLJSON
Unquoted version numberversion: 1.10"version": 1.1
yes, no, on and offenabled: yes"enabled": "yes"
Datescreated: 2026-10-14"created": "2026-10-14"
Merge key<<: *defaults"<<": { ... }
Integer beyond 2^53id: 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

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