Byte Size Converter

Convert between bytes, KB, MB, GB, TB with binary (1024) and SI (1000) modes.

Value
Unit
All examples use BASE_URL — set it to your deployment URL.
POST/api/bytes/convert
Convert a value between byte units. Use mode: "binary" (1024) or "si" (1000).
const res = await fetch(`${BASE_URL}/api/bytes/convert`, { method: "POST", headers: { "Content-Type": "application/json" }, body: JSON.stringify({ value: 1, unit: "GB", mode: "binary" }) }); // → { success: true, B: 1073741824, KB: 1048576, MB: 1024, GB: 1, TB: 0.000977, PB: 0.00000095 }