Converters
Dataset Converters
Convert object-detection labels between COCO JSON, YOLO txt, and Pascal VOC XML in the browser. Files stay on your machine.
How it works: COCO uses pixel xywh boxes and category ids. YOLO uses class index plus normalized cx, cy, w, h. VOC uses xmin/ymin/xmax/ymax XML per image (inclusive corners: width = xmax − xmin + 1). YOLO uploads need image size because the txt files do not store resolution.
Learn about this tool
What it is, when to use it, formulas, and common questions
What is this?
Converts object-detection annotations between COCO JSON, YOLO txt, and Pascal VOC XML. Conversion runs in the browser so training labels never leave your machine.
When do engineers use it?
Use it when a training pipeline expects a different format than your labeling tool exported — for example COCO from Roboflow into Ultralytics YOLO, or YOLO into an older VOC-based toolchain.
Formula
COCO bbox = [x, y, width, height] in pixels YOLO line = class_id cx cy w h (normalized 0–1, center format) VOC bndbox = xmin ymin xmax ymax in pixels cx = (x + width/2) / image_width YOLO class_id is 0-based; COCO category_id is usually 1-based
Example
A 100×40 px box at (20, 10) on a 640×480 image becomes YOLO: class 0.109375 0.0625 0.15625 0.083333 (center 70, 30 → 70/640, 30/480).
FAQ
- Do my files get uploaded?
- No. Parsing and conversion run in your browser. Download the JSON or zip locally. There is no server-side dataset store.
- Why do YOLO files need image width and height?
- YOLO txt lines are normalized and do not include resolution. COCO and VOC need pixel boxes, so you must provide the image size used when the labels were created.
- Is segmentation or keypoints supported?
- This converter handles bounding boxes only. Polygons, RLE masks, and keypoints are ignored. Crowd annotations in COCO are skipped.
- How are class ids mapped?
- YOLO uses 0-based class indices in the same order as classes.txt. COCO and VOC use category names and (usually 1-based) ids. Include classes.txt or a .names file with YOLO uploads when you can.