XML to JSON
Paste XML or open an .xml file (RSS, sitemap, an export from any program) and get JSON at once. Attributes become @name keys, repeated elements become arrays, and a mistake in the XML is shown with its line and column. It runs in your browser; nothing is sent anywhere.
Getting the tool ready…This tool needs JavaScript. If you still see this after a few seconds, JavaScript is switched off in your browser or the page did not load completely: turn JavaScript on or reload the page.
How to use it
- Paste XML in the left box, or choose an .xml file.
- Pick the options: guess number types or not, when repeated elements become arrays, keep or strip namespaces.
- Press "Copy" or "Download .json".
Good to know
- The rules: you get
{"root name": …}; attributes are@namekeys; the text of an element that also has attributes or child elements is#text; an element with nothing in it is"". They are the rules of JSON to XML, so you can go back. - Type guessing is off by default, because a phone number like 0812345678 or a code like 0012 must stay text. Even when it is on, a number with a leading 0 stays text.
- Spaces around text are trimmed and space-only text is dropped. CDATA becomes plain text. Comments and
<?…?>instructions are dropped. - For safety no DTD or outside file is ever loaded, and XML that declares its own ENTITY in a DOCTYPE is refused (it can blow up to freeze the machine). Only the five standard entities and numeric ones like
กwork; HTML's is not XML and is reported. - Nesting deeper than 1,000 levels is refused. Files of tens of MB take a few seconds and can be heavy for a phone.
Your data stays on your device
Everything happens in your browser. Your text and files are not sent to freesabai's server or anywhere else, and nothing is stored in the browser. The site counts only that someone opened this page and pressed copy or download (not what was in it; you can turn counting off at the bottom of the site, see the privacy policy).
Report a problem or suggest something
Found an XML file that does not convert or comes out wrong? Tell us on the feedback page, no sign-up.
More file converters
Thai text files
Subtitles
ZIP and TAR archives
- Unzip with Thai file namesZIPs from Thai Windows whose names show as garbage: extract or re-zip readable
- Extract ZIP filesOpen a ZIP, browse its folders, save files or extract to a folder, password ZIPs too
- Create a ZIP filePut files or a whole folder in a ZIP, with an AES-256 password if you like
- Open TAR, TAR.GZ, TGZ and GZOpen .tar.gz, .tgz, .tar or .gz files: save each file or all as a ZIP
- Create a TAR.GZ filePack files or a folder into .tar.gz or .tar, or gzip one file to .gz
Images
- SVG to PNG, JPG, WebPSVG to PNG at any size, transparent or coloured background, many files at once
- Favicon and ICO generatorA favicon.ico with several sizes, and the full icon set with the code
- GIF to framesSplit a GIF into PNG frames with their delays, one by one or as a ZIP
- GIF maker from imagesMake an animated GIF from pictures: order, delays, size and loops
- BMP and TIFF converterTIFF to JPG or PNG, BMP to PNG, and pictures to BMP or TIFF
Excel and Word files
- Excel to CSV / JSONOpen an xlsx, pick a sheet, get a CSV that keeps Thai intact or JSON; every sheet in one ZIP
- CSV / JSON to ExcelA real xlsx: leading zeros and Thai kept, several files as several sheets
- Word to text / HTMLOpen a docx, get plain text, HTML or Markdown with headings, lists, tables, links and pictures
HTML, Markdown, JSON and XML
- HTML / Word / Google Docs to MarkdownPaste from Word, Google Docs or a web page and get Markdown with tables and lists
- Markdown to HTMLA .md file as a readable .html page or just the content
- JSON to XMLSet the root name; @name keys become attributes; Thai keys work
- XML to JSONRSS, sitemaps or exports to JSON, with the line of any mistake
Contacts and calendars
Questions and answers
Why do phone numbers and codes with a leading 0 stay text?
So the leading 0 is not lost. Type guessing is off by default, and even when it is on, a number starting with 0 stays text.
Why is some XML refused?
Broken XML is reported with the line and column. A file that declares its own ENTITY in a DOCTYPE, or nests deeper than 1,000 levels, is refused so it cannot freeze the device.
Can it open Thai XML in TIS-620?
Yes. When the file header names an encoding such as TIS-620 or windows-874, the tool reads it that way. UTF-8 and UTF-16 work too.
Rate this tool
Tap the stars, then add a word if you like
Thank you! Your rating helps make the tool better
No sign-up. No name or e-mail is kept; a comment is kept for 3 months · Details