XML to Magic Converter

Transform XML data into Magic: The Gathering deck format

About XML to Magic Converter

Convert XML data to Magic: The Gathering deck format. Perfect for managing card collections, building decks, and exporting to deck-building applications and online platforms.

Key Features

  • Automatic Parsing: Intelligently extracts card data from XML structure
  • Column Mapping: Specify which columns contain quantity and card name
  • Standard Format: Generates the widely-used "Quantity CardName" format
  • Flexible Input: Works with various XML structures and element names
  • Attribute Support: Can use XML attributes as data sources
  • Error Handling: Clear error messages for invalid data

How to Use

  1. Input XML Data: Paste your XML data or upload an .xml file
  2. Configure Columns: Specify the column names for quantity and card name
  3. Copy or Download: Copy the deck list or download as .txt file
  4. Import to Apps: Use the output in MTG Arena, MTGO, or other deck builders

Magic Deck Format

The standard Magic: The Gathering deck format is simple:

Quantity CardName
4 Lightning Bolt
3 Counterspell
20 Island

Example Conversion

XML Input:

<?xml version="1.0"?>
<deck>
  <card>
    <quantity>4</quantity>
    <name>Lightning Bolt</name>
    <set>Alpha</set>
  </card>
  <card>
    <quantity>3</quantity>
    <name>Counterspell</name>
    <set>Alpha</set>
  </card>
  <card>
    <quantity>20</quantity>
    <name>Island</name>
    <set>Basic</set>
  </card>
</deck>

Magic Deck Output:

// Magic: The Gathering Deck Format
// Format: Quantity CardName

4 Lightning Bolt
3 Counterspell
20 Island

Column Configuration

  • Quantity Column: The XML element/attribute containing the card quantity (default: "quantity")
  • Card Name Column: The XML element/attribute containing the card name (default: "name")
  • Case Insensitive: Column names are matched case-insensitively
  • Fallback: If columns not found, uses first two columns automatically

Supported Platforms

The generated deck format is compatible with:

  • MTG Arena: Import decks directly into the game
  • Magic Online (MTGO): Use for online play
  • Deck Builders: Archidekt, Moxfield, TappedOut, EDHRec
  • Collection Managers: Deckbox, TCGPlayer, CardKingdom
  • Spreadsheets: Easy to import into Excel or Google Sheets

Supported XML Structures

  • Repeating Elements: Automatically detects common record names (card, row, record, item, entry)
  • Nested Elements: Extracts child element values
  • Attributes: Can use XML attributes (prefix with @)
  • Mixed Content: Handles various XML structures

Common Use Cases

  • Deck Building: Convert card databases to deck lists
  • Collection Management: Export collections to standard format
  • Tournament Prep: Prepare deck lists for events
  • Deck Sharing: Share decks with friends and online communities
  • Inventory: Track card inventory and quantities
  • Trading: Create trade lists in standard format

Tips for Best Results

  • Consistent Naming: Use consistent element names across all cards
  • Valid Quantities: Ensure quantity values are numbers
  • Complete Names: Use full, official card names
  • Check Output: Verify the output before importing to apps

FAQ

  • Which deck formats and platforms does the output work with?

    The generated list follows the common Quantity CardName format used by many deck tools, including MTG Arena (when pasted into the deck import dialog), Magic Online (MTGO), popular web-based deck builders like Archidekt and Moxfield, and many local management tools. Some platforms may require sideboards or commanders to be specified separately, so always verify import instructions for your target platform.

  • What if my XML uses different tag names for quantity and card name?

    You can configure the quantity and card name column names in the input panel. The tool matches these names case-insensitively against the XML child elements or attributes in each record. If it cannot find matching fields, it falls back to using the first two columns as quantity and name, and annotates the output with a comment to that effect. Make sure your XML’s field names line up with the values you enter in the settings.

  • How are invalid or missing quantities handled?

    If a quantity is missing or empty for a row, the tool defaults to 1 for that card. If the card name is missing, that row is skipped entirely. This ensures that the output remains syntactically valid for most deck importers, but you should review the list if you know some quantities may be incomplete or dynamically derived in your source data.

  • Can I use this tool for formats like Commander, Pauper, or custom rules?

    The tool itself is format-agnostic: it simply lists quantities and card names. Format legality, singleton rules (Commander), rarity restrictions (Pauper), and other deck-building rules are enforced by the platform or your own review, not by the converter. You can still use the generated list as a base and then adjust counts or card selections to meet the requirements of your chosen format.

  • Is my deck data kept private when using this converter?

    Yes. All XML parsing and deck list generation run entirely in your browser. The tool does not upload your card list or XML to any external server, which means you can safely convert private collections, test lists, or unreleased deck ideas without exposing them online.

Privacy & Security

All conversions happen locally in your browser. Your XML data is never uploaded to any server, ensuring complete privacy and security.