MARC Validator is a tool for validating bibliographic data in the MARC 21 format.
It focuses on validating coded MARC data fields — particularly the leader, fields 008, 040, 020, and date-related fields (008, 260, 264).
The tool takes into account cataloguing rules such as RDA and AACR2.
Its main goal is to identify errors that could cause issues during the transition to Linked Data, expected to become the standard for bibliographic data in the Czech Republic from 2028 onwards.
- Validation of MARC 21 bibliographic data in MARCXML format.
- Detection of structural and logical errors in coded fields.
- Output as JSON or a human-readable text report.
- Compatible with cataloguing standards (RDA, AACR2).
- Extensible plugin-based architecture.
- Command-line interface for integration into workflows.
A CLI tool for validating MARC records.
Implemented in the App::MARC::Validator project,
with validation logic in MARC::Validator.
marc-validator [-d] [-h] [-i id] [-l] [-o output_file] [-p] [-v] [--version] marc_xml_file..
| Option | Description |
|---|---|
-d |
Debug mode. |
-h |
Print help. |
-i id |
Record identifier defined by MARC field/subfield (default: 001, e.g. 015a). |
-l |
Print list of available plugins. |
-o output_file |
Save results to file (default: none). |
-p |
Pretty-print JSON output. |
-v |
Verbose mode. |
--version |
Print tool version. |
marc_xml_file.. |
Input MARC XML file(s). |
marc-validator records.xml
- JSON file written to standard output.
- For each plugin, a list of detected errors is included.
A CLI tool for generating human-readable validation reports.
Repository: App::MARC::Validator::Report
CPAN: App::MARC::Validator::Report
Both tools are implemented in Perl and can be installed from CPAN or via Docker.
- Install Perl interpreter:
- Debian:
apt-get install perl - Fedora:
dnf install perl-interpreter
- Debian:
- Install CPAN package manager:
- Debian:
apt-get install cpanminus - Fedora:
dnf install perl-App-cpanminus
- Debian:
- Install the tools:
cpanm App::MARC::Validator cpanm App::MARC::Validator::Report - Check help:
marc-validator -h marc-validator-report -h
Image: michaljosefspacek/marc-validator
Pull and run:
docker pull michaljosefspacek/marc-validator:0.04
Image: michaljosefspacek/marc-validator-report
Pull and run:
docker pull michaljosefspacek/marc-validator-report:0.01
Example datasets:
https://github.com/michal-josef-spacek/marc_validator_examples
- App::MARC::Validator
- App::MARC::Validator::Report
- Business::UDC
- Data::MARC::Field008
- Data::MARC::Leader
- Data::MARC::Validator::Report
- MARC::Field008
- MARC::Leader
- MARC::Leader::Utils
- MARC::Validator
- MARC::Validator::Filter
© 2025-2026 Michal Josef Špaček (mailto:michal.josef.spacek@gmail.com) Licensed under the BSD 2-Clause License.
Development of this software has been supported by the long-term strategic development of the National Library of the Czech Republic as a research organization,
funded by the Ministry of Culture of the Czech Republic (DKRVO 2024–2028, Area 11: Linked Open Data).