JSON / YAML TO JSON

YAML to JSON Converter

Convert YAML configuration into JSON with js-yaml, locally in your browser. Paste YAML and get clean JSON instantly. Processing happens locally in your browser, with no account and no uploads.

JSON formatting workbench

workspace.json — live session
INDENT
SORT
01 / RAW INPUT 0 LINES · 0 B
02 / FORMATTED OUTPUT 0 LINES · 0 B
Awaiting input ⌘/CTRL + ↵ TO FORMAT
RESULT / CONVERT
// Result will appear here
HOW IT WORKS

YAML in, unambiguous types out.

Parsing uses js-yaml against the YAML 1.2 core schema, which is the short answer to most "why did my value change" questions. yes, no, on and off remain strings here, while 1.1-era parsers read them as booleans.

YAMLJSON
flag: yes"flag": "yes"
zip: 007"zip": 7 — the leading zero is gone
day: 2026-11-24"day": "2026-11-24"
a note: | block of two lines"note": "two\nlines\n"
an anchor and an aliasexpanded into plain objects, no reference left
a <<: *base merge keykept as a key literally named << — the two maps are not merged
two documents separated by ---a JSON array holding both documents, not one merged object
The converter reading YAML: flag stays the string yes, the leading zero of 007 becomes the number 7, the date stays a string, and the block scalar becomes one escaped note value
Four rows of the conversion table, in one parse

References, merges and the failures you do not see

Anchors and aliases are resolved into concrete structures before the JSON is written, which is what a consumer that has never heard of YAML needs. Merge keys are not. js-yaml loads the core schema here, and the core schema has no merge rule, so <<: *base arrives as a mapping key named << holding the referenced map — the inherited values sit one level deeper instead of joining the mapping. Diff the pair before a config file goes anywhere, and read the anchor and merge key guide for what each construct turns into.

A duplicated mapping key is rejected by the library, but the conversion does not stop there: the offline parser takes over and keeps the last value, so a: 1 above a: 2 arrives as { "a": 2 } with the rejection left in the console. Tab-indented blocks behave the same way — rejected by the library, accepted by the fallback. Both are a signal to fix the source, not a feature of this page.

NOTE The offline fallback understands the indentation subset — mappings, block and flow sequences, quoted scalars, comments and document markers. Block scalars, tags and aliases belong to the library path.

What you get on this page

  • ▸Powered by js-yaml
  • ▸Anchors and quoted strings handled
  • ▸Live conversion while typing
  • ▸Copy or send the JSON to the output pane

Because bracekit is a static application, this page loads quickly, caches well and never sends your data to a parsing server. Your formatting preferences, recent documents and snippets stay in local storage.

ANSWERS

YAML to JSON questions

How do I convert YAML to JSON?

Paste YAML into the Source text box in the Convert module. Conversion runs as you type and the JSON result appears below.

Are YAML comments preserved?

No. JSON has no comment syntax, so comments are discarded during conversion.

Is my YAML uploaded?

No. The entire conversion runs in your browser with js-yaml.

Is my JSON data uploaded to a server?

No. Parsing, formatting, conversion, validation and comparison all run in your browser with JavaScript. Your data is never transmitted, and history is stored only in your local storage.

Is bracekit free to use?

Yes. Every tool is free, requires no account and has no usage limits. Once a page has been visited, the offline cache lets it reopen without a connection; only the Google Fonts files need the network, and system fonts are used while you are offline.

TOOL MATRIX

Keep working

Keyboard shortcuts
FORMATTING
Format input Ctrl/⌘ + Enter
Toggle auto-format Ctrl/⌘ + Shift + A
CLIPBOARD & FILES
Copy output Ctrl/⌘ + K
Open JSON file Ctrl/⌘ + O
Download output Ctrl/⌘ + S
Save snippet Ctrl/⌘ + Shift + N
MODULES
Open find & replace Ctrl/⌘ + Shift + F
Lock / unlock output Ctrl/⌘ + Shift + L
Show this dialog Ctrl/⌘ + /
Local history
Save snippet
Erase local data

Nothing is stored in this browser yet.

Removes the saved draft, history, snippets and formatting options for this site. Documents you typed stay in the editor until the page reloads.