What is XML / TOML Converter?
XML and TOML Converter connects hierarchical configuration through an explicit mapping: attributes use @attributes, text uses #text, and repeated elements become arrays. DTD and ENTITY declarations are rejected, TOML import requires one root key, and comments, namespaces, mixed content, dates, and source layout are documented as lossy areas. Common workflows include the following. Migrate simple XML configuration to TOML. Generate XML for a legacy consumer. Review attributes, text, and repeated elements. The page also documents input boundaries, output behavior, and practical cautions so you can review the result before putting it into an application, configuration, test, or production workflow.
When to use it
- Migrate simple XML configuration to TOML.
- Generate XML for a legacy consumer.
- Review attributes, text, and repeated elements.
How to use it
- Choose the XML or TOML direction.
- Confirm TOML has one key for the XML root.
- Use @attributes and #text for attributes and text.
- Convert and review structural-loss warnings.
- Manually verify namespaces and mixed content.
- Load one of the realistic examples first to verify the selected options and processing direction before replacing it with your own data.
Runnable examples
The “Example 1” and “Example 2” buttons load the matching inputs. They cover different structures, directions, or boundaries and can be run directly in the workspace.
Example 1
<site lang="zh-CN"><name>JSONLane</name><release><tools>50</tools><ready>true</ready></release></site>Example 2
[site]
name = "JSONLane"
[site.release]
tools = 50
ready = trueInput rules
- XML cannot contain DTD or ENTITY.
- TOML to XML requires one root key.
- Attributes and text use @attributes and #text.
- Text input is counted before processing and is limited to 1,000,000 characters on this page; file modes apply the separate file limit shown in the workspace.
- TOML to XML requires exactly one root key.
Output rules
- Repeated XML elements become arrays.
- Attributes enter @attributes.
- Namespaces and mixed content require review.
- Output reflects only the current input, direction, and options; rerun after changing a mode or value instead of treating an earlier result as current.
- XML comments, instructions, namespaces, and mixed content are not guaranteed.
Limitations and cautions
- TOML to XML requires exactly one root key.
- XML comments, instructions, namespaces, and mixed content are not guaranteed.
- TOML comments, date types, and source layout are normalized.
How your data is handled
All parsing, format conversion, Base64 work, and intermediate data remain in the current browser tab. JSONLane does not upload the input or retain it after refresh or close.