Attribute plus text
- Input
- <item id="7">Tea</item>
- Result
- An item node with an id attribute and children ["Tea"].
The attribute value remains the string "7", separate from the element text.
Convert XML into an ordered JSON tree with attributes, namespaces and mixed text preserved. Reject malformed XML and external entity declarations.
Runs in your browser; input is not uploaded or saved. Limit: 1 MiB UTF-8.
Turn XML into an explicit JSON tree that keeps element order, attributes and mixed text. This mapping avoids treating repeated tags as duplicate object keys and retains namespace identity even when a prefix is rebound inside the document.
Processing uses browser memory only. Nothing you enter is sent to a conversion service or stored by these tools. Downloads are saved by your browser, and copied results remain on your clipboard until replaced.
The attribute value remains the string "7", separate from the element text.
Both entries survive and their original order is preserved.
Keeping text beside elements avoids losing the location of inline markup.
To avoid data loss from duplicate object keys, this tool produces an explicit JSON syntax tree where each element is an object with 'name', 'namespace', an ordered 'attributes' array, and an ordered 'children' array. Repeated sibling tags remain preserved in their original sequence rather than overwriting each other.
No. For security, DOCTYPE and ENTITY declarations are rejected immediately before parsing. The tool does not resolve external network resources, execute entities, or insert unescaped markup, protecting against XML entity expansion vulnerabilities.
No. All text and attribute values are preserved strictly as strings. Automatic type coercion can inadvertently corrupt identifiers (such as postal codes with leading zeros like '01234' becoming '1234') or currency strings, so data typing is left to your application logic.
Format, minify and validate JSON without rounding large numbers or changing string escapes. Copy or download the result locally.
Developer ToolsConvert UTF-8 CSV into JSON with quoted fields, embedded commas, header validation and string values preserved. Process files locally.
Developer ToolsGenerate static QR codes locally from text or URLs, with Unicode support, error correction and PNG or SVG downloads.
Developer ToolsCompress and optimize JPEG, PNG, and WebP images locally in your browser. Adjust quality, compare file sizes, resize dimensions, and batch download without server uploads.
Image Tools