Skip to content
JSON & DATA TOOLS

YAML to JSON Converter (Simple Key-Value)

Convert simple key: value YAML into JSON.

  • Free
  • No signup
  • Runs in your browser

This tool runs in your browser. The text you enter is processed on your device and is not sent to NHP Learning.

YAML to JSON Converter

About YAML to JSON Converter

This is a lightweight converter for flat YAML, where each line holds one key: value pair, such as a small configuration file. Numbers, true, false and null are turned into the matching JSON types and quotes around values are removed.

It does not read nested mappings, lists, anchors or multi-line strings. For simple settings files that is often all you need, and it keeps the tool fast and predictable. If your file has nesting, convert it with a full YAML parser in your project.

How to use YAML to JSON Converter

  1. Paste YAML with one key: value pair per line.
  2. Click Run Tool to convert it to JSON.
  3. Copy the result into your code or configuration.

Example

Input

name: NHP Learning
active: true
count: 83
owner: null

Output

{
  "name": "NHP Learning",
  "active": true,
  "count": 83,
  "owner": null
}

Common uses

  • Turning a small settings file into JSON for a script.
  • Checking how values such as true, 3 and null are typed.
  • Preparing simple front matter values for a JSON-based tool.

Privacy and safety

This tool runs in your browser. The text you enter is processed on your device and is not sent to NHP Learning.

Frequently asked questions

Does it support nested YAML and lists?

No. Only flat key: value lines are converted. Blank lines and comments are skipped, and list items, anchors and multi-line strings are not understood.

What happens with nested keys?

Indented child keys are read as top-level keys, so nested files give wrong results. Use a full YAML parser for nested data.

Can I convert JSON back to YAML?

Yes. The JSON to YAML Converter supports nested objects and lists.

Learn to build this yourself

Free tutorials and courses on NHP Learning cover PHP, JavaScript, SQL and WordPress, from the basics to real projects.