{"id":"bytes-format-human","version":"1.0.0","description":"Format an exact byte count as both SI and IEC strings and return the rounding mode used.","supported_operations":["format bytes for humans","show bytes in SI and IEC","convert byte count to MB and MiB","make file size readable","display exact bytes as units","human readable byte count"],"unsupported_operations":["parse a human size","convert data transfer rates"],"semantics":["After rounding, carry to the next SI/IEC unit if the rounded magnitude reaches its base (1000/1024), unless already at the largest supported unit. Recompute from exact bytes in the new unit.","Select the largest unit whose integer multiplier does not exceed the byte count; SI uses powers of 1000 and IEC uses powers of 1024.","precision is 0 to 6 fractional digits; half_even ties go to an even last digit, half_up ties increase, and down truncates.","Outputs always include trailing fractional zeroes and a space before the unit."],"limits":{"max_input_bytes":128,"max_digits":30,"max_precision":6,"max_output_bytes":512,"max_iterations":12},"pricing":{"status":"unpriced","charge_usd":null},"input_schema":{"type":"object","additionalProperties":false,"required":["bytes","precision","rounding"],"properties":{"bytes":{"type":"string","minLength":1,"maxLength":128,"pattern":"^(0|[1-9][0-9]*)$"},"precision":{"type":"integer","minimum":0,"maximum":6},"rounding":{"type":"string","enum":["half_even","half_up","down"]}}},"output_schema":{"type":"object","additionalProperties":false,"required":["si","iec","rounding","standard_version"],"properties":{"si":{"type":"string"},"iec":{"type":"string"},"rounding":{"type":"string","enum":["half_even","half_up","down"]},"standard_version":{"type":"string","const":"IEC 80000-13:2008; SI Brochure, 9th edition (2019, updated 2022)"}}},"examples":[{"input":{"bytes":"1500","precision":2,"rounding":"half_even"},"output":{"si":"1.50 kB","iec":"1.46 KiB","rounding":"half_even","standard_version":"IEC 80000-13:2008; SI Brochure, 9th edition (2019, updated 2022)"}},{"input":{"bytes":"1048576","precision":1,"rounding":"half_up"},"output":{"si":"1.0 MB","iec":"1.0 MiB","rounding":"half_up","standard_version":"IEC 80000-13:2008; SI Brochure, 9th edition (2019, updated 2022)"}}],"execute_url":"/v1/tools/bytes-format-human/versions/1.0.0/execute"}