# YAML ⇄ JSON

> Convert YAML to JSON and back. Runs entirely in your browser — nothing you paste is sent anywhere.

Source: https://toffeekit.com/tools/yaml-json-converter

**Category:** [Developer](https://toffeekit.com/category/developer) · **Price:** Free · **Runs:** in your browser, nothing is uploaded

Open the tool: https://toffeekit.com/tools/yaml-json-converter

**Also useful for:** yaml, json, convert, config

## How it works

1. Choose a Direction: YAML to JSON or JSON to YAML.
2. Paste your YAML or JSON into the Input box.
3. Pick an Indent of 2 or 4 spaces.
4. Click Copy or Save, or press Swap to convert the result back.

## FAQ

### How do I convert YAML to JSON?

Set Direction to YAML to JSON and paste the YAML. The JSON appears on the right, indented with the spaces you chose, and you can save it as data.json.

### Why do I get a YAML error?

The most common cause is inconsistent indentation or a tab character, because YAML only allows spaces. The message shows the first line of the parser's error to help you locate it.

### Does YAML to JSON keep numbers and booleans?

Yes. Values such as 42, true and null become real JSON numbers, booleans and null. Quote a value in the YAML, for example "42", to keep it as a string.

### Can I use this for Kubernetes or GitHub Actions files?

Yes, for single-document YAML. Paste the file, convert it to JSON to inspect it, or go the other way to generate YAML from a JSON config.

### Why did my yes or no value become true or false?

YAML treats some plain words as booleans. Put quotes around the value if you want it kept as text.

### Is YAML ⇄ JSON free and private?

Yes. It's free with no sign-up or limits, and it runs entirely in your browser, so what you type or paste never leaves your device. It works on phones and computers alike.

## Privacy

YAML ⇄ JSON runs entirely in your browser. Your files and text are processed on your device and are never uploaded.

## Related tools

- [JSON Formatter](https://toffeekit.com/tools/json-formatter) — Format, minify and validate JSON with clear errors.
- [Base64 Encode / Decode](https://toffeekit.com/tools/base64-encoder) — Encode text to Base64 or decode it back, UTF-8 safe.
- [URL Encode / Decode](https://toffeekit.com/tools/url-encoder) — Percent-encode query values or whole URLs.
- [HTML Entities](https://toffeekit.com/tools/html-entity-encoder) — Escape < > & and quotes, or decode entities.
- [JWT Decoder](https://toffeekit.com/tools/jwt-decoder) — Read a token's header, claims and expiry.
- [Hash Generator](https://toffeekit.com/tools/hash-generator) — MD5, SHA-1, SHA-256, SHA-384 and SHA-512 at once.

