Want to convert XML file to JSON file?
Try Withdata Data File Converter, a desktop XML to JSON converter for Windows, MacOS, and Linux, Convert XML to JSON, Easy and Fast.
- Can run in GUI mode, Step by Step, just a few mouse clicks.
- Can run in Command line, for Scheduled Tasks and Streams.
- Convert files locally and privately, avoid uploading large XML file(s) to online services.
- Support Windows, Linux, and macOS.
Download Withdata DataFileConverter
Windows 64 bit
Windows 32 bit
Linux .deb (For Debian, Ubuntu) 64 bit
Linux .rpm (For Red Hat, Fedora, SUSE) 64 bit
MacOS 64 bit
Convert XML to JSON
Choose XML file -> Set JSON file -> Convert XML to JSON
“Start a New Convert” for “XML to JSON”.
Select From “File” “XML” To “File” “JSON”.
1. Open source XML file.
Support large XML file ( > 4GB ).
Source XML file’s content is like this:
2. Config target JSON file.
3. Set rows options.
4. Convert XML to JSON.
After converting, you can view the output JSON file.
More about XML to JSON converter
Download Withdata DataFileConverter
Windows 64 bit
Windows 32 bit
Linux .deb (For Debian, Ubuntu) 64 bit
Linux .rpm (For Red Hat, Fedora, SUSE) 64 bit
MacOS 64 bit
See Video: Convert XML file to JSON file without coding
See also:
XML → JSON reference
Type mapping
| Value kind | in XML | in JSON |
|---|---|---|
| Int | <int>1234</int> | 1234 (number) |
| Bigint | <bigint>9007199254740993</bigint> | 9007199254740993 |
| Decimal | <decimal>1234.56</decimal> | 1234.56 (number) |
| Float | <float>1.234e10</float> | 1.234e10 (number) |
| Text | <char>text</char> | "text" (string) |
| Long text | <text>multi-line text</text> (entities for & <) | "multi-line\ntext" (escaped newline inside a string) |
| Date | <date>2026-09-18</date> (xs:date with an XSD) | "2026-09-18" (string) |
| Datetime | <datetime>2026-09-18T14:30:00Z</datetime> (xs:dateTime) | "2026-09-18T14:30:00Z" (string) |
| Binary | <blob>base64...</blob> (xs:base64Binary) | "base64:..." (string) |
| Boolean | <bool>true</bool> | true / false (boolean) |
| JSON | escaped inside an element, or its own sub-tree | nested object or array, kept as structure |
Dialect differences
Both XML and JSON are file formats, so what differs below is how each one chooses to represent a value.
| Property | in XML | in JSON |
|---|---|---|
| identifiers | Attribute values in quotes; entities (& < >) for ... | Double quotes; backslash escapes |
| dates | Text (xs:date / xs:dateTime when an XSD is in play) | No date type: dates arrive as strings and the reader must p... |
| binary | base64Binary / hexBinary inside text | Not supported natively - base64 inside a string |
| separator | Tags, not delimiters | Braces and commas |
| encoding | Declared in the XML declaration | UTF-8 by definition |
| typing | None in the markup itself | string, number, boolean, null, object, array - no date type |
| shape | Arbitrary tree | Nested objects and arrays |
Do it online, free
Skip the manual work — convert XML to JSON online, free (runs in your browser, nothing is uploaded). For large files or batch jobs, use the desktop apps.