The goal of MARC4J is to provide an easy to use Application Programming Interface (API) for working with MARC and MARC XML in Java. MARC stands for MAchine Readable Cataloguing and is a widely used exchange format for bibliographic data. MARC XML provides a loss-less conversion between MARC (MARC21 but also other formats like UNIMARC) and XML.

The structure of a MARC record is defined in the ISO 2709:1996 (Format for Information Exchange) standard (or ANSI/NISO Z39.2-1994, available online from NISO). The MARC4J API is not a full implementation of the ISO 2709:1996 standard. The standard is implemented as it is used in the MARC formats.

MARC4J provides readers and writers for MARC and MARC XML. A {@link org.marc4j.MarcReader} implementation parses input data and provides an iterator over a collection of {@link org.marc4j.marc.Record} objects. The record object model is also suitable for in-memory editing of MARC records, just as DOM is used for XML editing purposes. Using a {@link org.marc4j.MarcWriter} implementation it is possible to create MARC or MARC XML. Once MARC data has been converted to XML you can further process the result with XSLT, for example to convert MARC to MODS.

Although MARC4J is primarily designed for Java development you can use the command-line utilities {@link org.marc4j.util.MarcXmlDriver} and {@link org.marc4j.util.XmlMarcDriver} to convert between MARC and MARCXML. It is also possible to pre or post process the result using XSLT, for example to convert directly from MODS to MARC or from MARC to MODS.

The source code is published under version 2.1 of the GNU Lesser General Public License. In brief, this means there is no warranty and you can do anything you like with it. The text of the license is included in the distribution. If you make changes to MARC4J and redistribute those changes, then you must publish your modified version under the LGPL.

For more information about the MARC4J project visit https://github.com/marc4j/marc4j.