Roman numeral converter

Convert a number to Roman numerals or Roman numerals to a number, from 1 to 3,999,999.

Input

A whole number, or a Roman numeral.

Result

Fill in the input and press Run.

Your input is processed in memory and then discarded. It is not stored or logged. Even so, don't paste live passwords or keys into any online tool.

Use it from code or an agent

curl -s https://setget.net/v1/tools/roman-numerals \
  -H 'Content-Type: application/json' \
  -d '{"input":{"value":"2026"}}'
import json, urllib.request

body = {'input': {'value': '2026'}}
request = urllib.request.Request("https://setget.net/v1/tools/roman-numerals", json.dumps(body).encode(),
                                 {"Content-Type": "application/json"})
print(json.load(urllib.request.urlopen(request))["result"])
const response = await fetch("https://setget.net/v1/tools/roman-numerals", {
  method: "POST",
  headers: {"Content-Type": "application/json"},
  body: JSON.stringify({"input":{"value":"2026"}}),
});
console.log((await response.json()).result);
Tool: run_tool
Arguments:
{
  "slug": "roman-numerals",
  "input": {
    "value": "2026"
  }
}
{
  "input": {
    "value": "2026"
  }
}

Endpoint: POST /v1/tools/roman-numerals. Over MCP: run_tool with slug: "roman-numerals". Machine-readable: input schema, Markdown. Connect an agent.

Inputs

NameTypeRequiredWhat it does
value string yes A whole number, or a Roman numeral.

Examples

Input
{
  "value": "2026"
}
Result
{
  "direction": "to_roman",
  "number": 2026,
  "roman": "MMXXVI",
  "overline": "MMXXVI"
}

Roman to number

Input
{
  "value": "MCMXCIV"
}
Result
{
  "direction": "to_number",
  "number": 1994,
  "roman": "MCMXCIV",
  "overline": "MCMXCIV"
}

Above 3,999

Input
{
  "value": "12345"
}
Result
{
  "direction": "to_roman",
  "number": 12345,
  "roman": "(XII)CCCXLV",
  "overline": "X̅I̅I̅CCCXLV"
}

Questions

How are numbers above 3,999 written?
With a line over a numeral, which multiplies it by 1,000. "roman" shows the overlined part in brackets, so (XII)CCCXLV is 12,345, and "overline" uses real overline marks, which not every font can display.
Why is IIII rejected?
Only the standard form is accepted, and the standard form of 4 is IV. The error tells you the standard spelling of the number you wrote.
Is there a Roman numeral for zero?
No. The system starts at I (1).