XML to JSON
Use this to work with XML feeds, exports or configuration in JavaScript or any JSON-based tool.
- Processing
- In your browser, in a background worker
- Engine
- fast-xml-parser (entity declarations refused)
- Quality
- Changes structure
- Batch
- Up to 20 files at once
- Status
- Tested with sample files
How to convert XML to JSON
- Open the converter and add your XML files — drop, paste or choose from your device.
- Check the options: keep attributes, pretty-print.
- Convert and download the JSON file. It is checked before it is offered.
What to expect
- Elements become keys; repeated elements become arrays; attributes become keys starting with @; text next to attributes is stored as #text.
- Values stay strings, because XML has no number type. Comments and processing instructions are dropped.
- Files that declare their own entities in a DOCTYPE are refused: that is how "billion laughs" and external-entity attacks work.
What carries over
Kept
- Elements, attributes (as @-prefixed keys) and text
Changed or removed
- Comments and processing instructions
- Namespace declarations are kept as plain attributes
- DOCTYPE entity declarations (rejected for safety)
Options
- Keep attributes
- Attributes become keys starting with @; element text that sits next to attributes is stored under #text.
- Pretty-print
- Indent the JSON for reading, or write it on one line.
Limits
- Desktop: 25 MB per file, 500,000 rows.
- Phones and tablets: 8 MB per file, 150,000 rows.
Limits protect your device’s memory. They are conservative engineering defaults, not guarantees for every device.
Common problems
- “The JSON is not valid”
- FileLynx reports the position of the syntax error. A common cause is a trailing comma or a single-quoted string.
- Accented characters look wrong in Excel
- Turn on the Excel BOM option when exporting CSV, or import the file with UTF-8 encoding.
- Large numbers changed
- Integers above 9,007,199,254,740,991 cannot be represented exactly; FileLynx warns you when it detects them.
About the formats
XML
XML is a markup format for structured data, used by feeds, office files, configuration and many business systems.
Good for: Data exchange with systems that expect XML, documents with attributes and nested elements.
Watch out: XML text has no number or boolean type, and DOCTYPE declarations can be abused, so FileLynx refuses entity declarations.
JSON
JSON is the data format of web APIs and configuration: nested objects, arrays, strings, numbers, booleans and null.
Good for: APIs, configuration and nested data.
Watch out: JSON numbers lose precision beyond about 15–17 significant digits in JavaScript-based tools.
Questions
Are namespaces kept?
Prefixed names are kept as written (for example x:title), and namespace declarations become ordinary @ attributes.
Is the file uploaded?
No. The conversion runs inside your browser tab, on your device. Nothing is sent to a server.