JSON ↔ XML Converter
Live 2-way converter between JSON and XML. Configurable attribute prefix and text node key. 100% browser-based, no upload.
😄 Free thanks to ads
More iTool Features!
Character Counter
Free online character counter — count characters, words, sentences, and bytes in real time. No install, no signup.
JSON & JSONL Parser / Formatter
Free online JSON & JSONL parser. Validate, pretty-print, and minify JSON with syntax highlighting. Auto-detects JSON Lines (.jsonl). 100% client-side.
YAML ↔ JSON ↔ TOML Converter
Live 3-way converter between YAML, JSON, and TOML. Smart schema detection for Kubernetes, Docker Compose, GitHub Actions, plus YAML pitfall warnings (Norway problem, octal, sexagesimal). 100% browser-based.
XML Parser / Formatter
Free online XML parser with real-time validation, collapsible tree view (+/-), pretty print, and syntax highlighting for elements, attributes, text, and CDATA. 100% browser-based.
Base64 Encoder / Decoder
Encode text to Base64 or decode Base64 strings online — free, instant, no install. Full Unicode support. See both results side by side.
EPUB to TXT Converter
Extract text from EPUB eBooks instantly. Free browser-based EPUB to TXT conversion — no install, no server upload, chapter by chapter.
Text to Speech
Free online text-to-speech tool — type any text and your browser reads it aloud. Adjust voice, speed, and playback position. No install required.
Markdown Viewer - MD File Reader Online
Open and preview MD files instantly in your browser — no install needed. Free online markdown viewer. Upload .md files or paste markdown to see live rendering with code highlighting and auto TOC.
Text Diff
Free online text diff tool — compare two texts side by side and spot every difference instantly. No install, no signup.
Frequently Asked Questions
Each item in a JSON array is converted into an XML element that repeats the same tag name. For example, items in an items array are listed as consecutive <item> tags.
XML attributes are converted to keys prefixed with @ by default, and text nodes are converted to a configurable special key (e.g., #text). You can adjust the conversion rules via options to produce the shape you need.
Yes, REST APIs typically use JSON while SOAP APIs use XML. When you need to convert data between the two systems, you can use this tool to quickly check and transform the format.
Yes, both JSON to XML and XML to JSON are supported. Enter your source data in the left panel and the conversion result appears immediately in the right panel.
JSON ↔ XML Converter
JSON and XML have different structures, so conversion has a few choices. This tool converts both ways in real time, with two tweakable rules.
Two options
- Attribute prefix (default
@_) — prefix used in JSON keys for XML attributes. Example:<book id="1">→{"@_id": "1"} - Text key (default
#text) — JSON key holding the text content of an element when it also has attributes. Example:<title lang="en">Gatsby</title>→{"title": {"@_lang": "en", "#text": "Gatsby"}}
How to use
- Type in either side — the other converts automatically
- Sample button loads example data
- Swap button exchanges left and right
- Copy or download each format separately
Conversion rules
- Arrays — multiple child elements with the same name become a JSON array
- Attributes vs child elements — distinguished by the prefix
- Empty elements —
<br />→{"br": ""} - Comments — stripped during conversion (not lossless)
Client-side only
Your data never leaves the browser. Safe for SOAP responses, API keys, internal configs.