Skip to content

Format Detective

Detect whether text is JSON, YAML, XML, CSV, TOML, INI or a Markdown table, with confidence scores, and convert it. Also available as a REST API.

Format Detective

Convert to:

Detected CSV, 80% confidence

Detected:
CSV80%delimiter: ,, rows: 4, columns: 3
Input95 chars · 4 lines
JSON output242 chars
[
  {
    "name": "Alice",
    "age": "30",
    "email": "alice@example.com"
  },
  {
    "name": "Bob",
    "age": "25",
    "email": "bob@example.com"
  },
  {
    "name": "Charlie",
    "age": "35",
    "email": "charlie@example.com"
  }
]

Updated . Provided as is. Check the output before you rely on it in production.

How to use Format Detective

  1. 1

    Paste or type your data

    Enter data into the input area or click a sample button (JSON, YAML, XML, CSV, TOML) to load example content. Detection runs automatically as you type.

  2. 2

    Review detected formats

    Check the detection bar for ranked format matches with confidence percentages. The highest-confidence format is highlighted. Multiple formats may match if the data is valid in more than one grammar.

  3. 3

    Convert to another format

    Select a target format from the dropdown and click Convert. The converted output appears in the right panel, ready to copy or download.

  4. 4

    Copy or download the result

    Use the copy button to copy converted output to your clipboard, or the download button to save it as a file with the correct extension.

Questions and answers

What is Format Detective?
Format detection identifies what kind of structured text you have by testing it against each format's rules. This tool scores input as JSON, YAML, XML, CSV, TOML, INI or a Markdown table, ranks the matches by confidence, and converts it to JSON, YAML, XML or CSV.
How does format detection work?
The detector parses your input against each format's grammar rules and assigns a confidence score (0–100%). Multiple formats may match — for example, valid JSON is also valid YAML — so results are ranked by confidence.
Which format conversions are supported?
In the browser, any detected format can be converted to JSON, YAML, XML or CSV. The REST API's /convert/ endpoint also outputs TOML and Markdown tables. Conversion goes through JSON, so the source must parse to a JSON-compatible structure.
Is my data sent to a server?
No. All detection and conversion runs entirely in your browser. Nothing is uploaded. You can also use the free REST API at aidevhub.io/api/format-detective/ for server-side detection and conversion.
Can I use this programmatically?
Yes. The Format Detective REST API at aidevhub.io/api/format-detective/ offers /detect/ and /convert/ endpoints, with no API key required and CORS enabled.

REST API

Base URL

https://aidevhub.io/api/format-detective/

No authentication, fair use. Abusive traffic is throttled at the edge; responses carry no quota headers. CORS enabled. OpenAPI spec

Endpoints

GET /api/format-detective/detect/ Detect the format of input data
GET /api/format-detective/convert/ Convert data between formats

Example

curl "https://aidevhub.io/api/format-detective/detect/?input=%7B%22name%22%3A%22test%22%7D"

Example Response

{
  "detected": "json",
  "confidence": 1
}
For AI agents: how to call this tool

Machine-readable contract, endpoints and examples. Humans can ignore this section.

Best Path For Builders

Dedicated API endpoint

Deterministic outputs, machine-safe contracts, and production-ready examples.

Dedicated API

https://aidevhub.io/api/format-detective/detect/

OpenAPI: https://aidevhub.io/api/openapi.yaml

GET /api/format-detective/detect/ GET format-detective/detect
POST /api/format-detective/detect/ POST format-detective/detect