JSON ↔ YAML ↔ XML converter — any direction
Change JSON, YAML or XML into the format another tool needs. Review the output before replacing a configuration file: some details do not translate between formats.
Runs in your browser — your input is not uploaded to ToolsNow.
The text you enter is processed locally in your browser and is not uploaded to ToolsNow.
Site files and analytics use separate network connections. Ads are off. Privacy & Cookies
Changing formats can lose information. XML attributes use prefixed keys. A single child in <a><b/></a> and repeated children in <a><b/><b/></a> may produce different data shapes. Comments, anchors and formatting may not survive conversion. Keep the original.
Check the output before using it. Some format-specific tags, such as !!js/function, may be rejected. A successful conversion does not prove that the data is safe to run as code or use as configuration.
How to use
- Paste data or Load sample. Check From after the source is detected. Select a format yourself if the guess is wrong.
- Choose To. The output updates as you type. Formatted output makes it easier to read; parse errors show a location when one is available.
- Check the structure. Compare lists, numbers and quoted values. Open XML options if the receiving tool needs different attribute or text-field names.
- Copy output or download. Try the result in its destination before replacing your original file.
Questions
Why do XML attributes become keys starting with @?
JSON and YAML need a convention to separate an XML attribute from a child element. This tool uses @ for attributes and #text for an element’s own text. Change Attribute prefix or Text node name to match the system receiving the data.
What should I check after conversion?
Look closely at single-item lists, empty values, booleans, long numbers and identifiers with leading zeroes. XML content and attributes may be interpreted as numbers or booleans. YAML comments and anchor notation are not retained as written, and mixed XML text can lose its original structure.
Will swapping the formats restore the original?
Not necessarily. The swap button uses the converted output as the new input; it cannot recover comments, formatting or distinctions already lost. Keep the source file for editing and rollback.
Does pasted data run as code?
The converter parses values rather than executing pasted code. XML entity processing is disabled, and YAML uses its default core schema rather than application-specific object constructors. This is not a general security validator; a large or deeply nested input can still exhaust browser resources.
Is the input uploaded?
Conversion runs in the browser, without submitting the pasted data to a conversion service. The page may fetch its parser code and other resources, so local processing does not imply that the whole page is network-free.
Published by ToolsNow. How tools and sources are checked · Report a problem