How to use the YAML to JSON tool
- Paste your YAML into the input box.
- The JSON appears instantly. Choose 2 or 4 spaces of indentation.
- Copy or download the JSON, or use Swap to convert back.
Where YAML to JSON helps
YAML is popular for configuration because it’s easy to read and allows comments: Kubernetes manifests, Docker Compose files, GitHub Actions and many app settings use it. Many APIs and programs, though, expect JSON. Converting also exposes exactly how a YAML parser reads your file, which is the fastest way to debug indentation mistakes.
YAML surprises to watch for
- Indentation matters. Use spaces, never tabs, and keep items in a list lined up.
- Unquoted values change type.
yes,onandtruebecome booleans and010may become a number. Quote anything that must stay text. - Anchors and aliases (
&baseand*base) are expanded into full copies in the JSON.
Check or tidy the result with the JSON Formatter & Validator, or go the other way with JSON to YAML.
Frequently asked questions
Are comments kept?
No. JSON has no comments, so YAML comments are dropped during conversion.
What happens with several YAML documents?
Documents separated by --- become an array of JSON values, one for each document.
Why did a value become true or a number?
YAML guesses types, so yes, no, on and numbers without quotes become booleans and numbers. Put quotes around values you want kept as text.
Are my files uploaded to a server?
No. HushConverts converts everything with code that runs in your browser, so your text and files stay on your device. You can even use most tools offline once the page has loaded.
More encoding & developer
- Base64 EncodeTEXT → BASE64Turn any text into Base64.
- Base64 DecodeBASE64 → TEXTPaste a Base64 string to turn it back into normal text.
- Base64 to ImageBASE64 → IMAGEPaste a Base64 string or a full data:image URI to preview the image and download it as a file.
- Image to Base64IMAGE → BASE64Drop an image to get its Base64 in the format you need: a data URI, raw Base64, a CSS background rule or an HTML img tag.
- URL Encode / DecodeTEXT → URLMake text safe to put in a URL, or turn a percent-encoded string like %E2%9C%93 back into readable text.
- HTML Entity Encode / DecodeTEXT → HTMLEscape text so it displays literally in HTML, or decode entities such as &, < and © back into the characters they stand for.
- JSON Formatter & ValidatorJSON → JSONPaste JSON to pretty-print it, minify it, or find out exactly where it’s broken.
- JSON to CSVJSON → CSVTurn a JSON array of objects into a spreadsheet-ready CSV.