# Unit converter

> Length, mass, temperature, and data sizes, with decimal and binary units kept apart.

Free unit converter for length, mass, volume, temperature, area, speed, and time, plus decimal data units (kB, MB) and binary data units (KiB, MiB). Set the number of decimal places.

- Page: https://benchline.fabwaseem.com/t/unit-converter
- Runs: in the browser. Input stays on the device.
- Price: free, no account
- Input: A category, a source unit, a target unit, a value, and a precision from 0 to 12.
- Output: The converted value and the same value in every unit of the category.
- Keywords: unit converter, mb to gb, celsius to fahrenheit
- Updated: 2026-10-18
- Built by: Waseem Anjum (https://fabwaseem.com)

## How to use it

1. **Pick a category.** Length, mass, volume, temperature, area, speed, time, or data. Decimal and binary data are separate.
2. **Choose the units.** Enter a value and the precision. Swap exchanges the two units.
3. **Read the whole category.** The selected result is on top. Every other unit in the category is listed under it.

## Use it from an AI agent

MCP tool name: `convert_units`
MCP endpoint: https://benchline.fabwaseem.com/mcp (Streamable HTTP, no key)
HTTP: POST https://benchline.fabwaseem.com/api/v1/tools/unit-converter with the input as the JSON body
This call does not fetch anything. It runs on the arguments you send.

Convert length, mass, volume, temperature, area, speed, time, and data size. Decimal bytes (kB, MB) and binary bytes (KiB, MiB) are separate categories.

### Input schema

```json
{
  "type": "object",
  "properties": {
    "category": {
      "type": "string",
      "enum": [
        "length",
        "mass",
        "volume",
        "temperature",
        "area",
        "speed",
        "time",
        "data-decimal",
        "data-binary"
      ]
    },
    "from": {
      "type": "string",
      "description": "Source unit id, such as m, C, MB, or MiB."
    },
    "to": {
      "type": "string",
      "description": "Target unit id from the same category."
    },
    "value": {
      "type": [
        "string",
        "number"
      ]
    },
    "precision": {
      "default": 6,
      "type": "integer",
      "minimum": 0,
      "maximum": 12
    }
  },
  "required": [
    "category",
    "from",
    "to",
    "value",
    "precision"
  ],
  "additionalProperties": false
}
```

### Example tools/call

```json
{
  "jsonrpc": "2.0",
  "id": 1,
  "method": "tools/call",
  "params": {
    "name": "convert_units",
    "arguments": {
      "category": "length",
      "from": "example",
      "to": "example",
      "value": "example",
      "precision": 6
    }
  }
}
```

Setup for Claude, Cursor, and VS Code: https://benchline.fabwaseem.com/mcp/guide

## Questions

### What is the difference between MB and MiB?

A decimal megabyte is 1,000 kilobytes. A binary mebibyte is 1,024 kibibytes. They are separate categories so a file size is not silently converted with the wrong base.

### How precise is a length conversion?

Metric steps such as meters to centimeters are exact. Imperial ratios come from the convert-units tables, then the result is rounded half up to the precision you set.

### Can temperature be negative?

Yes. Data sizes cannot. Zero Celsius is 32 Fahrenheit, and zero kelvin is −273.15 Celsius.

## Related tools

- [Percentage calculator](https://benchline.fabwaseem.com/t/percentage-calculator): Percent of, percent change, reverse percent, and margin, with the formula shown.
- [Date difference calculator](https://benchline.fabwaseem.com/t/date-difference): Count the days, weeks, and business days between two dates.
- [Color converter](https://benchline.fabwaseem.com/t/color-converter): Turn any color into HEX, RGB, HSL, OKLCH, and CMYK, and check the contrast ratio.
- [Unix timestamp converter](https://benchline.fabwaseem.com/t/unix-timestamp): Turn epoch seconds or milliseconds into a date, and a date in any time zone back into epoch time.
