Grams to tsp converter
Ten grams of water make 2 teaspoons, because water weighs 1 g per milliliter and a metric teaspoon holds 5 ml. Enter the grams and your ingredient's density in grams per milliliter, and get the teaspoons. Free in your browser.
- Free
- Runs in your browser
- No sign-up
- Your data stays on your device
Run — free
Worked example
- Grams
- 10
- Density
- 1
- Result
- 2 tsp
- Converted
- 2
- Density unit
- g/ml
- Milliliters
- 10
A grams-to-teaspoons converter turns a weighed kitchen mass into spoons once you know how many grams occupy one milliliter of that ingredient. Grams measure mass; teaspoons measure volume; they only meet when density supplies milliliters per gram. Water is a common sanity check: one gram per milliliter yields two teaspoons for ten grams.
Why grams are not teaspoons until density is known
Grams measure mass. Teaspoons measure volume. Ten grams of water, ten grams of honey, and ten grams of table salt occupy different volumes because each ingredient has a different density, so a grams-to-teaspoons landing that hid a single default density would silently lie on every substance except the one it assumed.
The identity is volume equals mass divided by density when density is expressed as mass per unit volume. Here density is grams per milliliter, so milliliters equal grams divided by density. One metric teaspoon is defined as exactly five milliliters, the same factor used on nutrition labels, so teaspoons equal milliliters divided by five, or equivalently teaspoons equal grams divided by density times five.
That is the whole algorithm: two positive finite numbers, one multiply, one divide, then stable rounding. Callers must supply density because density is an ingredient property, not a unit factor between grams and teaspoons. Typical kitchen figures people already have include about one gram per milliliter for liquid water near room temperature, about one point four two grams per milliliter for pure liquid honey, and about zero point eight five grams per milliliter for spooned granulated sugar.
Those figures are examples only; this capability never looks up a material table and never guesses an ingredient from a name. If you only have a chart in grams per teaspoon, divide that chart value by five to obtain grams per milliliter before calling. Doubling the grams doubles the teaspoons and doubling the density halves the teaspoons, which is the check bakers use when a converted spoon count looks off by a factor of two.
Density of zero would divide by zero; negative density is not a physical liquid or powder property for this identity and is rejected rather than silently inverted.
Where grams-to-teaspoons conversion is used, and what this tool is not
Home bakers meet this conversion when a European formula lists grams of salt, vanilla, baking soda, or spice and the only measure in the drawer is a teaspoon, provided they already know that ingredient's grams per milliliter from a chart or a previous weigh-in. Bakery production sheets turn gram targets on a digital scale into leveled teaspoon marks on a dry scoop so a garnish or a leavener is dosed the same on every shift.
Culinary students use a documented identity for worksheet keys instead of opaque calculator apps that silently round a teaspoon of one powder to five grams one day and four the next. Product teams call the same contract from scripts to seed deterministic test vectors for recipe importers, to normalize user-entered gram fields before scaling a batch, or to satisfy programming-challenge statements that demand a documented density rather than a hand-waved spoon weight.
Prefer this landing when the search is grams to tsp, grams to teaspoons, or convert grams to tsp and you already have density in grams per milliliter. It is not a general volume-unit hub that turns milliliters into teaspoons without a mass, not a cups converter, not a baking-soda-only shortcut that hides four point six grams per teaspoon as a default, and not a water-only tool that hides one gram per milliliter as a default. Stay inside the absolute range so the quotient cannot overflow.
Pair the result with your own packing note if the density you used was scooped rather than leveled, and never treat this arithmetic as medical dosing advice: confirm the labelled density before you measure a drug or a supplement.
What you can do with it
Recipe cards that list grams but you only have a teaspoon
Turn a gram line for salt, spice, or extract into metric teaspoons using the ingredient density from your kitchen chart, then measure with a leveled spoon.
Bakery sheets from scale targets to spoon marks
Convert gram targets on a production scale into leveled teaspoon marks so a garnish or leavener is dosed the same on every shift without guessing water.
FAQ
What formula converts grams to teaspoons?
Teaspoons = grams ÷ (density × 5), when density is in grams per milliliter (g/ml) and one metric teaspoon is exactly five milliliters. The tool returns that quotient rounded to twelve decimal places, plus milliliters and substitution steps.
What happens if grams or density is zero or negative?
Volume = mass / density is undefined at zero density, and a non-positive mass or density is not a physical value for this identity. Failed tasks are not billed.
Is water assumed when converting grams to tsp?
No. Callers must supply the ingredient density in g/ml. Water is only a sanity check: about one gram per milliliter yields two teaspoons for ten grams.
US customary or metric teaspoon?
This converter uses the metric teaspoon of exactly five milliliters, the same factor used on nutrition labels. It does not apply the US customary teaspoon of 4.92892159375 ml.
Is the grams to tsp converter free?
The browser tool is free and runs locally.
Related tools
For developers — API access
Everything on this page is available programmatically. This section is for teams who want to wire it into their own systems; everyone else can just use the tool above.
API endpoint
Prefer to automate it? One authenticated POST creates the task; the result comes back by webhook or a signed link. The same capability also runs here on the web, by email and from Telegram — and soon from our app too.
Call it from your stack
curl -X POST https://api.kit.forhosting.com/cook/grams-to-tsp \
-H "Authorization: Bearer $KIT_KEY" \
-H "Content-Type: application/json" \
-d '{"grams":10,"density":1}'const res = await fetch("https://api.kit.forhosting.com/cook/grams-to-tsp", {
method: "POST",
headers: {
"Authorization": `Bearer ${process.env.KIT_KEY}`,
"Content-Type": "application/json"
},
body: JSON.stringify({
"grams": 10,
"density": 1
})
});
const { task_id } = await res.json();import os, requests
res = requests.post(
"https://api.kit.forhosting.com/cook/grams-to-tsp",
headers={"Authorization": f"Bearer {os.environ['KIT_KEY']}"},
json={
"grams": 10,
"density": 1
},
)
task_id = res.json()["task_id"]<?php
$res = file_get_contents("https://api.kit.forhosting.com/cook/grams-to-tsp", false, stream_context_create([
"http" => [
"method" => "POST",
"header" => "Authorization: Bearer " . getenv("KIT_KEY") . "\r\nContent-Type: application/json",
"content" => '{"grams":10,"density":1}',
],
]));
$task = json_decode($res, true);body := bytes.NewBufferString(`{"grams":10,"density":1}`)
req, _ := http.NewRequest("POST", "https://api.kit.forhosting.com/cook/grams-to-tsp", body)
req.Header.Set("Authorization", "Bearer "+os.Getenv("KIT_KEY"))
req.Header.Set("Content-Type", "application/json")
res, _ := http.DefaultClient.Do(req)Example request
{
"grams": 10,
"density": 1
}Example response
{
"task_id": "tsk_a1b2c3d4e5f6a1b2c3d4e5f6",
"type": "cook.grams_to_tsp",
"status": "queued",
"_links": {
"result": "/tasks/tsk_…/result"
}
}The API is asynchronous: the call returns a task_id immediately and the result arrives by webhook. Polling is capped at 1 req/s per task.
Pricing
Published price — no tokens, no invented credits. A failed task is never charged.
Limits
max_abs | 1000000000000 |
Errors
| HTTP | Code | Meaning |
|---|---|---|
401 | unauthorized | Missing or invalid API key. |
402 | insufficient_balance | Your balance doesn't cover the task price. |
404 | unknown_type | That task type doesn't exist. |
429 | rate_limited | Too many requests. Use the webhook instead of polling. |
Technical notes
Grams and density must be positive finite numbers: zero or negative values fail with invalid_input, which is not billed.
Why grams are not teaspoons until density is known
A missing density is likewise invalid_input: the converter will not pretend the ingredient is water.
Input contract, errors, and the response shape
Send a JSON body with two required finite numbers: grams, the strictly positive mass of the ingredient in grams, and density, the strictly positive density in grams per milliliter. Aliases g, mass, amount, and weight are accepted for the mass field; rho, density_g_ml, g_per_ml, g_ml, and grams_per_ml are accepted for density, so SDK clients and form posts can use the name that fits the product. This endpoint does not assume water, does not convert tablespoons or cups, and does not look up flour, sugar, salt, or baking soda by name. On success the response echoes rounded grams and density, sets density_unit to g/ml, sets milliliters to the intermediate volume, and sets teaspoons, tsp, result, and converted to the same rounded teaspoon magnitude. unit and to_unit are the token tsp, from_unit is g, ml_per_teaspoon is five, teaspoon_standard is metric, formula restates teaspoons equals grams divided by density times five, message is a short English summary, and steps is an ordered array of substitution lines. The stated product error is grams or density that is not a positive number: zero, negative, missing, empty, non-numeric, or non-finite values fail with invalid_input naming the field and are never charged. Pricing is a flat $0.002 per successful request with unit item. Pair the free page with the priced API when a pipeline must convert grams to teaspoons without re-implementing the density identity.
Where grams-to-teaspoons conversion is used, and what this tool is not
Failed tasks that return invalid_input do not consume prepaid balance, which keeps exploratory scripts cheap when a learner deliberately sends a zero density to see the error.
Integration use cases
Test fixtures and homework checks
Pin golden JSON for grams-to-tsp at a known g/ml density so browser and API arithmetic never drift, and so worksheet keys stay reproducible.