YAML to JSON Converter

Convert YAML to JSON format instantly. Paste your Kubernetes configs, Docker Compose files, CI/CD pipelines, or any YAML data.

100% client-side. Your data never leaves your browser.

Converted JSON will appear here...

In Laravel

Laravel itself does not read YAML: its configuration is PHP arrays in config/. YAML appears around a Laravel app instead. Sail's compose.yaml, GitHub Actions workflows and OpenAPI specs are all YAML.

To read YAML in PHP, use the symfony/yaml package. The Laravel framework does not require it, so add it with composer require symfony/yaml first. This example turns an OpenAPI spec into a JSON file, for tools that only read JSON:

use Illuminate\Support\Facades\File;
use Symfony\Component\Yaml\Yaml;

$spec = Yaml::parseFile(base_path('docs/openapi.yaml'));

File::put(
    public_path('openapi.json'),
    json_encode($spec, JSON_PRETTY_PRINT | JSON_UNESCAPED_SLASHES)
);

symfony/yaml and this converter do not read every value the same way. Dates are the main difference: see the second question below.

Laravel 13.x docs: Sail, Configuration

YAML Validation

Validates your YAML syntax during conversion. Get clear error messages with line numbers if something is wrong.

Syntax Highlighted Output

JSON output is syntax highlighted with color-coded keys, strings, numbers, and booleans for easy reading.

100% Private

All processing happens in your browser. Your config files with secrets and credentials never leave your device.

Need something custom built?

I build custom Laravel tools, web apps, and SaaS platforms. If you need something beyond off-the-shelf, let's talk.

Contact

Frequently Asked Questions

Why did my version number 1.10 become 1.1?

A value without quotes that looks like a number is read as a number, and the number 1.10 is the same as 1.1. This breaks version numbers, PHP versions in a CI matrix and Docker image tags. Put quotes around them: version: "1.10". PHP's symfony/yaml reads it the same way.

Why did my date change?

YAML has a date type, so released: 2026-10-10 is not a string. This converter turns it into "2026-10-10T00:00:00.000Z". PHP's symfony/yaml turns it into a Unix timestamp, the integer 1791590400, unless you pass the Yaml::PARSE_DATETIME flag. To keep the date as text in both, quote it: released: "2026-10-10".

Why does a file with tabs fail?

YAML does not allow tab characters for indentation, only spaces. Editors that insert tabs cause the error "tab characters must not be used in indentation". Replace the tabs with spaces, two per level is the usual choice.