# Grams to Milligrams (g to mg)

> Convert grams to milligrams: 1 g = 1000 mg. Exact conversion factor, formula, 22-row table and worked examples, with JSON API and MCP access.

- Page id: `grams-to-mg` · Quantity: Mass (`mass`, base unit kg) · Tool: `convert_units`
- Canonical page: https://tttkmbb.com/conversion/grams-to-mg · This document: https://tttkmbb.com/conversion/grams-to-mg.md · JSON: https://tttkmbb.com/conversion/grams-to-mg.json (add `?value=` for a result)

## Formula

- `1 g = 1000 mg`
- `milligrams = grams × 1000`
- Reverse: `grams = milligrams × 0.001`

The factor follows from the SI definitions of both units (NIST SP 811); values below are rounded to 6 significant figures, the API returns up to 12.

## Worked examples

- 5 g = 5000 mg
- 12.5 g = 12500 mg
- 100 g = 100000 mg

## Conversion table

| Grams (g) | Milligrams (mg) |
| --- | --- |
| 1 | 1000 |
| 2 | 2000 |
| 3 | 3000 |
| 4 | 4000 |
| 5 | 5000 |
| 6 | 6000 |
| 7 | 7000 |
| 8 | 8000 |
| 9 | 9000 |
| 10 | 10000 |
| 15 | 15000 |
| 20 | 20000 |
| 25 | 25000 |
| 30 | 30000 |
| 40 | 40000 |
| 50 | 50000 |
| 75 | 75000 |
| 100 | 100000 |
| 200 | 200000 |
| 250 | 250000 |
| 500 | 500000 |
| 1000 | 1000000 |

## API

- `GET https://tttkmbb.com/api/v1/convert?value=5&from_unit=g&to_unit=mg` → unified JSON envelope with `result.values.result`, `formula`, `factor`, `sources`, `freshness`
- MCP: server `https://tttkmbb.com/mcp`, tool `convert_units` with `{"value":5,"from_unit":"g","to_unit":"mg"}`
- All mass units: https://tttkmbb.com/api/v1/units?quantity=mass · full converter: [Mass / Weight Converter](https://tttkmbb.com/conversion/mass.md)
- Authentication: none. Freshness: `static` (fixed conversion factors).

## FAQ

**How many milligrams are in one gram?**

1 g = 1000 mg. The factor comes from the SI definitions of both units (NIST SP 811 / BIPM), so it is exact or correct to at least 10 significant figures.

**What is the formula to convert grams to milligrams?**

Multiply the value in grams by 1000: milligrams = grams × 1000. For example, 5 g = 5000 mg.

**How do I convert milligrams back to grams?**

Multiply by the inverse factor 0.001 (grams = milligrams × 0.001), or use the milligrams-to-grams page.

## Related conversions

- [Milligrams to grams](https://tttkmbb.com/conversion/mg-to-grams.md) (reverse)
- [Kilograms to Pounds](https://tttkmbb.com/conversion/kg-to-lbs.md)
- [Pounds to Kilograms](https://tttkmbb.com/conversion/lbs-to-kg.md)
- [Grams to Ounces](https://tttkmbb.com/conversion/grams-to-oz.md)
- [Ounces to Grams](https://tttkmbb.com/conversion/oz-to-grams.md)
- [Kilograms to Stone](https://tttkmbb.com/conversion/kg-to-stone.md)
- [Stone to Kilograms](https://tttkmbb.com/conversion/stone-to-kg.md)
- [Pounds to Ounces](https://tttkmbb.com/conversion/lbs-to-oz.md)
- [Ounces to Pounds](https://tttkmbb.com/conversion/oz-to-lbs.md)

## Data Sources

- NIST Special Publication 811 – Guide for the Use of the International System of Units (SI), Appendix B conversion factors — https://www.nist.gov/pml/special-publication-811 (standard, retrieved 2026-09-24)
- BIPM – The International System of Units (SI Brochure, 9th edition) — https://www.bipm.org/en/publications/si-brochure (standard, retrieved 2026-09-24)
- Wikipedia – Conversion of units — https://en.wikipedia.org/wiki/Conversion_of_units (reference, retrieved 2026-09-24)
