Skip to main content
Free Browser ToolFast XML parser

Pascal VOC XML to YOLO Converter

Convert legacy Pascal VOC XML annotations (`<xmin>, <ymin>, <xmax>, <ymax>`) into modern YOLO TXT format (`class_id x_center y_center width height`). Upload individual XML files or a ZIP archive for immediate batch conversion.

Convert annotation format
Upload one annotation file and download it in a different format.

One file only

COCO JSON, YOLO TXT (ZIP), Pascal VOC XML, CVAT XML, LabelMe JSON, CSV, TSV, or JSONL.

Quick conversions

Understanding the VOC to YOLO Coordinate Conversion

Pascal VOC XML (Corners in Pixels)

VOC specifies min/max corners in absolute pixel space:

<bndbox>
  <xmin>100</xmin>
  <ymin>150</ymin>
  <xmax>300</xmax>
  <ymax>450</ymax>
</bndbox>

YOLO TXT (Center + Width/Height Normalized)

YOLO calculates normalized center and box dimensions:

# width = (xmax - xmin) / img_w
# height = (ymax - ymin) / img_h
# x_center = (xmin + xmax) / (2 * img_w)
# y_center = (ymin + ymax) / (2 * img_h)
0 0.312500 0.500000 0.312500 0.500000

Features & Capabilities

  • Automatic Image Dimension Extraction: Reads <size> tags inside XML.
  • Consistent Class Indexing: Creates deterministic zero-based class IDs.
  • Batch Processing: Upload multiple XMLs or a single ZIP file.
  • Private & Secure: Executes locally inside your browser's JS engine.

Ready to train YOLO models on modern infrastructure?

LabelOp provides an end-to-end computer vision workspace with model training and active learning.

Try LabelOp Free