Scrape Configs · Rules · Alerts

Prometheus JSON to YAML
Converter

Convert JSON into a prometheus.yml configuration in seconds. Ideal for turning generated scrape and rule config into the YAML Prometheus expects. Free, instant, and browser-based.

JSON
YAML

How to Convert JSON to Prometheus YAML

1

Paste your config JSON

Drop in the JSON describing your global settings, scrape_configs, and rule files.

2

Get prometheus.yml

Valid Prometheus YAML appears instantly, with scrape jobs correctly structured.

3

Use with Prometheus

Copy or download as prometheus.yml and start Prometheus with --config.file.

Why Prometheus Uses YAML

Prometheus is configured through prometheus.yml, which defines global settings, scrape targets, and rule files in YAML.

Monitoring configs are often generated dynamically as JSON — from service discovery or templating tools. Converting to YAML produces a config file Prometheus can load directly.

Benefits for Monitoring Workflows

Config-Ready

Output is valid prometheus.yml you can load with --config.file, with scrape jobs intact.

Readable Targets

Scrape configs and relabeling rules are far clearer in YAML than in nested JSON.

Comment Your Config

Explain why a job uses a specific interval or relabel rule. YAML supports # comments; JSON does not.

Private Processing

Configs reference internal endpoints and tokens. Conversion is local to your browser, so nothing is uploaded.

Frequently Asked Questions

Will the YAML work as a Prometheus config?
Yes, provided your JSON matches Prometheus structure (global, scrape_configs, rule_files). Save it as prometheus.yml and load it with --config.file.
Are scrape_configs preserved?
Yes. Each scrape job, including static_configs and relabel_configs, converts exactly into the YAML Prometheus expects.
How are durations handled?
Duration strings like 15s or 1m are kept as strings, which is what Prometheus requires for interval and timeout fields.
Why are some values quoted?
YAML quotes values that could be misread, such as regex patterns in relabeling. Prometheus interprets the quoted values correctly.
Is my monitoring config private?
Completely. Conversion runs in your browser, so internal endpoints and tokens never leave your machine.

Related Tools & Resources

© 2026 JSON YAML Converter