Hey everyone!
I just finished building a web tool to help validate Magic: The Gathering decklists in any custom format. It fetches card data from Scryfall, checks for banned or illegal cards, and gives instant feedback right in your browser.
It’s perfect for experimenting with niche formats, casual play, or even building decks for some existing formats like Standard Penny Dreadful, 2015 Modern, Classic Legacy, Pre Fire Modern, Pre Horizons Modern, Pre Modern. It can also integrate with Moxfield for deck building.
Check it out here: https://git.disroot.org/hirrolot19/mtg-legality-checker
I’d love to hear your thoughts, suggestions, or ideas for improving it. Hope it helps deckbuilders and casual players alike!
This tool isn’t really needed given that there are multiple websites, where you can upload your collection and your deck, and they will tell you exactly which cards in the deck are missing from your collection.
For example:
- Archidekt — collection tracker + deck builder
- Moxfield — modern deck builder with collection support
- Deckstats — deck-building + collection management
- Deckbox — collection manager that shows missing cards for a deck
- ManaBox — app for collection tracking + deck building
- MTGGoldfish — has features to input your collection and compare against decks
- Untapped.gg — for MTG Arena, tells you which decks you can build given your collection
So while a custom format legality checker is neat, if your goal is simply “which cards do I lack in this deck given my collection”, one of those sites will do just fine.
Nice!
I don’t have a need for it, but I’m happy it exists!
MTG Deck Legality Web Checker
A simple web tool for validating Magic: The Gathering decklists in a custom format.
Inspiration
This project was inspired by several sources:
- Badaro’s Validator GitHub, a simple web tool for checking card lists in “nostalgia” Magic the Gathering formats: https://badaro.github.io/validator
- Penny Dreadful, an unofficial, budget-friendly MTG Constructed format where only cards costing 0.02 tix or less are legal. Decks are 60 cards with a 15-card sideboard, promoting creative play with inexpensive cards.
- Heirloom Constructed, a fan-created format combining Legacy-style interactions with price caps. Cards are legal based on current prices, with different caps for mythics, rares, uncommons, and commons. The format rotates weekly after new Standard set releases, providing a dynamic but affordable competitive environment.
Features
- Automatic setup: Downloads Oracle bulk-data from Scryfall and builds legality files on first run.
- Custom format validation: Checks decks for banned or out-of-format cards.
- Browser interface: Paste a decklist, click Validate, and view results instantly.
Installation
It is recommended to use a virtual environment to keep dependencies isolated.
1. Clone the Repository
git clone https://git.disroot.org/hirrolot19/mtg-legality-checker.git cd mtg-legality-checker2. Create and Activate a Virtual Environment
python -m venv venv source venv/bin/activate3. Install Dependencies
pip install -r requirements.txt
Running the App
From the project root (with the virtual environment activated):
python app.pyThen open your browser and navigate to:
http://127.0.0.1:5000/First Run Behavior
On first launch, the app will:
- Download Scryfall’s Oracle card data.
- Filter legal cards for the custom format based on a Scryfall query. Default query is f:standard usd<=1 tix<=0.1
- Convert the filtered data into a validation JSON file.
This process may take a few minutes.
Once complete, cached files are stored persistently for future sessions.
Using the Web Checker
- Paste your decklist into the text box.
- Click Validate.
- The app displays any cards that are banned or not legal in the format.
Decklist Rules
- One card per line.
- Quantities accepted (
4 Lightning Bolt,2x Opt). - Comments start with
#. - “Deck” or “Sideboard” headers ignored.
Advanced Usage
For detailed information about the supporting scripts and command-line tools, see
tools/README.md.


