tuliq
Runs in your browser

Bounding Box Format Converter

Convert object detection annotations between YOLO, COCO, Pascal VOC, and VIA CSV — upload one file, pick the output format, and download the result. YOLO's normalized coordinates need the image's pixel size to convert correctly, which this tool asks for directly. Any region the target format can't represent (a circle/ellipse/polygon becomes its bounding box; a point/polyline has no bounding box and is left out) is clearly counted before you download, never silently dropped. Runs entirely in your browser — nothing is uploaded.

Format is detected automatically from the file's extension and content.

About this tool

This tool converts a single object-detection annotation file between YOLO, COCO, Pascal VOC, and VIA CSV — upload one, pick the format you need, and download the result. It exists because these four formats show up constantly across different ML frameworks and labeling tools that don't talk to each other: YOLOv5/v8 wants .txt files with normalized coordinates, COCO-format datasets (used by most PyTorch/TensorFlow pipelines) want one combined .json, Pascal VOC wants one .xml per image, and VIA (the free browser-based annotation tool) exports a single .csv. Converting between them by hand means writing a one-off script for every pair. One real wrinkle YOLO introduces: its coordinates are normalized 0–1 and the format never records the image's actual pixel size anywhere — so converting to or from YOLO (when the other side isn't also YOLO) needs the image's width and height, which this tool asks for directly rather than guessing or silently producing wrong boxes. Not every conversion is lossless either: YOLO, COCO, and Pascal VOC only understand rectangles, so a circle, ellipse, or polygon converts to its bounding box, and point/polyline regions have no bounding box at all and are left out entirely — the exact count is always shown before you download. VIA CSV is the only format that preserves every shape exactly. It runs entirely client-side — your file is read and converted locally in your browser and never uploaded anywhere.

Supported formats

  • YOLO (.txt) — One .txt file per image plus a classes.txt — normalized 0–1 coordinates, bounding boxes only. Needs the image's pixel size to convert to or from any other format.
  • COCO (.json) — A single combined .json — bounding boxes only, in absolute pixel coordinates, with width/height declared per image.
  • Pascal VOC (.xml) — One .xml file per image — bounding boxes only, in absolute pixel coordinates, with width/height declared.
  • VIA CSV (.csv) — A single combined .csv — the only format here that preserves every shape (rectangle, circle, ellipse, polygon, polyline, point) exactly as drawn, not just its bounding box.

What you can do

  • Convert between YOLO, COCO, Pascal VOC, and VIA CSV in any direction
  • Format is detected automatically — just upload and pick the output
  • One click to download the converted file (plus classes.txt for YOLO output)
  • Nothing is uploaded — the whole conversion happens locally in your browser

How to use

Step 1

Upload a file

Add a YOLO .txt, COCO .json, Pascal VOC .xml, or VIA CSV file — the format is detected automatically.

Step 2

Pick the output format

Choose which of the other three formats to convert it to. Add class names if YOLO is involved.

Step 3

Download

Get the converted file — you'll see the region count first, and a clear warning if anything can't survive the conversion.

Example

A YOLO annotation line like this one:

YOLO line

0 0.5 0.5 0.2 0.3

means class 0, centered at 50% of the image's width and height, spanning 20% of the width and 30% of the height. Converting this to COCO or Pascal VOC on a 1000×800px image produces a box at (400, 280) sized 200×240px — exactly what this tool computes for you, instead of you doing that math by hand.

How your data is handled

This tool is labeled 🟢 Browser: your file is read directly using your browser's File API, converted locally, and offered back as a download. It's never uploaded to a server, and nothing about it is retained once you leave the page.

Frequently asked questions

Why is it asking for the image's width and height?+

YOLO's coordinates are normalized 0–1 and the format never records the image's actual pixel size anywhere. Converting to or from YOLO (when the other side isn't also YOLO) needs that size to do the math correctly — enter it once and the conversion proceeds. Converting between COCO, Pascal VOC, and VIA CSV never needs this, since those formats already work in (or declare) absolute pixels.

Why does it say some regions will be left out?+

YOLO, COCO, and Pascal VOC only understand rectangles — a circle, ellipse, or polygon converts to its bounding box instead, and a point or polyline has no bounding box at all, so it's dropped entirely. VIA CSV is the only format that keeps every shape exactly as drawn. The exact count is always shown before you download, never silently.

What are the class names for, and when do I need them?+

YOLO stores classes as numeric indices, not names — the class names field resolves those indices to real names when YOLO is your input (leave blank to keep them as "Class 0", "Class 1", etc.), and sets the index order YOLO will write when YOLO is your output. It's not needed for COCO/Pascal VOC/VIA CSV, which all store real class names directly.

Why did I get two files for a YOLO export?+

YOLO's .txt file has no way to store class names — only the classes.txt companion (listing names in index order) does. Both are offered as separate downloads since that's how a real YOLO dataset expects them.

Why does it say my file is invalid?+

Check the file extension matches its actual content — a renamed file (e.g. a .json file that's really something else) will be detected as the wrong format. Otherwise, the error message names exactly what's missing.

Can I convert several files at once?+

Not in this tool — it's deliberately one file in, one file out, for speed and simplicity. For COCO/VIA CSV specifically (which can each describe many images in one file), you'll still only get the regions for images present in that single file.

Is my file uploaded anywhere?+

No — it's read, converted, and offered back as a download entirely in your browser using the File API. It never leaves your device.

Related tools