Truncate XML
Loop over an XML document and truncate long element names, attribute values and text to a chosen length. Keep structure intact while shortening content.
Input
Output
About Truncate XML
Truncate XML walks every node of a document and shortens element names, attribute values and text content that exceed a maximum length, appending a configurable suffix. The XML structure and quoting stay valid.
Features
How to Use
Examples
With max length 6, the sample text "Wireless Mouse" becomes "Wireles…".
Benefits
Frequently Asked Questions
Is my XML sent to a server?
No. Everything runs locally in your browser. Your data is never uploaded, stored or logged.
Can I download the result?
Yes — use the Download button below the output area, or Print / Save PDF for a printable copy.
More XML Tools
View AllValidate XML
Free XML validator that checks a document for well-formedness and repo...
Convert XML to JSON
Free XML to JSON converter that maps elements, attributes, text and re...
Convert BXML to XML
Decode a BXML byte stream (hex, base64 or binary string) back into a r...
Replace XML Values
Replace XML values (text content and attribute values) that match a pa...
Convert XML to XLS
Convert an XML file into Excel-ready SpreadsheetML (.xls XML format). ...