YAML → JSON
Converts YAML files to JSON.
This tool runs on JavaScript. To use it, turn on JavaScript in your browser and reload the page.
FROM YAML TO JSON IN ONE STEP.
YAML → JSON turns configuration and data files in YAML format into JSON. The settings files of Docker Compose, Kubernetes, GitHub Actions and many applications are YAML; when you need to move them into an API, a JSON schema or a program that does not read YAML, this tool converts them in a single step. The output is indented with 2 spaces, 4 spaces or a tab; Turkish and other Unicode characters stay as they are.
YAML files containing several documents separated by “---” are turned into a JSON array with each document as one element. Because JSON has no date type, date and time values in the YAML are turned into text. The file is opened in safe loading mode: the features of YAML that can create program objects are switched off, so converting a file from someone else carries no risk either. If there is an indentation mistake or an invalid structure, the line and column of the error are shown. YAML, YML and TXT files are accepted, up to 16 MB. You can upload up to 20 files at once; they are all processed with the same settings, and several files download as a single ZIP.
From start to finish
- Upload your YAML file. Drag a YAML, YML or TXT file in or select it.
- Choose the indentation. 2 spaces, 4 spaces or a tab.
- Convert and download. Download the JSON once it is ready. The number of documents is written on screen.
Frequently asked questions
What happens to comments?
Because JSON does not support comments, the comments starting with # in the YAML are not carried into the output.
Are anchors and aliases (& and *) supported?
Yes. Aliases are resolved and their values are written out openly in the JSON.
Why does the line number in the error message look different?
A YAML error usually comes from the indentation on the previous line. Check the indentation just above the line given; make sure spaces were used rather than tabs.
Does my file stay on the server?
No. Your file reaches the server only to be processed and is deleted when the job is done; the output is deleted too once you download it and leave the tool. You don't need an account, a name or an email address, and your files are never sent to a third-party service. It is free to use: we set no hourly or daily quota on the number of jobs, we don't make you watch an ad before processing, and we add no watermark to the output.
Other File tools
RUPO Studio