Skip to content

data → data

Convert XML to JSON

Convert XML to JSON in seconds. Free, no signup, no watermark, no file-size limit. Your file is processed in your browser and never uploaded.

At a glance

Source
XML
Target
JSON
Where it runs
Your browser
Cost
Free, unlimited
Account
Not needed
XML

Converter

XML to JSON

On device

Drop one or more xml document files.

or select xml document

Your file never leaves this browser

    The details

    What happens when you convert between data formats

    Extensible Markup Language. A structured, self-describing cousin of HTML. The data is parsed into a structure and written back out in the target format — a flat table becomes nested objects, or vice versa. The result is a javascript object notation. the default way machines exchange structured data, produced entirely inside your browser.

    What survives

    • Every value
    • The relationships, wherever the target format can express them

    What changes

    • The shape of the data, which is the point of the conversion
    • The order of keys, which is not guaranteed to be preserved

    Where it goes wrong

    • JSON to CSV only makes sense for a flat list of objects — anything nested is flattened or lost
    • XML has no standard for a list of items, so the same file can parse into different structures in different tools

    Why anyone would do this

    Every system wants a different shape, and reshaping by hand is where mistakes happen.

    About the format

    Extensible Markup Language.

    A tree of elements with attributes and text, defined by a schema. It is verbose, but every node is explicitly named and closed.

    Where it is good
    • Self-describing and self-validating
    • Comments are allowed
    • Deeply entrenched in enterprise, government and publishing systems
    Where it falls short
    • Extremely verbose — the same data is much larger than JSON
    • Whitespace handling differs between parsers
    • Entity expansion attacks have to be defended against
    You will find it on
    Enterprise software, publishing, government data portals

    The thing people miss

    XML was designed so that a document could be read by a person and a machine at the same time — which is why it is so chatty.

    About the target

    JavaScript Object Notation.

    Text made of objects, arrays, strings, numbers, booleans and null, with a syntax borrowed from JavaScript but with no code in it.

    • Readable as well as parseable
    • Maps almost exactly onto objects in every major language
    • Strict about its types, so mistakes surface immediately

    Real jobs

    What people are actually doing with XML

    An exchange format that a partner system insists on

    An RSS or Atom feed

    Reading data out of a document that was published as XML

    Specification

    The details, in one table

    Source formatXML — XML document
    Target formatJSON — JSON data
    Typical source size1 KB – 100 MB
    RunsIn your browser
    Account neededNo
    WatermarkNone
    File extension.xml → .json

    How to

    XML to JSON, step by step

    1. 01

      Add your xml document

      Drag the file onto the drop zone, or tap to browse. Only one file is needed.

    2. 02

      Choose the JSON settings

      Set the JSON-specific options — everything happens locally, so the speed is your device, not a queue.

    3. 03

      Download the result

      The finished JSON downloads to your device. Nothing is uploaded and nothing is retained.

    Also available

    XML converts into

    Questions

    XML conversion questions

    What actually happens to my XML file when I convert it to JSON?

    The data is parsed into a structure and written back out in the target format — a flat table becomes nested objects, or vice versa. So the XML file is unpacked, the content is laid out, and the result is written out as JSON. Every value survives unchanged.

    Will converting XML to JSON reduce the quality?

    For this particular conversion, not in the way you would expect. Every value — the XML content is not re-encoded in a lossy way. The only thing that changes is the format it is stored in.

    Is my XML file uploaded to a server?

    No. This XML to JSON conversion runs as JavaScript inside your browser tab. The file is read from your device and the result is written back to your device, so there is no upload step, no file-size limit and no copy of your XML file on any server.

    Do I need an account or will there be a watermark?

    Neither. There is no sign-up step, no email capture and no watermark on the output. The only limits are the ones your own device imposes.

    What is the most common mistake people make when converting XML to JSON?

    JSON to CSV only makes sense for a flat list of objects — anything nested is flattened or lost

    Why would somebody convert XML to JSON at all?

    Every system wants a different shape, and reshaping by hand is where mistakes happen. In short: an exchange format that a partner system insists on

    Something most people do not know about XML?

    XML was designed so that a document could be read by a person and a machine at the same time — which is why it is so chatty.