Desktop app · Python

XML files to JSON, a folder at a time

A simple desktop app that converts XML files to JSON, so the data in them is easy to use anywhere, web apps above all. It converts one file, or every file in a folder.

The JSON is saved in a JSON Conversions folder beside what you chose.

Source code
The XML to JSON Converter window after converting the example file: the message "Conversion finished." above the Browse File and Browse Folder buttons.

What it does

One file

Pick an XML file and get its JSON.

A whole folder

Pick a folder and every XML file in it is converted.

Next to the source

Results go to a JSON Conversions folder in the same place as the input.

An example

A sample People.xml and its People.json come in the example folder.

Packable

Can be built into a Windows executable with cx_Freeze, and shrunk with UPX.

Run it

uv installs Python 3.12 and the dependencies (PyQt6, lxml, chardet, xmltodict). Then select a file or folder in the window.

uv sync
uv run python main.py

How it was made

An experiment from March 2023: the first version was drafted with ChatGPT (GPT-3.5), refactored against a list of programming principles, then refactored again with GPT-4 and tagged v1.3. It has been maintained by hand since.

Privacy

Nothing leaves your machine: the app makes no network requests. It stores only the JSON it writes, beside your input, and keeps no settings or history. XML is parsed with lxml; as with any parser, open files you trust.

This page stores only your light or dark choice, whether you hid the intro, and your answer to the notice, all on this device.