Skip to main content

Free tool

Pascal VOC XML to YOLO Converter

Convert Pascal VOC XML files or a ZIP archive of them into normalized YOLO TXT labels.

Convert annotation format
Pick the output format, then choose one or more files or a ZIP. Add the images too when the labels do not include image sizes, such as YOLO. The result downloads as soon as it is ready.
Downloads a ZIP with one file per image.

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

Ready to train YOLO models on modern infrastructure?

Label with AI, review with your team, and export or train.

Start free

Frequently asked questions

How are Pascal VOC boxes converted to YOLO?
VOC stores the top-left and bottom-right corners in pixels. The converter computes the box center, width, and height, then divides them by the image size from each XML file so the YOLO values fall between 0 and 1.
Can I upload many XML files at once?
Yes. Upload a ZIP archive or select several XML files. Up to 300 files, 10 MB per file, and 25 MB in total can be converted in one run.
How are class names handled?
Each VOC object name becomes a YOLO class. Classes get consecutive IDs starting at 0 in the order they first appear, and the ZIP includes classes.txt and data.yaml with the matching names.
Are my files uploaded?
The files you select are sent to LabelOp servers for processing, and the result comes back as a download. You do not need an account.