YAML to JSON Converter
Open a .yaml or .yml file, or paste YAML, and it opens as JSON you can browse, check and download; nothing is uploaded.
Processed on your device. Nothing is uploadedHow to check
Paste text instead
Pasted text stays in this tab and is never sent anywhere.
Read a YAML config as JSON: open a .yaml or .yml file, drop it or paste the text, and it is read in your browser and opened in the JSON viewer. There you see it as a collapsible tree or as formatted text, check it, search it and download it as a .json file. Anchors and aliases are written out as the values they point to, so the JSON holds everything the YAML meant. It is a quick way to see what a Helm values file, a CI workflow or an OpenAPI spec really contains.
Why use YAML to JSON
Private
Your YAML is read by your own browser and never sent to a server, so configs with secrets stay on your device.
A full JSON viewer
The result opens as a tree and as text, with search, validation and the other JSON tools.
Works offline
After you have used it once, it keeps working without an internet connection.
How it works: convert YAML to JSON
Open or paste your YAML
Choose a .yaml or .yml file, drop it on the page, paste the text into the box, or try a sample.
It opens as JSON
The YAML is read and shown in the JSON viewer as a tree and as formatted text. A YAML error shows its line.
Check and edit
Expand the tree, search keys and values, edit the text and validate the result.
Download the JSON
Download saves a .json file with the YAML file's name. The site keeps no copy, so download what you need.
What the YAML to JSON converter handles
- .yaml and .yml files, a drop, the paste box or a sample, up to 10 MB.
- Mappings become objects and sequences become arrays, in the order they were written.
- Anchors (&), aliases (*) and merge keys (<<) are resolved into plain values.
- Multi-line strings with | and > become ordinary JSON strings with \n where the lines break.
- Numbers, booleans and null become JSON numbers, true/false and null; quoted values stay strings.
YAML to JSON: what it can't do
- Comments are not kept, because JSON has no place for them.
- One document per file: a file with several documents separated by --- is not supported.
- Custom tags such as !Ref or !Sub (CloudFormation) are not read.
- Files up to 10 MB.
YAML to JSON: questions and answers
- Is my file uploaded?
- No. Your YAML is read and turned into JSON by your browser, on your device. Pasted text stays in this tab and is never sent anywhere.
- What happens to my YAML comments?
- They are dropped. JSON has no comments, so lines starting with # do not appear in the result. Keep your .yaml file if you need them.
- How are anchors and aliases converted?
- Each alias is replaced by the value its anchor points to, and merge keys (<<) are merged into their mapping. The JSON shows the full values, with no references left.
- My file has several documents separated by ---. Can I convert it?
- Not as one file: only a single document is supported. Paste each document into the box on its own and convert them one at a time.
- Why does my CloudFormation template fail?
- CloudFormation uses custom tags such as !Ref and !GetAtt, which plain YAML readers do not know. Write them in their long form (Ref:, Fn::GetAtt:) and the file converts.
- Can I turn JSON back into YAML?
- Yes, on the JSON to YAML page.
- How do I convert a YAML file to JSON?
- Convert YAML to JSON by reading the YAML into data and writing the same data as JSON, where indentation becomes braces and brackets and comments are dropped. In OpenAnyDoc, open, drop or paste the .yaml or .yml file and the JSON opens in the JSON viewer to check and download; the file is read in your browser and never uploaded.
Why it's private: your files never leave your browser
Most online viewers upload your file to a server, so a copy of it leaves your device. OpenAnyDoc works the other way round: your browser reads the file and draws it on your screen. Nothing is uploaded, there is no account, and the file is gone from memory when you close the tab, so there is nothing for us to store, see or lose.
How we tell you about new features
Announcements are based on the release date shown to everyone, and nothing is stored on your device or sent anywhere.