JSON to XML
Paste JSON or open a .json file and get XML with the <?xml version="1.0" encoding="UTF-8"?> header at once. Keys starting with @ become attributes, arrays become repeated elements, and keys that cannot be XML names are fixed and listed. 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 JSON in the left box, or choose a .json file.
- Set the root name and the array item name if you like (by default
rootanditem). - Press "Copy" or "Download .xml".
Good to know
- The rules: an
@namekey is an attribute, a#textkey is the element's text, an array is the same element repeated, and an array inside an array uses the item name (item). They are the rules of XML to JSON. - When the top of the JSON is an object with a single key, that key is the root (the root name you set is not used), so a round trip gives back the same thing.
- Thai key names are valid XML element names. Keys with spaces, a leading digit or symbols are fixed with
_, and the tool lists which. - & < > " ' are escaped. Control characters XML does not allow are removed and counted. null and empty arrays have no value in XML (they come back as
""or not at all); numbers and true/false become text. - The JSON must be standard (no comments, no trailing commas); a mistake is shown with its line and column. To format or repair JSON first, use the JSON formatter.
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 JSON that 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
How do I make a JSON key an XML attribute?
Start the key with @, for example "@id": "7" gives id="7". A #text key is the text inside the element.
Why were some key names changed?
An XML element name cannot start with a digit or contain spaces, so the tool puts an underscore there and lists which keys changed. Thai names are fine.
Can I convert the XML back to JSON?
Yes, with the XML to JSON tool, which uses the same rules. Turn on type guessing if numbers should come back as numbers.
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