Volume converter
Move a recipe, a packing list or a lab procedure between metric and US volume units: one US gallon is 3.785411784 liters, and every conversion passes through liters so the answer matches in both directions. Free in your browser.
- Free
- Runs in your browser
- No sign-up
- Your data stays on your device
Run — free
Worked example
- Numeric volume to convert
- 1
- Source unit
- L
- Target unit
- Gal
- Result
- 0.2641720524
- From label
- liter
- To label
- US gallon
- Liters
- 1
A volume converter turns a quantity written in one capacity unit into another without hunting conversion tables or rewriting spreadsheet formulas.
Supported units and how the conversion is computed
The converter accepts seven volume families under stable canonical codes: L for liter, mL for milliliter, gal for the US liquid gallon, qt for the US liquid quart, pt for the US liquid pint, m3 for the cubic meter, and ft3 for the cubic foot.
Factors follow SI definitions and NIST US liquid measures: one US gallon is 3.785411784 liters (exactly two hundred thirty-one cubic inches), quarts and pints are one quarter and one eighth of that gallon, one milliliter is one thousandth of a liter, one cubic meter is one thousand liters, and one cubic foot uses the international foot of exactly zero point three zero four eight meters.
Because the intermediate is always liters, converting A to B and B to A is consistent up to the published rounding of twelve decimal places, and there is no pairwise matrix that can drift out of sync. UK imperial gallons and dry measures are intentionally out of scope so kitchen, lab, and logistics users who expect US liquid capacity get predictable results.
Where a quick volume conversion helps
Use the free in-browser volume converter when you need a quick liters-to-gallons or cubic-feet-to-cubic-meters check while reading a recipe, packing list, shipping quote, or lab procedure. Open the page, enter the number and units, and copy the result without installing a spreadsheet, a unit library, or a desktop calculator pack. Source inputs follow the same retention rules as other KIT parse items, and results are safe to cache because the algorithm is fully deterministic.
Authors shipping mobile apps or chatbots can map the result and formula fields directly into cards that show both the number and the conversion path students, cooks, and operators expect on paper.
What you can do with it
Recipes and food service
Convert milliliters to US cups-scale pints and quarts, or liters to gallons, so a single recipe database serves metric and US kitchens without manual factor tables.
Shipping and warehousing
Translate cubic meters and cubic feet for packing density, container planning, and freight quotes when suppliers mix SI and US customary volume labels.
FAQ
Which volume units does this converter support?
Liters (L), milliliters (mL), US liquid gallons (gal), quarts (qt), pints (pt), cubic meters (m3), and cubic feet (ft3).
Are gallons US or UK?
US liquid gallons only (3.785411784 L). Imperial UK gallons and dry measures are not supported so results stay unambiguous for US liquid capacity.
How do I convert 1 liter to gallons?
The response result field is the equivalent volume in US gallons, plus liters intermediate and a readable formula.
What happens if I send an unknown unit?
The message names the field and lists supported units. Validation failures are not charged.
Is the volume converter free?
The browser tool runs free on your device.
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/conv/volume \
-H "Authorization: Bearer $KIT_KEY" \
-H "Content-Type: application/json" \
-d '{"value":1,"from":"L","to":"gal"}'const res = await fetch("https://api.kit.forhosting.com/conv/volume", {
method: "POST",
headers: {
"Authorization": `Bearer ${process.env.KIT_KEY}`,
"Content-Type": "application/json"
},
body: JSON.stringify({
"value": 1,
"from": "L",
"to": "gal"
})
});
const { task_id } = await res.json();import os, requests
res = requests.post(
"https://api.kit.forhosting.com/conv/volume",
headers={"Authorization": f"Bearer {os.environ['KIT_KEY']}"},
json={
"value": 1,
"from": "L",
"to": "gal"
},
)
task_id = res.json()["task_id"]<?php
$res = file_get_contents("https://api.kit.forhosting.com/conv/volume", false, stream_context_create([
"http" => [
"method" => "POST",
"header" => "Authorization: Bearer " . getenv("KIT_KEY") . "\r\nContent-Type: application/json",
"content" => '{"value":1,"from":"L","to":"gal"}',
],
]));
$task = json_decode($res, true);body := bytes.NewBufferString(`{"value":1,"from":"L","to":"gal"}`)
req, _ := http.NewRequest("POST", "https://api.kit.forhosting.com/conv/volume", body)
req.Header.Set("Authorization", "Bearer "+os.Getenv("KIT_KEY"))
req.Header.Set("Content-Type", "application/json")
res, _ := http.DefaultClient.Do(req)Example request
{
"value": 1,
"from": "L",
"to": "gal"
}Example response
{
"task_id": "tsk_a1b2c3d4e5f6a1b2c3d4e5f6",
"type": "conv.volume",
"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.
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
The browser tool runs free on your device; the prepaid API charges $0.002 per successful item when pipelines need the same contract from servers and automation.
Supported units and how the conversion is computed
Friendly aliases such as liter, liters, gallon, gallons, quart, pint, cubic meter, cubic feet, mL, and m³ are normalized case-insensitively so forms and APIs can pass either short codes or full names. Every request multiplies the input value by the exact liters-per-unit factor for the source, then divides by the liters-per-unit factor for the target.
Request shape, response fields, and unknown-unit errors
The error message names the bad field and lists the supported set so clients can correct forms without guessing. Negative values are allowed when you need signed volume deltas in engineering pipelines; zero converts cleanly to zero in every target unit. Send a JSON body with three required fields: value as a finite number, from as the source unit string, and to as the target unit string. Aliases amount and quantity are accepted for value; unit_from and source for from; unit_to and target for to. On success the response echoes the canonical from and to codes, human-readable from_label and to_label strings, the converted result, the intermediate liters quantity, the dimensionless factor from source to target, a short formula line suitable for UI display, the method tag volume_si_us_liquid, and the fixed list of units_supported. Missing value, non-finite numbers such as NaN or Infinity, missing unit fields, and any token that does not map to a supported unit fail with invalid_input and are not charged after the engine rejects the request. Identical inputs always yield identical JSON because the path is pure arithmetic with no randomness, no remote lookup, and no dependence on the wall clock, which makes the endpoint safe to pin in continuous-integration goldens and SDK contract tests.
Browser use, API pricing, and everyday workflows
Switch to the prepaid API when an ecommerce catalog, warehouse management system, meal-kit app, laboratory LIMS, or construction takeoff tool must convert capacity at scale under a stable KIT contract at $0.002 per successful item; validation failures that raise invalid_input do not consume balance after rejection. Pair this endpoint with length or mass converters when a product pipeline needs several measure families, or call it alone when search traffic is specifically for volume conversion—liters, gallons, quarts, pints, cubic meters, and cubic feet—rather than a general unit switchboard.
Integration use cases
Lab and industrial pipelines
Normalize tank, sample, and reagent volumes to liters or milliliters in LIMS and automation scripts with a prepaid, deterministic API contract.