Detailed answers to common questions about our developer tools, data handling, privacy, and conversion features.
Yes. Every conversion runs entirely inside your web browser using client-side JavaScript. Your XML and JSON data is never transmitted to our servers — there is no server-side processing at all. The conversion happens in-memory within the browser tab, and all data is discarded when you close or refresh the page. We do not log, store, or analyze any input you paste into the converter. This makes the tool safe for sensitive data such as internal API payloads, configuration files, or test data containing PII, provided your device itself is secure.
No. The converter is a standard web page that works in any modern browser (Chrome, Firefox, Safari, Edge) without plugins, extensions, or downloads. There is no registration or login required. Simply open the page, paste your data, and convert. The tool also works on mobile devices and tablets, though a desktop browser provides the best experience for large documents due to screen space.
The converter handles the most common XML features: nested elements (to any depth), XML attributes (converted to @-prefixed JSON keys), text content, CDATA sections (treated as text), XML declarations, and UTF-8 encoded special characters. It correctly maps repeated sibling elements to JSON arrays. Some advanced features like processing instructions, DTD entity references, and namespace-prefixed elements are parsed but may require manual adjustment in the JSON output depending on your use case.
XML attributes are prefixed with the @ symbol in the JSON output. For example, the XML element <book id="42" lang="en">Title</book> converts to {"book": {"@id": "42", "@lang": "en", "#text": "Title"}}. The @ prefix is a widely used convention (adopted by libraries like xml2js, xmltodict, and Newtonsoft) that distinguishes attribute-derived keys from child-element-derived keys. The #text key holds the element's direct text content when attributes are also present.
Yes. The converter supports bidirectional conversion. Switch to the JSON-to-XML tab, paste your JSON, and the tool generates well-formed XML output. When converting JSON to XML, the tool reverses the attribute convention: keys starting with @ become XML attributes, and #text becomes text content. Keep in mind that JSON-to-XML conversion requires a single root object (since XML documents must have one root element). If your JSON has multiple top-level keys, they will be wrapped under a generic root element.
Repeated sibling elements with the same tag name are automatically grouped into a JSON array. For example, <items><item>A</item><item>B</item><item>C</item></items> becomes {"items": {"item": ["A", "B", "C"]}}. However, if only a single <item> exists, it defaults to a scalar value, not a one-element array. This is a known challenge in XML-to-JSON conversion called the "single-item array ambiguity." Many XML parsing libraries (like xml2js) offer a forceArray option to always produce arrays for specified elements, which is important for consistent downstream processing.
There is no hard limit enforced by the tool since processing happens in your browser. However, practical limits depend on your device's available memory and browser tab limits. Most modern browsers handle documents up to 10-15 MB without issues. Documents over 50 MB may cause the browser tab to slow down or run out of memory. For very large files, consider using a command-line tool like jq, xmlstarlet, or a streaming parser (Python's xmltodict, Node.js's xml2js) that can process data incrementally without loading the entire document into memory at once.
CDATA sections in XML (delimited by <![CDATA[ and ]]>) are treated as plain text content. The CDATA wrapper is stripped, and the enclosed text is placed directly into the JSON value as a string. For example, <script><![CDATA[if (a < b) { return true; }]]></script> converts to {"script": "if (a < b) { return true; }"}. This is the standard behavior — CDATA is an XML mechanism for escaping special characters, and in JSON no such escaping mechanism is needed because JSON strings handle all Unicode characters natively.
JSON objects are technically unordered collections (per the JSON specification), though most modern JavaScript engines and JSON serializers preserve insertion order in practice. The converter outputs JSON keys in the same order they appear in the XML source. However, you should not rely on key ordering for semantic meaning in JSON. If element order matters (such as in document-oriented XML), consider whether JSON is the right target format, or use an array of objects to explicitly encode order.
Parsing errors almost always indicate malformed input. For XML: check that every opening tag has a matching closing tag, attribute values are in quotes, special characters are escaped (& for &, < for <, > for >), and there is exactly one root element. For JSON: verify that all strings use double quotes (not single quotes), there are no trailing commas after the last item in objects or arrays, keys are quoted strings, and values are valid types (string, number, boolean, null, object, or array). An online XML or JSON validator can help pinpoint the exact line and character position of the error.
Yes. SOAP messages are XML documents with a specific structure (Envelope, Header, Body elements in the SOAP namespace). You can paste a complete SOAP request or response into the converter to inspect the data structure in JSON format. This is useful for debugging SOAP services, extracting data payloads, or migrating SOAP endpoints to REST/JSON APIs. Note that the SOAP namespace prefixes (like soap: or soapenv:) will appear in the JSON keys — you may want to remove or simplify them after conversion depending on your needs.
Namespace prefixes are preserved in JSON keys as-is. For example, <ns:element xmlns:ns="http://example.com"> converts to a key like "ns:element" in the JSON output. The xmlns declaration itself is treated as an attribute (@xmlns:ns). For documents with multiple namespaces, all prefixes remain in the output. If you need to strip namespace prefixes for cleaner JSON, you can post-process the output by removing everything before and including the colon in prefixed keys.
Yes. The converter includes Format buttons for both XML and JSON. Formatting applies consistent indentation (2 spaces) and line breaks to make the data human-readable. This is purely cosmetic — it changes only whitespace and does not modify the actual data structure, values, or element/key ordering. Pretty-printing is especially useful for reviewing deeply nested structures or sharing formatted output with team members.
XML (eXtensible Markup Language) is a markup language that uses opening and closing tags, supports attributes and namespaces, and treats all values as text. JSON (JavaScript Object Notation) uses key-value pairs and arrays, has native data types (numbers, booleans, null), and is more compact. XML excels at document-oriented data with mixed content and strict schemas (XSD), while JSON excels at data-oriented structures consumed by web and mobile applications. For a detailed comparison, see our XML vs JSON analysis article.
The converter processes text using the browser's native Unicode handling, which supports the full UTF-8 character set including accented characters, CJK characters, emoji, and mathematical symbols. XML escape sequences (&, <, >, ', ") are automatically resolved during parsing. In the JSON output, special characters are either output directly (for UTF-8 compatible characters) or escaped using \uXXXX notation as needed. If your source XML uses a non-UTF-8 encoding (like ISO-8859-1), convert it to UTF-8 first for best results.
Check our conversion guide for step-by-step instructions, or read our in-depth articles on XML to JSON conversion and JSON to XML conversion. For anything else, contact us.